Package com.raylib.jextract
Class RayCollision
java.lang.Object
com.raylib.jextract.RayCollision
struct RayCollision {
_Bool hit;
float distance;
Vector3 point;
Vector3 normal;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static floatdistance(MemorySegment struct) Getter for field:float distancestatic voiddistance(MemorySegment struct, float fieldValue) Setter for field:float distancestatic final ValueLayout.OfFloatLayout for field:float distancestatic final longOffset for field:float distancestatic booleanhit(MemorySegment struct) Getter for field:_Bool hitstatic voidhit(MemorySegment struct, boolean fieldValue) Setter for field:_Bool hitstatic final ValueLayout.OfBooleanLayout for field:_Bool hitstatic final longOffset for field:_Bool hitstatic final GroupLayoutlayout()The layout of this structstatic MemorySegmentnormal(MemorySegment struct) Getter for field:Vector3 normalstatic voidnormal(MemorySegment struct, MemorySegment fieldValue) Setter for field:Vector3 normalstatic final GroupLayoutLayout for field:Vector3 normalstatic final longOffset for field:Vector3 normalstatic MemorySegmentpoint(MemorySegment struct) Getter for field:Vector3 pointstatic voidpoint(MemorySegment struct, MemorySegment fieldValue) Setter for field:Vector3 pointstatic final GroupLayoutLayout for field:Vector3 pointstatic final longOffset for field:Vector3 pointstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code elementCount * layout().byteSize()}'static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code layout().byteSize()}'static longsizeof()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 ofarrayParamwhich 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 sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code layout().byteSize()}' -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaand invalid input: '{@code cleanupAction) (if any). The returned segment has size {@code elementCount * layout().byteSize()}'
-