Class Vector3
java.lang.Object
com.raylib.Vector3
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionVector3()
Construct with auto memory allocator and fields initialized to zero.Vector3
(float x, float y, float z) Construct with auto memory allocator and fields initialized as specifiedVector3
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectVector3
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedVector3
(SegmentAllocator arena, float x, float y, float z) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Vector3
allocateArray
(long elementCount) Allocate an array of Vector3static Vector3
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Vector3boolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) float
getX()
Vector x componentfloat
getY()
Vector y componentfloat
getZ()
Vector z componentint
hashCode()
void
setX
(float value) Vector x componentvoid
setY
(float value) Vector y componentvoid
setZ
(float value) Vector z componentfloat
x()
Vector x componentx
(float value) Vector x componentfloat
y()
Vector y componenty
(float value) Vector y componentfloat
z()
Vector z componentz
(float value) Vector z component
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Vector3
public Vector3()Construct with auto memory allocator and fields initialized to zero. -
Vector3
Construct with your owm memory allocator and fields not initialized -
Vector3
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Vector3
public Vector3(float x, float y, float z) Construct with auto memory allocator and fields initialized as specified- Parameters:
x
- Vector x componenty
- Vector y componentz
- Vector z component
-
Vector3
Construct with your own memory allocator and fields initialized as specified- Parameters:
x
- Vector x componenty
- Vector y componentz
- Vector z component
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Vector3 -
allocateArray
Allocate an array of Vector3 -
getX
public float getX()Vector x component -
setX
public void setX(float value) Vector x component -
x
public float x()Vector x component -
x
Vector x component -
getY
public float getY()Vector y component -
setY
public void setY(float value) Vector y component -
y
public float y()Vector y component -
y
Vector y component -
getZ
public float getZ()Vector z component -
setZ
public void setZ(float value) Vector z component -
z
public float z()Vector z component -
z
Vector z component
-