本文整理汇总了C++中TriangleMesh::load方法的典型用法代码示例。如果您正苦于以下问题:C++ TriangleMesh::load方法的具体用法?C++ TriangleMesh::load怎么用?C++ TriangleMesh::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TriangleMesh
的用法示例。
在下文中一共展示了TriangleMesh::load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Lambert
void
makeSponzaScene()
{
g_camera = new Camera;
g_scene = new Scene;
g_image = new Image;
g_image->resize(512, 512);
// set up the camera
g_camera->setBGColor(Vector3(0.0f, 0.0f, 0.2f));
g_camera->setEye(Vector3(8, 1.5, 1));
g_camera->setLookAt(Vector3(0, 2.5, -1));
g_camera->setUp(Vector3(0, 1, 0));
g_camera->setFOV(55);
// create and place a point light source
PointLight * light = new PointLight;
light->setPosition(Vector3(0, 10.0, 0));
light->setColor(Vector3(1, 1, 1));
light->setWattage(4.0 * PI * 200);
g_scene->addLight(light);
Material* material = new Lambert(Vector3(1.0f));
TriangleMesh * mesh = new TriangleMesh;
mesh->load("sponza.obj");
addMeshTrianglesToScene(mesh, material);
// let objects do pre-calculations if needed
g_scene->preCalc();
}