Просмотр исходного кода

* Mesh/GImpact collision shapes now support triangle strips/fans through Mesh.getIndicesAsList() method

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9300 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..rd 13 лет назад
Родитель
Сommit
0c1294c57c

+ 1 - 1
engine/src/bullet/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java

@@ -79,7 +79,7 @@ public class GImpactCollisionShape extends CollisionShape {
         numTriangles = mesh.getTriangleCount();
         triangleIndexStride = 12; //3 index entries * 4 bytes each.
 
-        IndexBuffer indices = mesh.getIndexBuffer();
+        IndexBuffer indices = mesh.getIndicesAsList();
         FloatBuffer vertices = mesh.getFloatBuffer(Type.Position);
         vertices.rewind();
 

+ 1 - 1
engine/src/bullet/com/jme3/bullet/collision/shapes/MeshCollisionShape.java

@@ -76,7 +76,7 @@ public class MeshCollisionShape extends CollisionShape {
         numTriangles = mesh.getTriangleCount();
         triangleIndexStride = 12; //3 index entries * 4 bytes each.
 
-        IndexBuffer indices = mesh.getIndexBuffer();
+        IndexBuffer indices = mesh.getIndicesAsList();
         FloatBuffer vertices = mesh.getFloatBuffer(Type.Position);
         vertices.rewind();