Class mln_vec3
java.lang.Object
org.maplibre.nativeffi.internal.c.mln_vec3
struct mln_vec3 {
double x;
double y;
double z;
}
-
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 doublex(MemorySegment struct) Getter for field:double xstatic voidx(MemorySegment struct, double fieldValue) Setter for field:double xstatic final ValueLayout.OfDoublex$layout()Layout for field:double xstatic final longx$offset()Offset for field:double xstatic doubley(MemorySegment struct) Getter for field:double ystatic voidy(MemorySegment struct, double fieldValue) Setter for field:double ystatic final ValueLayout.OfDoubley$layout()Layout for field:double ystatic final longy$offset()Offset for field:double ystatic doublez(MemorySegment struct) Getter for field:double zstatic voidz(MemorySegment struct, double fieldValue) Setter for field:double zstatic final ValueLayout.OfDoublez$layout()Layout for field:double zstatic final longz$offset()Offset for field:double z
-
Method Details
-
layout
The layout of this struct -
x$layout
Layout for field:double x -
x$offset
public static final long x$offset()Offset for field:double x -
x
Getter for field:double x -
x
Setter for field:double x -
y$layout
Layout for field:double y -
y$offset
public static final long y$offset()Offset for field:double y -
y
Getter for field:double y -
y
Setter for field:double y -
z$layout
Layout for field:double z -
z$offset
public static final long z$offset()Offset for field:double z -
z
Getter for field:double z -
z
Setter for field:double z -
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()
-