Package org.lwjgl.ovr
Class OVRHapticsBuffer
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OVRHapticsBuffer>
org.lwjgl.ovr.OVRHapticsBuffer
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRHapticsBuffer
extends org.lwjgl.system.Struct<OVRHapticsBuffer>
implements org.lwjgl.system.NativeResource
Haptics buffer descriptor, contains amplitude samples used for Touch vibration.
Layout
struct ovrHapticsBuffer {
void * Samples(int);
int SamplesCount();
ovrHapticsBufferSubmitMode SubmitMode();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionOVRHapticsBuffer(ByteBuffer container) Creates aOVRHapticsBufferinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRHapticsBuffercalloc()Returns a newOVRHapticsBufferinstance allocated withmemCalloc.static OVRHapticsBuffer.Buffercalloc(int capacity) Returns a newOVRHapticsBuffer.Bufferinstance allocated withmemCalloc.static OVRHapticsBuffer.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOVRHapticsBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRHapticsBuffercalloc(org.lwjgl.system.MemoryStack stack) Returns a newOVRHapticsBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRHapticsBufferDeprecated.static OVRHapticsBuffer.BuffercallocStack(int capacity) Deprecated.static OVRHapticsBuffer.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static OVRHapticsBuffercallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static OVRHapticsBuffercreate()Returns a newOVRHapticsBufferinstance allocated withBufferUtils.static OVRHapticsBuffer.Buffercreate(int capacity) Returns a newOVRHapticsBuffer.Bufferinstance allocated withBufferUtils.static OVRHapticsBuffercreate(long address) Returns a newOVRHapticsBufferinstance for the specified memory address.static OVRHapticsBuffer.Buffercreate(long address, int capacity) Create aOVRHapticsBuffer.Bufferinstance at the specified memory.static @Nullable OVRHapticsBuffercreateSafe(long address) static @Nullable OVRHapticsBuffer.BuffercreateSafe(long address, int capacity) static OVRHapticsBuffermalloc()Returns a newOVRHapticsBufferinstance allocated withmemAlloc.static OVRHapticsBuffer.Buffermalloc(int capacity) Returns a newOVRHapticsBuffer.Bufferinstance allocated withmemAlloc.static OVRHapticsBuffer.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOVRHapticsBuffer.Bufferinstance allocated on the specifiedMemoryStack.static OVRHapticsBuffermalloc(org.lwjgl.system.MemoryStack stack) Returns a newOVRHapticsBufferinstance allocated on the specifiedMemoryStack.static OVRHapticsBufferDeprecated.static OVRHapticsBuffer.BuffermallocStack(int capacity) Deprecated.static OVRHapticsBuffer.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static OVRHapticsBuffermallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static ByteBuffernSamples(long struct, int capacity) Unsafe version ofSamples.static voidnSamples(long struct, ByteBuffer value) Unsafe version ofSamples.static intnSamplesCount(long struct) Unsafe version ofSamplesCount().static voidnSamplesCount(long struct, int value) Unsafe version ofSamplesCount.static intnSubmitMode(long struct) Unsafe version ofSubmitMode().static voidnSubmitMode(long struct, int value) Unsafe version ofSubmitMode.Samples(int capacity) Samples(ByteBuffer value) Sets the address of the specifiedByteBufferto theSamples(int)field.intnumber of samples (up toOVR.OVR_HAPTICS_BUFFER_SAMPLES_MAX)SamplesCount(int value) Sets the specified value to theSamplesCount()field.set(ByteBuffer Samples, int SamplesCount, int SubmitMode) Initializes this struct with the specified values.set(OVRHapticsBuffer src) Copies the specified struct data to this struct.intsizeof()inthow samples are submitted to the hardware.SubmitMode(int value) Sets the specified value to theSubmitMode()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.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. -
SAMPLES
public static final int SAMPLESThe struct member offsets. -
SAMPLESCOUNT
public static final int SAMPLESCOUNTThe struct member offsets. -
SUBMITMODE
public static final int SUBMITMODEThe struct member offsets.
-
-
Constructor Details
-
OVRHapticsBuffer
Creates aOVRHapticsBufferinstance 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<OVRHapticsBuffer>
-
Samples
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- samples stored in opaque format
-
SamplesCount
public int SamplesCount()number of samples (up toOVR.OVR_HAPTICS_BUFFER_SAMPLES_MAX) -
SubmitMode
public int SubmitMode()how samples are submitted to the hardware. Must be:HapticsBufferSubmit_Enqueue -
Samples
Sets the address of the specifiedByteBufferto theSamples(int)field. -
SamplesCount
Sets the specified value to theSamplesCount()field. -
SubmitMode
Sets the specified value to theSubmitMode()field. -
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 newOVRHapticsBufferinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newOVRHapticsBufferinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newOVRHapticsBufferinstance allocated withBufferUtils. -
create
Returns a newOVRHapticsBufferinstance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRHapticsBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newOVRHapticsBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newOVRHapticsBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aOVRHapticsBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static OVRHapticsBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static OVRHapticsBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newOVRHapticsBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newOVRHapticsBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newOVRHapticsBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newOVRHapticsBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nSamples
Unsafe version ofSamples. -
nSamplesCount
public static int nSamplesCount(long struct) Unsafe version ofSamplesCount(). -
nSubmitMode
public static int nSubmitMode(long struct) Unsafe version ofSubmitMode(). -
nSamples
Unsafe version ofSamples. -
nSamplesCount
public static void nSamplesCount(long struct, int value) Unsafe version ofSamplesCount. -
nSubmitMode
public static void nSubmitMode(long struct, int value) Unsafe version ofSubmitMode. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-