本文整理汇总了C++中Mesh::Build方法的典型用法代码示例。如果您正苦于以下问题:C++ Mesh::Build方法的具体用法?C++ Mesh::Build怎么用?C++ Mesh::Build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mesh
的用法示例。
在下文中一共展示了Mesh::Build方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetMeshes
void SetMeshes()
{
Cube cube;
cube.CalculateNormals();
cube.CalculateTangents();
cube.CalculateBitangents();
cube.Build(XYZ_UV_TBN);
cube.position = Vector3(-10, 20, 0);
cubie = RenderableObject(cube, Diffuse, mtlBrickD);
scene.AddObject(&cubie);
Sphere sphere(1, 24, 16);
sphere.CalculateNormals();
sphere.CalculateTangents();
sphere.CalculateBitangents();
sphere.Build(XYZ_UV_TBN);
sphere.position = Vector3(-14, 20, 0);
sphereRO = RenderableObject(sphere, BumpPOMSpecular, mtlBrickPOM);
scene.AddObject(&sphereRO);
/*Sphere sphere(1, 24, 16);
sphere.CalculateNormals();
sphere.Build(XYZ_N);
sphere.position = Vector3(4, 0, 0);
sphereRO = RenderableObject(sphere, CubeEM, mtlCubeMap);
scene.AddObject(&sphereRO);*/
Mesh teapot;
teapot.LoadDataFromFile("./Models/teapot.obj", OBJ);
teapot.CalculateUVs(SphereUV);
teapot.CalculateNormals();
teapot.Build(XYZ_N);
teapot.scale = Vector3(0.01f, 0.01f, 0.01f);
teapot.position = Vector3(-18, 20, 0);
teapotRO = RenderableObject(teapot, CubeEM, mtlCubeMap);
scene.AddObject(&teapotRO);
}