Class Vector2
java.lang.Object
com.raylib.jextract.Vector2
-
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 final GroupLayoutlayout()The layout of this structstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static longsizeof()The size (in bytes) of this structstatic floatx(MemorySegment struct) Getter for field:float xstatic voidx(MemorySegment struct, float fieldValue) Setter for field:float xstatic final ValueLayout.OfFloatx$layout()Layout for field:float xstatic final longx$offset()Offset for field:float xstatic floaty(MemorySegment struct) Getter for field:float ystatic voidy(MemorySegment struct, float fieldValue) Setter for field:float ystatic final ValueLayout.OfFloaty$layout()Layout for field:float ystatic final longy$offset()Offset for field:float y
-
Method Details
-
layout
The layout of this struct -
x$layout
Layout for field:float x -
x$offset
public static final long x$offset()Offset for field:float x -
x
Getter for field:float x -
x
Setter for field:float x -
y$layout
Layout for field:float y -
y$offset
public static final long y$offset()Offset for field:float y -
y
Getter for field:float y -
y
Setter for field:float y -
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 targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-