/** * Sets the normal coords. * * @param bufferData * the new normal coords */ public void setNormalCoords(final FloatBufferData bufferData) { _normalCoords = bufferData; refreshInterleaved(); }
/** * Sets all texture coords on this MeshData. * * @param textureCoords * the new texture coords */ public void setTextureCoords(final List<FloatBufferData> textureCoords) { _textureCoords = textureCoords; refreshInterleaved(); }
/** * Sets the color coords. * * @param bufferData * the new color coords */ public void setColorCoords(final FloatBufferData bufferData) { _colorCoords = bufferData; refreshInterleaved(); }
/** * Sets the interleaved buffer. * * @param interleavedBuffer * the interleaved buffer */ public void setInterleavedData(final FloatBufferData interleavedData) { _interleaved = interleavedData; refreshInterleaved(); }
/** * Sets the texture coords of a specific texture unit index to the given FloatBufferData. * * @param textureCoords * the texture coords * @param index * the unit index */ public void setTextureCoords(final FloatBufferData textureCoords, final int index) { while (_textureCoords.size() <= index) { _textureCoords.add(null); } _textureCoords.set(index, textureCoords); refreshInterleaved(); }
/** * Sets the vertex coords. * * @param bufferData * the new vertex coords */ public void setVertexCoords(final FloatBufferData bufferData) { _vertexCoords = bufferData; updateVertexCount(); refreshInterleaved(); }
/** * Sets the index mode. * * @param indexMode * the new IndexMode to use for the first section of this MeshData. */ public void setIndexMode(final IndexMode indexMode) { _indexModes[0] = indexMode; updatePrimitiveCounts(); refreshInterleaved(); }
/** * Note: Also updates primitive counts. * * @param indexModes * the index modes to use for this MeshData. */ public void setIndexModes(final IndexMode[] indexModes) { _indexModes = indexModes; updatePrimitiveCounts(); refreshInterleaved(); }
/** * Sets the indices * * @param bufferData * the new indices */ public void setIndices(final IndexBufferData<?> bufferData) { _indexBuffer = bufferData; updatePrimitiveCounts(); refreshInterleaved(); }
/** * Sets the index lengths. * * @param indexLengths * the new index lengths */ public void setIndexLengths(final int[] indexLengths) { _indexLengths = indexLengths; updatePrimitiveCounts(); refreshInterleaved(); }
/** * Sets the normal buffer. * * @param normalBuffer * the new normal buffer */ public void setNormalBuffer(final FloatBuffer normalBuffer) { if (normalBuffer == null) { _normalCoords = null; } else { _normalCoords = new FloatBufferData(normalBuffer, 3); } refreshInterleaved(); }
/** * Sets the color buffer. * * @param colorBuffer * the new color buffer */ public void setColorBuffer(final FloatBuffer colorBuffer) { if (colorBuffer == null) { _colorCoords = null; } else { _colorCoords = new FloatBufferData(colorBuffer, 4); } refreshInterleaved(); }
/** * Sets the texture buffer for a given texture unit index. Interprets it as a 2 component float buffer data. If you * need other sizes, use setTextureCoords instead. * * @param textureBuffer * the texture buffer * @param index * the unit index * @see #setTextureCoords(FloatBufferData, int) */ public void setTextureBuffer(final FloatBuffer textureBuffer, final int index) { if (textureBuffer != null) { while (_textureCoords.size() <= index) { _textureCoords.add(null); } _textureCoords.set(index, new FloatBufferData(textureBuffer, 2)); } else if (index < _textureCoords.size()) { _textureCoords.set(index, null); } refreshInterleaved(); }
/** * Sets the index buffer. * * @param indices * the new index buffer */ public void setIndexBuffer(final IntBuffer indices) { if (indices == null) { _indexBuffer = null; } else { _indexBuffer = new IntBufferData(indices); } updatePrimitiveCounts(); refreshInterleaved(); }
/** * Sets the index buffer. * * @param indices * the new index buffer */ public void setIndexBuffer(final ByteBuffer indices) { if (indices == null) { _indexBuffer = null; } else { _indexBuffer = new ByteBufferData(indices); } updatePrimitiveCounts(); refreshInterleaved(); }
/** * Sets the index buffer. * * @param indices * the new index buffer */ public void setIndexBuffer(final ShortBuffer indices) { if (indices == null) { _indexBuffer = null; } else { _indexBuffer = new ShortBufferData(indices); } updatePrimitiveCounts(); refreshInterleaved(); }
/** * Sets the vertex buffer. * * @param vertexBuffer * the new vertex buffer */ public void setVertexBuffer(final FloatBuffer vertexBuffer) { if (vertexBuffer == null) { setVertexCoords(null); } else { setVertexCoords(new FloatBufferData(vertexBuffer, 3)); } refreshInterleaved(); }