Package org.lwjgl.ovr
Class OVRTouchHapticsDesc
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRTouchHapticsDesc
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class OVRTouchHapticsDesc extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Describes the Touch Haptics engine.Member documentation
SampleRateHz
– Haptics engine frequency/sample-rate, sample time in seconds equals1.0/sampleRateHz
SampleSizeInBytes
– Size of each Haptics sample, sample value range is[0, 2^(Bytes*8)-1]
QueueMinSizeToAvoidStarvation
– Queue size that would guarantee Haptics engine would not starve for data. Make sure size doesn't drop below it for best results.SubmitMinSamples
– Minimum number of samples that can be sent to Haptics throughSubmitControllerVibration
SubmitMaxSamples
– Maximum number of samples that can be sent to Haptics throughSubmitControllerVibration
SubmitOptimalSamples
– Optimal number of samples that can be sent to Haptics throughSubmitControllerVibration
Layout
struct ovrTouchHapticsDesc { int SampleRateHz; int SampleSizeInBytes; int QueueMinSizeToAvoidStarvation; int SubmitMinSamples; int SubmitMaxSamples; int SubmitOptimalSamples; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OVRTouchHapticsDesc.Buffer
An array ofOVRTouchHapticsDesc
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
QUEUEMINSIZETOAVOIDSTARVATION
SAMPLERATEHZ
SAMPLESIZEINBYTESThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SUBMITMAXSAMPLES
SUBMITMINSAMPLES
SUBMITOPTIMALSAMPLESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description OVRTouchHapticsDesc(java.nio.ByteBuffer container)
Creates aOVRTouchHapticsDesc
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRTouchHapticsDesc
calloc()
Returns a newOVRTouchHapticsDesc
instance allocated withmemCalloc
.static OVRTouchHapticsDesc.Buffer
calloc(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated withmemCalloc
.static OVRTouchHapticsDesc
callocStack()
Returns a newOVRTouchHapticsDesc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRTouchHapticsDesc.Buffer
callocStack(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRTouchHapticsDesc.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRTouchHapticsDesc
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRTouchHapticsDesc
create()
Returns a newOVRTouchHapticsDesc
instance allocated withBufferUtils
.static OVRTouchHapticsDesc.Buffer
create(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated withBufferUtils
.static OVRTouchHapticsDesc
create(long address)
Returns a newOVRTouchHapticsDesc
instance for the specified memory address.static OVRTouchHapticsDesc.Buffer
create(long address, int capacity)
Create aOVRTouchHapticsDesc.Buffer
instance at the specified memory.static OVRTouchHapticsDesc
createSafe(long address)
static OVRTouchHapticsDesc.Buffer
createSafe(long address, int capacity)
static OVRTouchHapticsDesc
malloc()
Returns a newOVRTouchHapticsDesc
instance allocated withmemAlloc
.static OVRTouchHapticsDesc.Buffer
malloc(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated withmemAlloc
.static OVRTouchHapticsDesc
mallocStack()
Returns a newOVRTouchHapticsDesc
instance allocated on the thread-localMemoryStack
.static OVRTouchHapticsDesc.Buffer
mallocStack(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the thread-localMemoryStack
.static OVRTouchHapticsDesc.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the specifiedMemoryStack
.static OVRTouchHapticsDesc
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc
instance allocated on the specifiedMemoryStack
.static int
nQueueMinSizeToAvoidStarvation(long struct)
Unsafe version ofQueueMinSizeToAvoidStarvation()
.static int
nSampleRateHz(long struct)
Unsafe version ofSampleRateHz()
.static int
nSampleSizeInBytes(long struct)
Unsafe version ofSampleSizeInBytes()
.static int
nSubmitMaxSamples(long struct)
Unsafe version ofSubmitMaxSamples()
.static int
nSubmitMinSamples(long struct)
Unsafe version ofSubmitMinSamples()
.static int
nSubmitOptimalSamples(long struct)
Unsafe version ofSubmitOptimalSamples()
.int
QueueMinSizeToAvoidStarvation()
Returns the value of theQueueMinSizeToAvoidStarvation
field.int
SampleRateHz()
Returns the value of theSampleRateHz
field.int
SampleSizeInBytes()
Returns the value of theSampleSizeInBytes
field.int
sizeof()
int
SubmitMaxSamples()
Returns the value of theSubmitMaxSamples
field.int
SubmitMinSamples()
Returns the value of theSubmitMinSamples
field.int
SubmitOptimalSamples()
Returns the value of theSubmitOptimalSamples
field.
-
-
-
Constructor Detail
-
OVRTouchHapticsDesc
public OVRTouchHapticsDesc(java.nio.ByteBuffer container)
Creates aOVRTouchHapticsDesc
instance at the current position of the specifiedByteBuffer
container. 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
SampleRateHz
public int SampleRateHz()
Returns the value of theSampleRateHz
field.
-
SampleSizeInBytes
public int SampleSizeInBytes()
Returns the value of theSampleSizeInBytes
field.
-
QueueMinSizeToAvoidStarvation
public int QueueMinSizeToAvoidStarvation()
Returns the value of theQueueMinSizeToAvoidStarvation
field.
-
SubmitMinSamples
public int SubmitMinSamples()
Returns the value of theSubmitMinSamples
field.
-
SubmitMaxSamples
public int SubmitMaxSamples()
Returns the value of theSubmitMaxSamples
field.
-
SubmitOptimalSamples
public int SubmitOptimalSamples()
Returns the value of theSubmitOptimalSamples
field.
-
malloc
public static OVRTouchHapticsDesc malloc()
Returns a newOVRTouchHapticsDesc
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRTouchHapticsDesc calloc()
Returns a newOVRTouchHapticsDesc
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRTouchHapticsDesc create()
Returns a newOVRTouchHapticsDesc
instance allocated withBufferUtils
.
-
create
public static OVRTouchHapticsDesc create(long address)
Returns a newOVRTouchHapticsDesc
instance for the specified memory address.
-
createSafe
@Nullable public static OVRTouchHapticsDesc createSafe(long address)
-
malloc
public static OVRTouchHapticsDesc.Buffer malloc(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OVRTouchHapticsDesc.Buffer calloc(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRTouchHapticsDesc.Buffer create(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRTouchHapticsDesc.Buffer create(long address, int capacity)
Create aOVRTouchHapticsDesc.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static OVRTouchHapticsDesc.Buffer createSafe(long address, int capacity)
-
mallocStack
public static OVRTouchHapticsDesc mallocStack()
Returns a newOVRTouchHapticsDesc
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRTouchHapticsDesc callocStack()
Returns a newOVRTouchHapticsDesc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRTouchHapticsDesc mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRTouchHapticsDesc callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static OVRTouchHapticsDesc.Buffer mallocStack(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static OVRTouchHapticsDesc.Buffer callocStack(int capacity)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static OVRTouchHapticsDesc.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static OVRTouchHapticsDesc.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDesc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nSampleRateHz
public static int nSampleRateHz(long struct)
Unsafe version ofSampleRateHz()
.
-
nSampleSizeInBytes
public static int nSampleSizeInBytes(long struct)
Unsafe version ofSampleSizeInBytes()
.
-
nQueueMinSizeToAvoidStarvation
public static int nQueueMinSizeToAvoidStarvation(long struct)
Unsafe version ofQueueMinSizeToAvoidStarvation()
.
-
nSubmitMinSamples
public static int nSubmitMinSamples(long struct)
Unsafe version ofSubmitMinSamples()
.
-
nSubmitMaxSamples
public static int nSubmitMaxSamples(long struct)
Unsafe version ofSubmitMaxSamples()
.
-
nSubmitOptimalSamples
public static int nSubmitOptimalSamples(long struct)
Unsafe version ofSubmitOptimalSamples()
.
-
-