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