Class Ray
java.lang.Object
com.raylib.Ray
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegmentThe native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionRay()Construct with auto memory allocator and fields initialized to zero.Construct with auto memory allocator and fields initialized as specifiedRay(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectRay(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedRay(SegmentAllocator arena, Vector3 position, Vector3 direction) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic RayallocateArray(long elementCount) Allocate an array of Raystatic RayallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of RayRay direction (normalized)Ray direction (normalized)booleanEquality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement(int index) Ray direction (normalized)Ray position (origin)inthashCode()position()Ray position (origin)Ray position (origin)voidsetDirection(Vector3 value) Ray direction (normalized)voidsetPosition(Vector3 value) Ray position (origin)
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Ray
public Ray()Construct with auto memory allocator and fields initialized to zero. -
Ray
Construct with your owm memory allocator and fields not initialized -
Ray
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Ray
-
Ray
Construct with your own memory allocator and fields initialized as specified- Parameters:
position- Ray position (origin)direction- Ray direction (normalized)
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Ray -
allocateArray
Allocate an array of Ray -
getPosition
Ray position (origin) -
setPosition
Ray position (origin) -
position
Ray position (origin) -
position
-
getDirection
Ray direction (normalized) -
setDirection
Ray direction (normalized) -
direction
Ray direction (normalized) -
direction
-