mirror of https://github.com/axmolengine/axmol.git
Merge branch 'navigation2' of https://github.com/super626/cocos2d-x into v3_navigation
This commit is contained in:
commit
be870bd42a
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue