Skip to main content

Vector3Buffer

class Vector3Buffer

A Vector3Buffer is a NativeFloatBuffer adapter and Vector3 array that instead of being allocated in Java's heap memory is allocated in native memory, so if you need to use more memory than the available heap memory, use Vector3Buffer and you will be able to use 100% of device ram memory.


public class Vector3Buffer

— Constructors (3) —

ConstructorDescription
Vector3Buffer()Creates a new Vector3Buffer.
Vector3Buffer(int vectorCount)Creates a new Vector3Buffer with its size defined to be "vectorCount" argument.
Vector3Buffer(NativeFloatBuffer nativeFloatBuffer)Creates a new Vector2Buffer with its size defined to be "nativeFloatBuffer" argument.

— Methods (16) —

NameDescription
Vector3 get(int idx)Returns the current value of the three axes of the position vector defined to be "idx" argument.
float getX(int idx)Returns the current value of the X axis of the position vector defined to be "idx" argument.
float getY(int idx)Returns the current value of the Y axis of the position vector defined to be "idx" argument.
float getZ(int idx)Returns the current value of the Z axis of the position vector defined to be "idx" argument.
void put(Vector3 value)Places a value defined to be "value" argument sequentially in the Vector3Buffer.
void put(float x, float y, float z)Places the X axis value defined to be "x" argument, Y axis to be "y" argument, and Z axis to be "z" argument sequentially in the Vector3Buffer.
void set(int idx, Vector3 value)Sets the current value of Vector3Buffer to be "value" argument and its current position to be "idx" argument.
void set(int idx, float x, float y, float z)Sets the current value of X axis to be "x" argument, Y axis to be "y" argument, Z axis to be "z" argument of the Vector3Buffer and its current position to be "idx" argument.
int capacity()Returns the maximum Vector3Buffer capacity value.
Vector3[] array()Returns an array of current Vector3Buffer values.
void position(int idx)Returns the current position of the vector defined to be "idx" argument.
boolean isVboEnabled()Returns true if the vbo of Vector3Buffer is enabled, false if not.
void setVboEnabled(boolean value)Defines if Vector3Buffer's vbo will be enabled or disabled to be "value" argument.
Vector3Buffer copy()Returns a perfect copy of Vector3Buffer.
int getPosition()Returns the current position of Vector3Buffer.
void setPosition(int idx)Sets the current position of the Vector3Buffer to be "idx" argument.