Package org.lwjgl.ovr
Class OVRViewScaleDesc
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OVRViewScaleDesc>
org.lwjgl.ovr.OVRViewScaleDesc
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRViewScaleDesc
extends org.lwjgl.system.Struct<OVRViewScaleDesc>
implements org.lwjgl.system.NativeResource
Contains the data necessary to properly calculate position info for various layer types.
HmdToEyePoseis the same value-pair provided inOVREyeRenderDesc. Modifying this value is suggested only if the app is forcing monoscopic rendering and requires that all layers including quad layers show up in a monoscopic fashion.HmdSpaceToWorldScaleInMetersis used to scale player motion into in-application units.
In other words, it is how big an in-application unit is in the player's physical meters. For example, if the application uses inches as its units then
HmdSpaceToWorldScaleInMeters would be 0.0254. Note that if you are scaling the player in size, this must also scale. So if your application
units are inches, but you're shrinking the player to half their normal size, then HmdSpaceToWorldScaleInMeters would be 0.0254*2.0.
Layout
struct ovrViewScaleDesc {
ovrPosef HmdToEyePose()[ovrEye_Count];
float HmdSpaceToWorldScaleInMeters();
}-
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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionOVRViewScaleDesc(ByteBuffer container) Creates aOVRViewScaleDescinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRViewScaleDesccalloc()Returns a newOVRViewScaleDescinstance allocated withmemCalloc.static OVRViewScaleDesc.Buffercalloc(int capacity) Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemCalloc.static OVRViewScaleDesc.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRViewScaleDesccalloc(org.lwjgl.system.MemoryStack stack) Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRViewScaleDescDeprecated.static OVRViewScaleDesc.BuffercallocStack(int capacity) Deprecated.static OVRViewScaleDesc.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static OVRViewScaleDesccallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static OVRViewScaleDesccreate()Returns a newOVRViewScaleDescinstance allocated withBufferUtils.static OVRViewScaleDesc.Buffercreate(int capacity) Returns a newOVRViewScaleDesc.Bufferinstance allocated withBufferUtils.static OVRViewScaleDesccreate(long address) Returns a newOVRViewScaleDescinstance for the specified memory address.static OVRViewScaleDesc.Buffercreate(long address, int capacity) Create aOVRViewScaleDesc.Bufferinstance at the specified memory.static @Nullable OVRViewScaleDesccreateSafe(long address) static @Nullable OVRViewScaleDesc.BuffercreateSafe(long address, int capacity) floatratio of viewer units to meter unitsHmdSpaceToWorldScaleInMeters(float value) Sets the specified value to theHmdSpaceToWorldScaleInMeters()field.transform of each eye from the HMD center, in metersHmdToEyePose(int index) transform of each eye from the HMD center, in metersHmdToEyePose(int index, Consumer<OVRPosef> consumer) HmdToEyePose(int index, OVRPosef value) Copies the specifiedOVRPosefat the specified index of theHmdToEyePose()field.HmdToEyePose(Consumer<OVRPosef.Buffer> consumer) Passes theHmdToEyePose()field to the specifiedConsumer.HmdToEyePose(OVRPosef.Buffer value) Copies the specifiedOVRPosef.Bufferto theHmdToEyePose()field.static OVRViewScaleDescmalloc()Returns a newOVRViewScaleDescinstance allocated withmemAlloc.static OVRViewScaleDesc.Buffermalloc(int capacity) Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemAlloc.static OVRViewScaleDesc.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStack.static OVRViewScaleDescmalloc(org.lwjgl.system.MemoryStack stack) Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStack.static OVRViewScaleDescDeprecated.static OVRViewScaleDesc.BuffermallocStack(int capacity) Deprecated.static OVRViewScaleDesc.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static OVRViewScaleDescmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static floatnHmdSpaceToWorldScaleInMeters(long struct) Unsafe version ofHmdSpaceToWorldScaleInMeters().static voidnHmdSpaceToWorldScaleInMeters(long struct, float value) Unsafe version ofHmdSpaceToWorldScaleInMeters.static OVRPosef.BuffernHmdToEyePose(long struct) Unsafe version ofHmdToEyePose().static OVRPosefnHmdToEyePose(long struct, int index) Unsafe version ofHmdToEyePose.static voidnHmdToEyePose(long struct, int index, OVRPosef value) Unsafe version ofHmdToEyePose.static voidnHmdToEyePose(long struct, OVRPosef.Buffer value) Unsafe version ofHmdToEyePose.set(OVRPosef.Buffer HmdToEyePose, float HmdSpaceToWorldScaleInMeters) Initializes this struct with the specified values.set(OVRViewScaleDesc src) Copies the specified struct data to this struct.intsizeof()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. -
HMDTOEYEPOSE
public static final int HMDTOEYEPOSEThe struct member offsets. -
HMDSPACETOWORLDSCALEINMETERS
public static final int HMDSPACETOWORLDSCALEINMETERSThe struct member offsets.
-
-
Constructor Details
-
OVRViewScaleDesc
Creates aOVRViewScaleDescinstance 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<OVRViewScaleDesc>
-
HmdToEyePose
transform of each eye from the HMD center, in meters -
HmdToEyePose
transform of each eye from the HMD center, in meters -
HmdSpaceToWorldScaleInMeters
public float HmdSpaceToWorldScaleInMeters()ratio of viewer units to meter units -
HmdToEyePose
Copies the specifiedOVRPosef.Bufferto theHmdToEyePose()field. -
HmdToEyePose
Copies the specifiedOVRPosefat the specified index of theHmdToEyePose()field. -
HmdToEyePose
Passes theHmdToEyePose()field to the specifiedConsumer. -
HmdToEyePose
-
HmdSpaceToWorldScaleInMeters
Sets the specified value to theHmdSpaceToWorldScaleInMeters()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 newOVRViewScaleDescinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newOVRViewScaleDescinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newOVRViewScaleDescinstance allocated withBufferUtils. -
create
Returns a newOVRViewScaleDescinstance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newOVRViewScaleDesc.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aOVRViewScaleDesc.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 OVRViewScaleDesc.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 OVRViewScaleDesc.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nHmdToEyePose
Unsafe version ofHmdToEyePose(). -
nHmdToEyePose
Unsafe version ofHmdToEyePose. -
nHmdSpaceToWorldScaleInMeters
public static float nHmdSpaceToWorldScaleInMeters(long struct) Unsafe version ofHmdSpaceToWorldScaleInMeters(). -
nHmdToEyePose
Unsafe version ofHmdToEyePose. -
nHmdToEyePose
Unsafe version ofHmdToEyePose. -
nHmdSpaceToWorldScaleInMeters
public static void nHmdSpaceToWorldScaleInMeters(long struct, float value) Unsafe version ofHmdSpaceToWorldScaleInMeters.
-