Merge branch 'navigation2' of https://github.com/super626/cocos2d-x into v3_navigation

This commit is contained in:
samuele3hu 2015-06-01 11:26:08 +08:00
commit be870bd42a
1 changed files with 1 additions and 15 deletions

View File

@ -140,21 +140,7 @@ void NavMeshBaseTestDemo::initScene()
{ {
getPhysics3DWorld()->setDebugDrawEnable(false); getPhysics3DWorld()->setDebugDrawEnable(false);
//create mesh //create mesh
std::vector<Vec3> trianglesList; std::vector<Vec3> trianglesList = Bundle3D::getTrianglesList("NavMesh/scene.obj");
auto bundle = Bundle3D::createBundle();
MeshDatas meshs;
MaterialDatas materials;
NodeDatas nodeDatas;
bundle->loadObj(meshs, materials, nodeDatas, "NavMesh/scene.obj");
Bundle3D::destroyBundle(bundle);
for (auto iter : meshs.meshDatas){
int preVertexSize = iter->getPerVertexSize() / sizeof(float);
for (auto indexArray : iter->subMeshIndices){
for (auto i : indexArray){
trianglesList.push_back(Vec3(iter->vertex[i * preVertexSize], iter->vertex[i * preVertexSize + 1], iter->vertex[i * preVertexSize + 2]));
}
}
}
Physics3DRigidBodyDes rbDes; Physics3DRigidBodyDes rbDes;
rbDes.mass = 0.0f; rbDes.mass = 0.0f;