本文整理汇总了C++中MeshPtr::calculateTangents方法的典型用法代码示例。如果您正苦于以下问题:C++ MeshPtr::calculateTangents方法的具体用法?C++ MeshPtr::calculateTangents怎么用?C++ MeshPtr::calculateTangents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeshPtr
的用法示例。
在下文中一共展示了MeshPtr::calculateTangents方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadMeshes
void loadMeshes(){
INFO("Loading all meshes...");
MeshPtr mesh;
LoadManager::loadMesh("cube.obj");
mesh = LoadManager::getMesh("cube.obj");
mesh->resize();
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->generateTextureCoordinateBuffer();
mesh->calculateLimits();
mesh->calculateTangents();
mesh->generateTangentBuffer();
LoadManager::loadMesh("plane.obj");
mesh = LoadManager::getMesh("plane.obj");
mesh->resize();
mesh->loadObjNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->generateTextureCoordinateBuffer();
mesh->calculateLimits();
mesh->calculateTangents();
mesh->generateTangentBuffer();
LoadManager::loadMesh("particles.obj");
mesh = LoadManager::getMesh("particles.obj");
mesh->loadObjNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->generateTextureCoordinateBuffer();
mesh->calculateLimits();
mesh->calculateTangents();
mesh->generateTangentBuffer();
LoadManager::loadMesh("plane2.obj");
mesh = LoadManager::getMesh("plane2.obj");
mesh->resize();
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->calculateLimits();
LoadManager::loadMesh("grid.obj");
mesh = LoadManager::getMesh("grid.obj");
mesh->resize();
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->generateTextureCoordinateBuffer();
mesh->calculateLimits();
mesh->calculateTangents();
mesh->generateTangentBuffer();
LoadManager::loadMesh("stream.obj");
mesh = LoadManager::getMesh("stream.obj");
mesh->resize();
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->calculateLimits();
LoadManager::loadMesh("sphere.obj");
mesh = LoadManager::getMesh("sphere.obj");
mesh->resize();
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->generateTextureCoordinateBuffer();
mesh->calculateLimits();
mesh->calculateTangents();
mesh->generateTangentBuffer();
LoadManager::loadMesh("gun.obj");
mesh = LoadManager::getMesh("gun.obj");
mesh->resize();
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
mesh->generateNormalBuffer();
mesh->generateTextureCoordinateBuffer();
mesh->calculateLimits();
mesh->calculateTangents();
mesh->generateTangentBuffer();
LoadManager::loadMesh("interpcube.obj");
mesh = LoadManager::getMesh("interpcube.obj");
//mesh->resize(); // Don't resize this
mesh->calculateNormals();
mesh->generateVertexBuffer();
mesh->generateIndexBuffer();
//.........这里部分代码省略.........