public void setIndices(java.nio.ShortBuffer indices, int indexOffset, int indexCount) { assert indices.isDirect() : "Buffer must be allocated direct."; { CollisionJNI.btIndexedMesh_setIndices(swigCPtr, this, indices, indexOffset, indexCount); } }
public void getVertices(java.nio.FloatBuffer vertices, int vertexSize, int posOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getVertices__SWIG_1(swigCPtr, this, vertices, vertexSize, posOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); } }
public void getVertices(java.nio.FloatBuffer vertices, int vertexSize, int posOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getVertices__SWIG_1(swigCPtr, this, vertices, vertexSize, posOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); } }
public void getVertices(java.nio.FloatBuffer vertices, int vertexSize, int posOffset, int normalOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getVertices__SWIG_2(swigCPtr, this, vertices, vertexSize, posOffset, normalOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); } }
public void getVertices(java.nio.FloatBuffer vertices, int vertexSize, int posOffset, int normalOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getVertices__SWIG_2(swigCPtr, this, vertices, vertexSize, posOffset, normalOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); } }
public void setIndices(java.nio.ShortBuffer indices, int indexOffset, int indexCount) { assert indices.isDirect() : "Buffer must be allocated direct."; { CollisionJNI.btIndexedMesh_setIndices(swigCPtr, this, indices, indexOffset, indexCount); } }
public void setTriangleIndexBase(java.nio.ShortBuffer data) { assert data.isDirect() : "Buffer must be allocated direct."; { CollisionJNI.btIndexedMesh_setTriangleIndexBase(swigCPtr, this, data); } }
public void getIndices(java.nio.ShortBuffer buffer, int triangleCount) { assert buffer.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getIndices(swigCPtr, this, buffer, triangleCount); } }
public void getIndices(java.nio.ShortBuffer buffer, int triangleCount) { assert buffer.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getIndices(swigCPtr, this, buffer, triangleCount); } }
public void setTriangleIndexBase(java.nio.ShortBuffer data) { assert data.isDirect() : "Buffer must be allocated direct."; { CollisionJNI.btIndexedMesh_setTriangleIndexBase(swigCPtr, this, data); } }
static private long SwigConstructbtHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.ShortBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges) { assert heightfieldData.isDirect() : "Buffer must be allocated direct."; return CollisionJNI.new_btHeightfieldTerrainShape__SWIG_1(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); }
static private long SwigConstructbtHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, java.nio.ShortBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges) { assert heightfieldData.isDirect() : "Buffer must be allocated direct."; return CollisionJNI.new_btHeightfieldTerrainShape__SWIG_1(heightStickWidth, heightStickLength, heightfieldData, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); }
static private long SwigConstructbtSoftBody(btSoftBodyWorldInfo worldInfo, java.nio.FloatBuffer vertices, int vertexSize, int posOffset, int normalOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; return SoftbodyJNI.new_btSoftBody__SWIG_2(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, vertices, vertexSize, posOffset, normalOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); }
static private long SwigConstructbtSoftBody(btSoftBodyWorldInfo worldInfo, java.nio.FloatBuffer vertices, int vertexSize, int posOffset, int normalOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; return SoftbodyJNI.new_btSoftBody__SWIG_2(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, vertices, vertexSize, posOffset, normalOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); }
private static boolean isDirect(Buffer buf) { if (buf instanceof FloatBuffer) { return ((FloatBuffer) buf).isDirect(); } if (buf instanceof IntBuffer) { return ((IntBuffer) buf).isDirect(); } if (buf instanceof ShortBuffer) { return ((ShortBuffer) buf).isDirect(); } if (buf instanceof ByteBuffer) { return ((ByteBuffer) buf).isDirect(); } if (buf instanceof DoubleBuffer) { return ((DoubleBuffer) buf).isDirect(); } if (buf instanceof LongBuffer) { return ((LongBuffer) buf).isDirect(); } throw new UnsupportedOperationException(" BufferUtils.isDirect was called on " + buf.getClass().getName()); }
/** * For direct buffers, calls {@link Pointer#Pointer(Buffer)}, while for buffers * backed with an array, allocates enough memory for the array and copies it. * * @param buffer the Buffer to reference or copy * @see #put(short[]) */ public ShortPointer(ShortBuffer buffer) { super(buffer); if (buffer != null && !buffer.isDirect() && buffer.hasArray()) { short[] array = buffer.array(); allocateArray(array.length - buffer.arrayOffset()); put(array, buffer.arrayOffset(), array.length - buffer.arrayOffset()); position(buffer.position()); limit(buffer.limit()); } } /**
public void setTriangleIndexBase(java.nio.ShortBuffer data) { assert data.isDirect() : "Buffer must be allocated direct."; { CollisionJNI.btIndexedMesh_setTriangleIndexBase(swigCPtr, this, data); } }
public void getIndices(java.nio.ShortBuffer buffer, int triangleCount) { assert buffer.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getIndices(swigCPtr, this, buffer, triangleCount); } }
public void getVertices(java.nio.FloatBuffer vertices, int vertexSize, int posOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; { SoftbodyJNI.btSoftBody_getVertices__SWIG_1(swigCPtr, this, vertices, vertexSize, posOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); } }
static private long SwigConstructbtSoftBody(btSoftBodyWorldInfo worldInfo, java.nio.FloatBuffer vertices, int vertexSize, int posOffset, int normalOffset, java.nio.ShortBuffer indices, int indexOffset, int numVertices, java.nio.ShortBuffer indexMap, int indexMapOffset) { assert vertices.isDirect() : "Buffer must be allocated direct."; assert indices.isDirect() : "Buffer must be allocated direct."; assert indexMap.isDirect() : "Buffer must be allocated direct."; return SoftbodyJNI.new_btSoftBody__SWIG_2(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, vertices, vertexSize, posOffset, normalOffset, indices, indexOffset, numVertices, indexMap, indexMapOffset); }