Lines Matching refs:mesh
41 import com.jme3.scene.mesh.IndexBuffer;
50 * Basic mesh collision shape
66 * @param mesh the Mesh to use
68 public GImpactCollisionShape(Mesh mesh) {
69 createCollisionMesh(mesh);
72 private void createCollisionMesh(Mesh mesh) {
73 triangleIndexBase = BufferUtils.createByteBuffer(mesh.getTriangleCount() * 3 * 4);
74 vertexBase = BufferUtils.createByteBuffer(mesh.getVertexCount() * 3 * 4);
75 // triangleIndexBase = ByteBuffer.allocate(mesh.getTriangleCount() * 3 * 4);
76 // vertexBase = ByteBuffer.allocate(mesh.getVertexCount() * 3 * 4);
77 numVertices = mesh.getVertexCount();
79 numTriangles = mesh.getTriangleCount();
82 IndexBuffer indices = mesh.getIndexBuffer();
83 FloatBuffer vertices = mesh.getFloatBuffer(Type.Position);
86 int verticesLength = mesh.getVertexCount() * 3;
92 int indicesLength = mesh.getTriangleCount() * 3;
103 // * creates a jme mesh from the collision shape, only needed for debugging