Package org.lwjgl.ovr
Class OVRViewScaleDesc
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Contains the data necessary to properly calculate position info for various layer types.
HmdToEyePose
is 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.HmdSpaceToWorldScaleInMeters
is 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 classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionOVRViewScaleDesc
(ByteBuffer container) Creates aOVRViewScaleDesc
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRViewScaleDesc
calloc()
Returns a newOVRViewScaleDesc
instance allocated withmemCalloc
.static OVRViewScaleDesc.Buffer
calloc
(int capacity) Returns a newOVRViewScaleDesc.Buffer
instance allocated withmemCalloc
.static OVRViewScaleDesc.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOVRViewScaleDesc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRViewScaleDesc
calloc
(MemoryStack stack) Returns a newOVRViewScaleDesc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRViewScaleDesc
Deprecated.static OVRViewScaleDesc.Buffer
callocStack
(int capacity) Deprecated.static OVRViewScaleDesc.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static OVRViewScaleDesc
callocStack
(MemoryStack stack) Deprecated.static OVRViewScaleDesc
create()
Returns a newOVRViewScaleDesc
instance allocated withBufferUtils
.static OVRViewScaleDesc.Buffer
create
(int capacity) Returns a newOVRViewScaleDesc.Buffer
instance allocated withBufferUtils
.static OVRViewScaleDesc
create
(long address) Returns a newOVRViewScaleDesc
instance for the specified memory address.static OVRViewScaleDesc.Buffer
create
(long address, int capacity) Create aOVRViewScaleDesc.Buffer
instance at the specified memory.static OVRViewScaleDesc
createSafe
(long address) static OVRViewScaleDesc.Buffer
createSafe
(long address, int capacity) float
ratio 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 specifiedOVRPosef
at the specified index of theHmdToEyePose()
field.HmdToEyePose
(Consumer<OVRPosef.Buffer> consumer) Passes theHmdToEyePose()
field to the specifiedConsumer
.HmdToEyePose
(OVRPosef.Buffer value) Copies the specifiedOVRPosef.Buffer
to theHmdToEyePose()
field.static OVRViewScaleDesc
malloc()
Returns a newOVRViewScaleDesc
instance allocated withmemAlloc
.static OVRViewScaleDesc.Buffer
malloc
(int capacity) Returns a newOVRViewScaleDesc.Buffer
instance allocated withmemAlloc
.static OVRViewScaleDesc.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOVRViewScaleDesc.Buffer
instance allocated on the specifiedMemoryStack
.static OVRViewScaleDesc
malloc
(MemoryStack stack) Returns a newOVRViewScaleDesc
instance allocated on the specifiedMemoryStack
.static OVRViewScaleDesc
Deprecated.static OVRViewScaleDesc.Buffer
mallocStack
(int capacity) Deprecated.static OVRViewScaleDesc.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static OVRViewScaleDesc
mallocStack
(MemoryStack stack) Deprecated.static float
nHmdSpaceToWorldScaleInMeters
(long struct) Unsafe version ofHmdSpaceToWorldScaleInMeters()
.static void
nHmdSpaceToWorldScaleInMeters
(long struct, float value) Unsafe version ofHmdSpaceToWorldScaleInMeters
.static OVRPosef.Buffer
nHmdToEyePose
(long struct) Unsafe version ofHmdToEyePose()
.static OVRPosef
nHmdToEyePose
(long struct, int index) Unsafe version ofHmdToEyePose
.static void
nHmdToEyePose
(long struct, int index, OVRPosef value) Unsafe version ofHmdToEyePose
.static void
nHmdToEyePose
(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.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aOVRViewScaleDesc
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<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.Buffer
to theHmdToEyePose()
field. -
HmdToEyePose
Copies the specifiedOVRPosef
at 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 newOVRViewScaleDesc
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOVRViewScaleDesc
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOVRViewScaleDesc
instance allocated withBufferUtils
. -
create
Returns a newOVRViewScaleDesc
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRViewScaleDesc.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOVRViewScaleDesc.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOVRViewScaleDesc.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOVRViewScaleDesc.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newOVRViewScaleDesc
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOVRViewScaleDesc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOVRViewScaleDesc.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOVRViewScaleDesc.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-