Class RayCollision
java.lang.Object
com.raylib.jextract.RayCollision
struct RayCollision {
bool hit;
float distance;
Vector3 point;
Vector3 normal;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegment
allocate
(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()
usingallocator
static MemorySegment
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCount
usingallocator
.static MemorySegment
asSlice
(MemorySegment array, long index) Obtains a slice ofarrayParam
which selects the array element atindex
.static float
distance
(MemorySegment struct) Getter for field:float distance
static void
distance
(MemorySegment struct, float fieldValue) Setter for field:float distance
static final ValueLayout.OfFloat
Layout for field:float distance
static final long
Offset for field:float distance
static boolean
hit
(MemorySegment struct) Getter for field:bool hit
static void
hit
(MemorySegment struct, boolean fieldValue) Setter for field:bool hit
static final ValueLayout.OfBoolean
Layout for field:bool hit
static final long
Offset for field:bool hit
static final GroupLayout
layout()
The layout of this structstatic MemorySegment
normal
(MemorySegment struct) Getter for field:Vector3 normal
static void
normal
(MemorySegment struct, MemorySegment fieldValue) Setter for field:Vector3 normal
static final GroupLayout
Layout for field:Vector3 normal
static final long
Offset for field:Vector3 normal
static MemorySegment
point
(MemorySegment struct) Getter for field:Vector3 point
static void
point
(MemorySegment struct, MemorySegment fieldValue) Setter for field:Vector3 point
static final GroupLayout
Layout for field:Vector3 point
static final long
Offset for field:Vector3 point
static MemorySegment
reinterpret
(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any).static MemorySegment
reinterpret
(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any).static long
sizeof()
The size (in bytes) of this struct
-
Method Details
-
layout
The layout of this struct -
hit$layout
Layout for field:bool hit
-
hit$offset
public static final long hit$offset()Offset for field:bool hit
-
hit
Getter for field:bool hit
-
hit
Setter for field:bool hit
-
distance$layout
Layout for field:float distance
-
distance$offset
public static final long distance$offset()Offset for field:float distance
-
distance
Getter for field:float distance
-
distance
Setter for field:float distance
-
point$layout
Layout for field:Vector3 point
-
point$offset
public static final long point$offset()Offset for field:Vector3 point
-
point
Getter for field:Vector3 point
-
point
Setter for field:Vector3 point
-
normal$layout
Layout for field:Vector3 normal
-
normal$offset
public static final long normal$offset()Offset for field:Vector3 normal
-
normal
Getter for field:Vector3 normal
-
normal
Setter for field:Vector3 normal
-
asSlice
Obtains a slice ofarrayParam
which selects the array element atindex
. The returned segment has addressarrayParam.address() + index * layout().byteSize()
-
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()
usingallocator
-
allocateArray
Allocate an array of sizeelementCount
usingallocator
. The returned segment has sizeelementCount * layout().byteSize()
. -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any). The returned segment has sizelayout().byteSize()
-
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any). The returned segment has sizeelementCount * layout().byteSize()
-