public interface VRAPI
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Close the link with underlying VR system and free all attached resources.
|
java.lang.Object |
getCompositor()
Get the object that wraps natively the VR compositor.
|
int |
getDisplayFrequency()
Get the Head Mounted Device (HMD) display frequency.
|
Matrix4f |
getHMDMatrixPoseLeftEye()
Returns the transform between the view space and left eye space.
|
Matrix4f |
getHMDMatrixPoseRightEye()
Returns the transform between the view space and right eye space.
|
Matrix4f |
getHMDMatrixProjectionLeftEye(Camera cam)
Get the Head Mounted Device (HMD) left eye projection matrix.
|
Matrix4f |
getHMDMatrixProjectionRightEye(Camera cam)
Get the Head Mounted Device (HMD) right eye projection matrix.
|
Vector3f |
getHMDVectorPoseLeftEye()
Get the Head Mounted Device (HMD) left eye pose (position of the eye from the head) as a
vector . |
Vector3f |
getHMDVectorPoseRightEye()
Get the Head Mounted Device (HMD) right eye pose (position of the eye from the head) as a
vector . |
float |
getInterpupillaryDistance()
Get the Head Mounted Device (HMD) interpupilar distance in meters.
|
java.lang.String |
getName()
Get the name of the underlying VR system.
|
Quaternion |
getOrientation()
Get the Head Mounted Device (HMD) orientation.
|
Vector3f |
getPosition()
Get the Head Mounted Device (HMD) position.
|
void |
getPositionAndOrientation(Vector3f storePos,
Quaternion storeRot)
Get the Head Mounted Device (HMD) position and orientation.
|
void |
getRenderSize(Vector2f store)
Get the size of a Head Mounted Device (HMD) rendering area in pixels.
|
Vector3f |
getSeatedToAbsolutePosition()
Get the seated to absolute position.
|
HmdType |
getType()
Get the Head Mounted Device (HMD) type.
|
VRInputAPI |
getVRinput()
Get the input provided by the underlying VR system.
|
java.lang.Object |
getVRSystem()
Get the object that wraps natively the VR system.
|
boolean |
initialize()
Initialize this object from a VR system.
|
boolean |
initVRCompositor(boolean allowed)
Initialize the VR compositor that will be used for rendering.
|
boolean |
isInitialized()
Check if the VR API is initialized.
|
void |
printLatencyInfoToConsole(boolean set)
Set if latency information has to be logged.
|
void |
reset()
Reset the VR system.
|
void |
setFlipEyes(boolean set)
Flip the left and right eye.
|
void |
updatePose()
Update Head Mounted Device (HMD) pose internal storage.
|
boolean initialize()
true
if the initialization is a success and false
otherwise.boolean initVRCompositor(boolean allowed)
allowed
- true
if the use of VR compositor is allowed and false
otherwise.true
if the initialization is a success and false
otherwise.java.lang.Object getVRSystem()
java.lang.Object getCompositor()
java.lang.String getName()
VRInputAPI getVRinput()
void setFlipEyes(boolean set)
set
- true
if the eyes has to be flipped and false
otherwise.void printLatencyInfoToConsole(boolean set)
set
- true
if latency information has to be logged and false
otherwise.int getDisplayFrequency()
void destroy()
boolean isInitialized()
true
if the VR API is initialized and false
otherwise.initialize()
void reset()
void getRenderSize(Vector2f store)
store
- the size of a Head Mounted Device (HMD) rendering area in pixels (modified).float getInterpupillaryDistance()
Quaternion getOrientation()
Vector3f getPosition()
void getPositionAndOrientation(Vector3f storePos, Quaternion storeRot)
storePos
- the Head Mounted Device (HMD) position (modified).storeRot
- the Head Mounted Device (HMD) rotation (modified).void updatePose()
Matrix4f getHMDMatrixProjectionLeftEye(Camera cam)
cam
- the camera attached to the left eye.Matrix4f getHMDMatrixProjectionRightEye(Camera cam)
cam
- the camera attached to the right eye.Vector3f getHMDVectorPoseLeftEye()
vector
.vector
.Vector3f getHMDVectorPoseRightEye()
vector
.vector
.Matrix4f getHMDMatrixPoseLeftEye()
Matrix4f getHMDMatrixPoseRightEye()
HmdType getType()
Vector3f getSeatedToAbsolutePosition()