Class XrAttenuationCurvePointBD
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
public class XrAttenuationCurvePointBD
extends Struct<XrAttenuationCurvePointBD>
implements NativeResource
struct XrAttenuationCurvePointBD {
float distance;
float gain;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrAttenuationCurvePointBD(ByteBuffer container) Creates aXrAttenuationCurvePointBDinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic XrAttenuationCurvePointBDcalloc()Returns a newXrAttenuationCurvePointBDinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated withmemCalloc.calloc(int capacity, MemoryStack stack) Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrAttenuationCurvePointBDcalloc(MemoryStack stack) Returns a newXrAttenuationCurvePointBDinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrAttenuationCurvePointBDcreate()Returns a newXrAttenuationCurvePointBDinstance allocated withBufferUtils.create(int capacity) Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated withBufferUtils.static XrAttenuationCurvePointBDcreate(long address) Returns a newXrAttenuationCurvePointBDinstance for the specified memory address.create(long address, int capacity) Create aXrAttenuationCurvePointBD.Bufferinstance at the specified memory.static @Nullable XrAttenuationCurvePointBDcreateSafe(long address) static @Nullable XrAttenuationCurvePointBD.BuffercreateSafe(long address, int capacity) floatdistance()distance(float value) Sets the specified value to thedistancefield.floatgain()gain(float value) Sets the specified value to thegainfield.static XrAttenuationCurvePointBDmalloc()Returns a newXrAttenuationCurvePointBDinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated withmemAlloc.malloc(int capacity, MemoryStack stack) Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated on the specifiedMemoryStack.static XrAttenuationCurvePointBDmalloc(MemoryStack stack) Returns a newXrAttenuationCurvePointBDinstance allocated on the specifiedMemoryStack.static floatndistance(long struct) Unsafe version ofdistance().static voidndistance(long struct, float value) Unsafe version ofdistance.static floatngain(long struct) Unsafe version ofgain().static voidngain(long struct, float value) Unsafe version ofgain.set(float distance, float gain) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
DISTANCE
public static final int DISTANCEThe struct member offsets. -
GAIN
public static final int GAINThe struct member offsets.
-
-
Constructor Details
-
XrAttenuationCurvePointBD
Creates aXrAttenuationCurvePointBDinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<XrAttenuationCurvePointBD>
-
distance
public float distance()- Returns:
- the value of the
distancefield.
-
gain
public float gain()- Returns:
- the value of the
gainfield.
-
distance
Sets the specified value to thedistancefield. -
gain
Sets the specified value to thegainfield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newXrAttenuationCurvePointBDinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrAttenuationCurvePointBDinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrAttenuationCurvePointBDinstance allocated withBufferUtils. -
create
Returns a newXrAttenuationCurvePointBDinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrAttenuationCurvePointBD.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrAttenuationCurvePointBDinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrAttenuationCurvePointBDinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newXrAttenuationCurvePointBD.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ndistance
public static float ndistance(long struct) Unsafe version ofdistance(). -
ngain
public static float ngain(long struct) Unsafe version ofgain(). -
ndistance
public static void ndistance(long struct, float value) Unsafe version ofdistance. -
ngain
public static void ngain(long struct, float value) Unsafe version ofgain.
-