Class BufferUtil
java.lang.Object
org.jzy3d.io.BufferUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[]copyFloat(FloatBuffer buffer) Copy content of a direct float buffer as buffer.array() is an unsupported operationstatic voidstatic Coord3dgetCoordAt(FloatBuffer buffer, int i) getCoords(FloatBuffer buffer) static voidstatic ByteBuffernewDirectByteBuffer(int size) A direct buffer in native byte order, as expected by OpenGL.static FloatBuffernewDirectFloatBuffer(float[] values) A direct buffer holding the given values, with position set to 0.static FloatBuffernewDirectFloatBuffer(int size) static IntBuffernewDirectIntBuffer(int size) static IntBuffernewDirectIntBuffer(int[] values) A direct buffer holding the given values, with position set to 0.static LongBuffernewDirectLongBuffer(int size) static voidA simple utility to upcast buffers to invoke some of their methods without hitting compatibility issues between Java invalid input: '<' 9 and Java 9+ https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip Useful if compiled with Java >9 and app run with Java invalid input: '<'9
-
Constructor Details
-
BufferUtil
public BufferUtil()
-
-
Method Details
-
rewind
A simple utility to upcast buffers to invoke some of their methods without hitting compatibility issues between Java invalid input: '<' 9 and Java 9+ https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip Useful if compiled with Java >9 and app run with Java invalid input: '<'9 -
flip
-
limit
-
copyFloat
Copy content of a direct float buffer as buffer.array() is an unsupported operation -
getCoordAt
-
getCoords
-
newDirectByteBuffer
A direct buffer in native byte order, as expected by OpenGL. -
newDirectFloatBuffer
-
newDirectFloatBuffer
A direct buffer holding the given values, with position set to 0. -
newDirectIntBuffer
-
newDirectIntBuffer
A direct buffer holding the given values, with position set to 0. -
newDirectLongBuffer
-