/** * Sets the fog buffer. * * @param fogBuffer * the new fog buffer */ public void setFogBuffer(final FloatBuffer fogBuffer) { if (fogBuffer == null) { _fogCoords = null; } else { _fogCoords = new FloatBufferData(fogBuffer, 3); } }
/** * Sets the tangent buffer. * * @param tangentBuffer * the new tangent buffer */ public void setTangentBuffer(final FloatBuffer tangentBuffer) { if (tangentBuffer == null) { _tangentCoords = null; } else { _tangentCoords = new FloatBufferData(tangentBuffer, 3); } }
@Override public FloatBufferData makeCopy() { final FloatBufferData copy = new FloatBufferData(); copy._buffer = BufferUtils.clone(_buffer); copy._valuesPerTuple = _valuesPerTuple; copy._vboAccessMode = _vboAccessMode; return copy; }
public static FloatBufferData makeNew(final ReadOnlyVector3[] coords) { if (coords == null) { return null; } return new FloatBufferData(BufferUtils.createFloatBuffer(coords), 3); }
public static FloatBufferData makeNew(final float[] coords) { if (coords == null) { return null; } return new FloatBufferData(BufferUtils.createFloatBuffer(coords), 1); }
@Override public FloatBufferData makeCopy() { final FloatBufferData copy = new FloatBufferData(); copy._buffer = BufferUtils.clone(_buffer); copy._valuesPerTuple = _valuesPerTuple; copy._vboAccessMode = _vboAccessMode; return copy; }
public static FloatBufferData makeNew(final ReadOnlyVector2[] coords) { if (coords == null) { return null; } return new FloatBufferData(BufferUtils.createFloatBuffer(coords), 2); }
public static FloatBufferData makeNew(final float[] coords) { if (coords == null) { return null; } return new FloatBufferData(BufferUtils.createFloatBuffer(coords), 1); } }
public static FloatBufferData makeNew(final ReadOnlyVector2[] coords) { if (coords == null) { return null; } return new FloatBufferData(BufferUtils.createFloatBuffer(coords), 2); }
public static FloatBufferData makeNew(final ReadOnlyVector3[] coords) { if (coords == null) { return null; } return new FloatBufferData(BufferUtils.createFloatBuffer(coords), 3); }
/** * Set the basic data for this mesh such as texture coordinates, index mode and our vertex buffer. */ private void initialize() { _meshData.setVertexCoords(new FloatBufferData(BufferUtils.createVector2Buffer(4), 2)); final FloatBuffer tbuf = BufferUtils.createVector2Buffer(4); _meshData.setTextureBuffer(tbuf, 0); tbuf.put(0).put(1); tbuf.put(0).put(0); tbuf.put(1).put(0); tbuf.put(1).put(1); _meshData.setIndexMode(IndexMode.TriangleFan); }
/** * 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)); } }
/** * Sets the color buffer. * * @param colorBuffer * the new color buffer */ public void setColorBuffer(final FloatBuffer colorBuffer) { if (colorBuffer == null) { setColorCoords(null); } else { setColorCoords(new FloatBufferData(colorBuffer, 4)); } }
/** * Sets the normal buffer. * * @param normalBuffer * the new normal buffer */ public void setNormalBuffer(final FloatBuffer normalBuffer) { if (normalBuffer == null) { setNormalCoords(null); } else { setNormalCoords(new FloatBufferData(normalBuffer, 3)); } }
/** * Sets the tangent buffer. * * @param tangentBuffer * the new tangent buffer */ public void setTangentBuffer(final FloatBuffer tangentBuffer) { if (tangentBuffer == null) { setTangentCoords(null); } else { setTangentCoords(new FloatBufferData(tangentBuffer, 3)); } }
private void setTextureData() { if (getMeshData().getTextureCoords(0) == null) { final FloatBuffer tex = BufferUtils.createVector2Buffer(trailVertices); getMeshData().setTextureCoords(new FloatBufferData(tex, 2), 0); for (int i = 0; i < nrTrailSections; i++) { tex.put((float) i / nrTrailSections).put(0); tex.put((float) i / nrTrailSections).put(1); } } }
public void recreateWeightAttributeBuffer() { final float[] data; if (isGpuUseMatrixAttribute()) { data = SkinUtils.reorderAndPad(_weights, getWeightsPerVert(), getGpuAttributeSize()); } else { data = SkinUtils.pad(_weights, getWeightsPerVert(), getGpuAttributeSize()); } _weightsBuf = new FloatBufferData(BufferUtils.createFloatBuffer(data), getGpuAttributeSize()); }
public void recreateWeightAttributeBuffer() { final float[] data; if (isGpuUseMatrixAttribute()) { data = SkinUtils.reorderAndPad(_weights, getWeightsPerVert(), getGpuAttributeSize()); } else { data = SkinUtils.pad(_weights, getWeightsPerVert(), getGpuAttributeSize()); } _bindPoseData.setCoords("weights", new FloatBufferData(BufferUtils.createFloatBuffer(data), getGpuAttributeSize())); }
public void recreateJointAttributeBuffer() { final float[] data; if (isGpuUseMatrixAttribute()) { data = SkinUtils.reorderAndPad(SkinUtils.convertToFloat(_jointIndices), getWeightsPerVert(), getGpuAttributeSize()); } else { data = SkinUtils.pad(SkinUtils.convertToFloat(_jointIndices), getWeightsPerVert(), getGpuAttributeSize()); } _jointIndicesBuf = new FloatBufferData(BufferUtils.createFloatBuffer(data), getGpuAttributeSize()); }
public void recreateJointAttributeBuffer() { final float[] data; if (isGpuUseMatrixAttribute()) { data = SkinUtils.reorderAndPad(SkinUtils.convertToFloat(_jointIndices), getWeightsPerVert(), getGpuAttributeSize()); } else { data = SkinUtils.pad(SkinUtils.convertToFloat(_jointIndices), getWeightsPerVert(), getGpuAttributeSize()); } _bindPoseData.setCoords("jointIds", new FloatBufferData(BufferUtils.createFloatBuffer(data), getGpuAttributeSize())); }