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.NativeResourceDescribes the Touch Haptics engine.Member documentation
SampleRateHz– Haptics engine frequency/sample-rate, sample time in seconds equals1.0/sampleRateHzSampleSizeInBytes– 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 throughSubmitControllerVibrationSubmitMaxSamples– Maximum number of samples that can be sent to Haptics throughSubmitControllerVibrationSubmitOptimalSamples– 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 classOVRTouchHapticsDesc.BufferAn array ofOVRTouchHapticsDescstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intQUEUEMINSIZETOAVOIDSTARVATION
SAMPLERATEHZ
SAMPLESIZEINBYTESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSUBMITMAXSAMPLES
SUBMITMINSAMPLES
SUBMITOPTIMALSAMPLESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description OVRTouchHapticsDesc(java.nio.ByteBuffer container)Creates aOVRTouchHapticsDescinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OVRTouchHapticsDesccalloc()Returns a newOVRTouchHapticsDescinstance allocated withmemCalloc.static OVRTouchHapticsDesc.Buffercalloc(int capacity)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated withmemCalloc.static OVRTouchHapticsDesccallocStack()Returns a newOVRTouchHapticsDescinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRTouchHapticsDesc.BuffercallocStack(int capacity)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRTouchHapticsDesc.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTouchHapticsDesccallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRTouchHapticsDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTouchHapticsDesccreate()Returns a newOVRTouchHapticsDescinstance allocated withBufferUtils.static OVRTouchHapticsDesc.Buffercreate(int capacity)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated withBufferUtils.static OVRTouchHapticsDesccreate(long address)Returns a newOVRTouchHapticsDescinstance for the specified memory address.static OVRTouchHapticsDesc.Buffercreate(long address, int capacity)Create aOVRTouchHapticsDesc.Bufferinstance at the specified memory.static OVRTouchHapticsDesccreateSafe(long address)static OVRTouchHapticsDesc.BuffercreateSafe(long address, int capacity)static OVRTouchHapticsDescmalloc()Returns a newOVRTouchHapticsDescinstance allocated withmemAlloc.static OVRTouchHapticsDesc.Buffermalloc(int capacity)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated withmemAlloc.static OVRTouchHapticsDescmallocStack()Returns a newOVRTouchHapticsDescinstance allocated on the thread-localMemoryStack.static OVRTouchHapticsDesc.BuffermallocStack(int capacity)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated on the thread-localMemoryStack.static OVRTouchHapticsDesc.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRTouchHapticsDesc.Bufferinstance allocated on the specifiedMemoryStack.static OVRTouchHapticsDescmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRTouchHapticsDescinstance allocated on the specifiedMemoryStack.static intnQueueMinSizeToAvoidStarvation(long struct)Unsafe version ofQueueMinSizeToAvoidStarvation().static intnSampleRateHz(long struct)Unsafe version ofSampleRateHz().static intnSampleSizeInBytes(long struct)Unsafe version ofSampleSizeInBytes().static intnSubmitMaxSamples(long struct)Unsafe version ofSubmitMaxSamples().static intnSubmitMinSamples(long struct)Unsafe version ofSubmitMinSamples().static intnSubmitOptimalSamples(long struct)Unsafe version ofSubmitOptimalSamples().intQueueMinSizeToAvoidStarvation()Returns the value of theQueueMinSizeToAvoidStarvationfield.intSampleRateHz()Returns the value of theSampleRateHzfield.intSampleSizeInBytes()Returns the value of theSampleSizeInBytesfield.intsizeof()intSubmitMaxSamples()Returns the value of theSubmitMaxSamplesfield.intSubmitMinSamples()Returns the value of theSubmitMinSamplesfield.intSubmitOptimalSamples()Returns the value of theSubmitOptimalSamplesfield.
-
-
-
Constructor Detail
-
OVRTouchHapticsDesc
public OVRTouchHapticsDesc(java.nio.ByteBuffer container)
Creates aOVRTouchHapticsDescinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
SampleRateHz
public int SampleRateHz()
Returns the value of theSampleRateHzfield.
-
SampleSizeInBytes
public int SampleSizeInBytes()
Returns the value of theSampleSizeInBytesfield.
-
QueueMinSizeToAvoidStarvation
public int QueueMinSizeToAvoidStarvation()
Returns the value of theQueueMinSizeToAvoidStarvationfield.
-
SubmitMinSamples
public int SubmitMinSamples()
Returns the value of theSubmitMinSamplesfield.
-
SubmitMaxSamples
public int SubmitMaxSamples()
Returns the value of theSubmitMaxSamplesfield.
-
SubmitOptimalSamples
public int SubmitOptimalSamples()
Returns the value of theSubmitOptimalSamplesfield.
-
malloc
public static OVRTouchHapticsDesc malloc()
Returns a newOVRTouchHapticsDescinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRTouchHapticsDesc calloc()
Returns a newOVRTouchHapticsDescinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRTouchHapticsDesc create()
Returns a newOVRTouchHapticsDescinstance allocated withBufferUtils.
-
create
public static OVRTouchHapticsDesc create(long address)
Returns a newOVRTouchHapticsDescinstance for the specified memory address.
-
createSafe
@Nullable public static OVRTouchHapticsDesc createSafe(long address)
-
malloc
public static OVRTouchHapticsDesc.Buffer malloc(int capacity)
Returns a newOVRTouchHapticsDesc.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRTouchHapticsDesc.Buffer calloc(int capacity)
Returns a newOVRTouchHapticsDesc.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRTouchHapticsDesc.Buffer create(int capacity)
Returns a newOVRTouchHapticsDesc.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRTouchHapticsDesc.Buffer create(long address, int capacity)
Create aOVRTouchHapticsDesc.Bufferinstance 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 newOVRTouchHapticsDescinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRTouchHapticsDesc callocStack()
Returns a newOVRTouchHapticsDescinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRTouchHapticsDesc mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDescinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRTouchHapticsDesc callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTouchHapticsDescinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRTouchHapticsDesc.Buffer callocStack(int capacity)
Returns a newOVRTouchHapticsDesc.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-