/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components of the vector (2 for xy, 3 for xyz or 4 for xyzw) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (float[] data, int dimensions, int strideInBytes, int count, Matrix4 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components (x, y, z) of the vector (2 for xy or 3 for xyz) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (Buffer data, int dimensions, int strideInBytes, int count, Matrix3 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components of the vector (2 for xy, 3 for xyz or 4 for xyzw) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (Buffer data, int dimensions, int strideInBytes, int count, Matrix4 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components of the vector (2 for xy, 3 for xyz or 4 for xyzw) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (Buffer data, int dimensions, int strideInBytes, int count, Matrix4 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components (x, y, z) of the vector (2 for xy or 3 for xyz) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (Buffer data, int dimensions, int strideInBytes, int count, Matrix3 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components (x, y, z) of the vector (2 for xy or 3 for xyz) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (float[] data, int dimensions, int strideInBytes, int count, Matrix3 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components of the vector (2 for xy, 3 for xyz or 4 for xyzw) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (float[] data, int dimensions, int strideInBytes, int count, Matrix4 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components (x, y, z) of the vector (2 for xy or 3 for xyz) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (float[] data, int dimensions, int strideInBytes, int count, Matrix3 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components of the vector (2 for xy, 3 for xyz or 4 for xyzw) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (Buffer data, int dimensions, int strideInBytes, int count, Matrix4 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components of the vector (2 for xy, 3 for xyz or 4 for xyzw) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (float[] data, int dimensions, int strideInBytes, int count, Matrix4 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components (x, y, z) of the vector (2 for xy or 3 for xyz) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (float[] data, int dimensions, int strideInBytes, int count, Matrix3 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
/** Multiply float vector components within the buffer with the specified matrix. The {@link Buffer#position()} is used as the * offset. * @param data The buffer to transform. * @param dimensions The number of components (x, y, z) of the vector (2 for xy or 3 for xyz) * @param strideInBytes The offset between the first and the second vector to transform * @param count The number of vectors to transform * @param matrix The matrix to multiply the vector with */ public static void transform (Buffer data, int dimensions, int strideInBytes, int count, Matrix3 matrix) { transform(data, dimensions, strideInBytes, count, matrix, 0); }
FloatBuffer workBuffer = BufferUtils.newFloatBuffer(mesh.getVerticesBuffer().capacity()); BufferUtils.copy(mesh.getVerticesBuffer(), workBuffer, mesh.getNumVertices() * mesh.getVertexSize() / 4); BufferUtils.transform(workBuffer, 3, mesh.getVertexSize(), mesh.getNumVertices(), transform);