Documentation for module: Graphics

Former-commit-id: 5fba876346aec7b35bc618002b669ff194e58544
This commit is contained in:
Gawaboumga
2016-05-30 14:21:36 +02:00
parent 6b1cfca761
commit 74081c2b9f
94 changed files with 4858 additions and 504 deletions

View File

@@ -0,0 +1,24 @@
#include <Nazara/Graphics/Model.hpp>
#include <Catch/catch.hpp>
SCENARIO("Model", "[GRAPHICS][MODEL]")
{
GIVEN("The standford dragon model")
{
WHEN("We get general informations")
{
THEN("These results are expected")
{
Nz::ModelRef model = Nz::Model::New();
REQUIRE(model->LoadFromFile("resources/Engine/Graphics/dragon_recon/dragon_vrip_res4.obj"));
REQUIRE(model->GetMaterialCount() == 2);
REQUIRE(model->GetSkin() == 0);
REQUIRE(model->GetSkinCount() == 1);
Nz::Material* material = model->GetMaterial(0);
REQUIRE(material->GetAmbientColor() == Nz::Color(128));
}
}
}
}