Package com.jme3.input.vr
Interface VRAPI
- All Known Implementing Classes:
- LWJGLOpenVR,- OculusVR,- OpenVR
public interface VRAPI
An interface that represents a VR system. This interface has to be implemented in order to wrap underlying VR system (OpenVR, OculusVR, ...)
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroy()Close the link with underlying VR system and free all attached resources.Get the object that wraps natively the VR compositor.intGet the Head Mounted Device (HMD) display frequency.Returns the transform between the view space and left eye space.Returns the transform between the view space and right eye space.Get the Head Mounted Device (HMD) left eye projection matrix.Get the Head Mounted Device (HMD) right eye projection matrix.Get the Head Mounted Device (HMD) left eye pose (position of the eye from the head) as avector.Get the Head Mounted Device (HMD) right eye pose (position of the eye from the head) as avector.floatGet the Head Mounted Device (HMD) interpupilar distance in meters.getName()Get the name of the underlying VR system.Get the Head Mounted Device (HMD) orientation.Get the Head Mounted Device (HMD) position.voidgetPositionAndOrientation(Vector3f storePos, Quaternion storeRot) Get the Head Mounted Device (HMD) position and orientation.voidgetRenderSize(Vector2f store) Get the size of a Head Mounted Device (HMD) rendering area in pixels.Get the seated to absolute position.getType()Get the Head Mounted Device (HMD) type.Get the input provided by the underlying VR system.Get the object that wraps natively the VR system.booleanInitialize this object from a VR system.booleaninitVRCompositor(boolean allowed) Initialize the VR compositor that will be used for rendering.booleanCheck if the VR API is initialized.voidprintLatencyInfoToConsole(boolean set) Set if latency information has to be logged.voidreset()Reset the VR system.voidsetFlipEyes(boolean set) Flip the left and right eye.voidUpdate Head Mounted Device (HMD) pose internal storage.
- 
Method Details- 
initializeboolean initialize()Initialize this object from a VR system. All the native bindings to underlying VR system should be done within this method.- Returns:
- trueif the initialization is a success and- falseotherwise.
 
- 
initVRCompositorboolean initVRCompositor(boolean allowed) Initialize the VR compositor that will be used for rendering.- Parameters:
- allowed-- trueif the use of VR compositor is allowed and- falseotherwise.
- Returns:
- trueif the initialization is a success and- falseotherwise.
 
- 
getVRSystemObject getVRSystem()Get the object that wraps natively the VR system.- Returns:
- the object that wraps natively the VR system.
 
- 
getCompositorObject getCompositor()Get the object that wraps natively the VR compositor.- Returns:
- the object that wraps natively the VR system.
 
- 
getNameString getName()Get the name of the underlying VR system.- Returns:
- the name of the underlying VR system.
 
- 
getVRinputVRInputAPI getVRinput()Get the input provided by the underlying VR system.- Returns:
- the input provided by the underlying VR system.
 
- 
setFlipEyesvoid setFlipEyes(boolean set) Flip the left and right eye.- Parameters:
- set-- trueif the eyes has to be flipped and- falseotherwise.
 
- 
printLatencyInfoToConsolevoid printLatencyInfoToConsole(boolean set) Set if latency information has to be logged.- Parameters:
- set-- trueif latency information has to be logged and- falseotherwise.
 
- 
getDisplayFrequencyint getDisplayFrequency()Get the Head Mounted Device (HMD) display frequency.- Returns:
- the Head Mounted Device (HMD) display frequency.
 
- 
destroyvoid destroy()Close the link with underlying VR system and free all attached resources.
- 
isInitializedboolean isInitialized()Check if the VR API is initialized.- Returns:
- trueif the VR API is initialized and- falseotherwise.
- See Also:
 
- 
resetvoid reset()Reset the VR system. After a call to this method, the current position of the HMD should be the origin (i-e the observer without any combined transformation).
- 
getRenderSizeGet the size of a Head Mounted Device (HMD) rendering area in pixels.- Parameters:
- store- the size of a Head Mounted Device (HMD) rendering area in pixels (modified).
 
- 
getInterpupillaryDistancefloat getInterpupillaryDistance()Get the Head Mounted Device (HMD) interpupilar distance in meters.- Returns:
- the Head Mounted Device (HMD) interpupilar distance in meters.
 
- 
getOrientationQuaternion getOrientation()Get the Head Mounted Device (HMD) orientation.- Returns:
- the Head Mounted Device (HMD) orientation.
 
- 
getPositionVector3f getPosition()Get the Head Mounted Device (HMD) position.- Returns:
- the Head Mounted Device (HMD) orientation.
 
- 
getPositionAndOrientationGet the Head Mounted Device (HMD) position and orientation.- Parameters:
- storePos- the Head Mounted Device (HMD) position (modified).
- storeRot- the Head Mounted Device (HMD) rotation (modified).
 
- 
updatePosevoid updatePose()Update Head Mounted Device (HMD) pose internal storage. This method should be called before other calls to HMD position/orientation access.
- 
getHMDMatrixProjectionLeftEyeGet the Head Mounted Device (HMD) left eye projection matrix.- Parameters:
- cam- the camera attached to the left eye.
- Returns:
- the Head Mounted Device (HMD) left eye projection matrix.
 
- 
getHMDMatrixProjectionRightEyeGet the Head Mounted Device (HMD) right eye projection matrix.- Parameters:
- cam- the camera attached to the right eye.
- Returns:
- the Head Mounted Device (HMD) right eye projection matrix.
 
- 
getHMDVectorPoseLeftEyeVector3f getHMDVectorPoseLeftEye()Get the Head Mounted Device (HMD) left eye pose (position of the eye from the head) as avector.- Returns:
- the Head Mounted Device (HMD) left eye pose as a vector.
 
- 
getHMDVectorPoseRightEyeVector3f getHMDVectorPoseRightEye()Get the Head Mounted Device (HMD) right eye pose (position of the eye from the head) as avector.- Returns:
- the Head Mounted Device (HMD) right eye pose as a vector.
 
- 
getHMDMatrixPoseLeftEyeMatrix4f getHMDMatrixPoseLeftEye()Returns the transform between the view space and left eye space. Eye space is the per-eye flavor of view space that provides stereo disparity. Instead of Model * View * Projection the model is Model * View * Eye * Projection. Normally View and Eye will be multiplied together and treated as View. This matrix incorporates the user's interpupillary distance (IPD).- Returns:
- the transform between the view space and eye space.
 
- 
getHMDMatrixPoseRightEyeMatrix4f getHMDMatrixPoseRightEye()Returns the transform between the view space and right eye space. Eye space is the per-eye flavor of view space that provides stereo disparity. Instead of Model * View * Projection the model is Model * View * Eye * Projection. Normally View and Eye will be multiplied together and treated as View. This matrix incorporates the user's interpupillary distance (IPD).- Returns:
- the transform between the view space and eye space.
 
- 
getTypeHmdType getType()Get the Head Mounted Device (HMD) type.- Returns:
- the Head Mounted Device (HMD) type.
 
- 
getSeatedToAbsolutePositionVector3f getSeatedToAbsolutePosition()Get the seated to absolute position.- Returns:
- the seated to absolute position.
 
 
-