Package org.lwjgl.ovr
Class OVRViewScaleDesc
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRViewScaleDesc
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class OVRViewScaleDesc extends Struct
Contains the data necessary to properly calculate position info for various layer types.HmdToEyeOffsetis the same value pair provided inOVREyeRenderDesc.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
HmdSpaceToWorldScaleInMeterswould 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, thenHmdSpaceToWorldScaleInMeterswould be0.0254*2.0.Member documentation
HmdToEyeOffset– translation of each eyeHmdSpaceToWorldScaleInMeters– ratio of viewer units to meter units
Layout
struct ovrViewScaleDesc {ovrVector3f[2] HmdToEyeOffset; float HmdSpaceToWorldScaleInMeters; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classOVRViewScaleDesc.BufferAn array ofOVRViewScaleDescstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description OVRViewScaleDesc(java.nio.ByteBuffer container)Creates aOVRViewScaleDescinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static OVRViewScaleDesccalloc()Returns a newOVRViewScaleDescinstance allocated withmemCalloc.static OVRViewScaleDesc.Buffercalloc(int capacity)Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemCalloc.static OVRViewScaleDesccallocStack()Returns a newOVRViewScaleDescinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRViewScaleDesc.BuffercallocStack(int capacity)Returns a newOVRViewScaleDesc.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRViewScaleDesc.BuffercallocStack(int capacity, MemoryStack stack)Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRViewScaleDesccallocStack(MemoryStack stack)Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 ornullif the address isNULL.static OVRViewScaleDesc.Buffercreate(long address, int capacity)Create aOVRViewScaleDesc.Bufferinstance at the specified memory.floatHmdSpaceToWorldScaleInMeters()Returns the value of theHmdSpaceToWorldScaleInMetersfield.OVRViewScaleDescHmdSpaceToWorldScaleInMeters(float value)Sets the specified value to theHmdSpaceToWorldScaleInMetersfield.OVRVector3f.BufferHmdToEyeOffset()Returns aOVRVector3f.Buffer view of theHmdToEyeOffsetfield.OVRVector3fHmdToEyeOffset(int index)Returns aOVRVector3fview of the struct at the specified index of theHmdToEyeOffsetfield.OVRViewScaleDescHmdToEyeOffset(int index, OVRVector3f value)Copies the specifiedOVRVector3fat the specified index of theHmdToEyeOffsetfield.OVRViewScaleDescHmdToEyeOffset(OVRVector3f.Buffer value)Copies the specifiedOVRVector3f.Bufferto theHmdToEyeOffsetfield.static OVRViewScaleDescmalloc()Returns a newOVRViewScaleDescinstance allocated withmemAlloc.static OVRViewScaleDesc.Buffermalloc(int capacity)Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemAlloc.static OVRViewScaleDescmallocStack()Returns a newOVRViewScaleDescinstance allocated on the thread-localMemoryStack.static OVRViewScaleDesc.BuffermallocStack(int capacity)Returns a newOVRViewScaleDesc.Bufferinstance allocated on the thread-localMemoryStack.static OVRViewScaleDesc.BuffermallocStack(int capacity, MemoryStack stack)Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStack.static OVRViewScaleDescmallocStack(MemoryStack stack)Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStack.OVRViewScaleDescnset(long struct)Unsafe version ofset.OVRViewScaleDescset(OVRVector3f.Buffer HmdToEyeOffset, float HmdSpaceToWorldScaleInMeters)Initializes this struct with the specified values.OVRViewScaleDescset(OVRViewScaleDesc src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
OVRViewScaleDesc
public OVRViewScaleDesc(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
Description copied from class:StructReturns thesizeof(struct).
-
HmdToEyeOffset
public OVRVector3f.Buffer HmdToEyeOffset()
Returns aOVRVector3f.Buffer view of theHmdToEyeOffsetfield.
-
HmdToEyeOffset
public OVRVector3f HmdToEyeOffset(int index)
Returns aOVRVector3fview of the struct at the specified index of theHmdToEyeOffsetfield.
-
HmdSpaceToWorldScaleInMeters
public float HmdSpaceToWorldScaleInMeters()
Returns the value of theHmdSpaceToWorldScaleInMetersfield.
-
HmdToEyeOffset
public OVRViewScaleDesc HmdToEyeOffset(OVRVector3f.Buffer value)
Copies the specifiedOVRVector3f.Bufferto theHmdToEyeOffsetfield.
-
HmdToEyeOffset
public OVRViewScaleDesc HmdToEyeOffset(int index, OVRVector3f value)
Copies the specifiedOVRVector3fat the specified index of theHmdToEyeOffsetfield.
-
HmdSpaceToWorldScaleInMeters
public OVRViewScaleDesc HmdSpaceToWorldScaleInMeters(float value)
Sets the specified value to theHmdSpaceToWorldScaleInMetersfield.
-
set
public OVRViewScaleDesc set(OVRVector3f.Buffer HmdToEyeOffset, float HmdSpaceToWorldScaleInMeters)
Initializes this struct with the specified values.
-
nset
public OVRViewScaleDesc nset(long struct)
Unsafe version ofset.
-
set
public OVRViewScaleDesc set(OVRViewScaleDesc src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static OVRViewScaleDesc malloc()
Returns a newOVRViewScaleDescinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRViewScaleDesc calloc()
Returns a newOVRViewScaleDescinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRViewScaleDesc create()
Returns a newOVRViewScaleDescinstance allocated withBufferUtils.
-
create
public static OVRViewScaleDesc create(long address)
Returns a newOVRViewScaleDescinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static OVRViewScaleDesc.Buffer malloc(int capacity)
Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRViewScaleDesc.Buffer calloc(int capacity)
Returns a newOVRViewScaleDesc.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRViewScaleDesc.Buffer create(int capacity)
Returns a newOVRViewScaleDesc.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRViewScaleDesc.Buffer create(long address, int capacity)
Create aOVRViewScaleDesc.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static OVRViewScaleDesc mallocStack()
Returns a newOVRViewScaleDescinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRViewScaleDesc callocStack()
Returns a newOVRViewScaleDescinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRViewScaleDesc mallocStack(MemoryStack stack)
Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRViewScaleDesc callocStack(MemoryStack stack)
Returns a newOVRViewScaleDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static OVRViewScaleDesc.Buffer mallocStack(int capacity)
Returns a newOVRViewScaleDesc.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRViewScaleDesc.Buffer callocStack(int capacity)
Returns a newOVRViewScaleDesc.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static OVRViewScaleDesc.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static OVRViewScaleDesc.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newOVRViewScaleDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-