Class Ray
java.lang.Object
com.raylib.Ray
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The 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 Ray
allocateArray
(long elementCount) Allocate an array of Raystatic Ray
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of RayRay direction (normalized)Ray direction (normalized)boolean
Equality 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)int
hashCode()
position()
Ray position (origin)Ray position (origin)void
setDirection
(Vector3 value) Ray direction (normalized)void
setPosition
(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
-