Package com.raylib
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 Rayboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) Ray directionRay position (origin)int
hashCode()
setDirection
(Vector3 value) Ray directionsetPosition
(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
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Ray -
allocateArray
Allocate an array of Ray -
getPosition
Ray position (origin) -
setPosition
-
getDirection
Ray direction -
setDirection
-