| Modifier and Type | Field and Description |
|---|---|
static byte[] |
defaultJString
The default J String.
|
static int |
EYE_LEFT
The left eye index.
|
static com.ochafik.lang.jnaerator.runtime.NativeSize |
EYE_LEFT_SIZE
The size of the left eye.
|
static int |
EYE_RIGHT
The right eye index.
|
static com.ochafik.lang.jnaerator.runtime.NativeSize |
EYE_RIGHT_SIZE
The size of the right eye.
|
static int |
FIRST_VIEWER
The first viewer index.
|
static byte[] |
OpenGLString
The default OpenGL String.
|
| Constructor and Description |
|---|
OSVR(VREnvironment environment)
Create a new OSVR system attached to the given
VR environment. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Close the link with underlying VR system and free all attached resources.
|
com.sun.jna.Pointer |
getCompositor()
Get the object that wraps natively the VR compositor.
|
int |
getDisplayFrequency()
Get the Head Mounted Device (HMD) display frequency.
|
void |
getEyeInfo()
Read and update the eye info from the underlying OSVR system.
|
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.
|
OsvrClientKitLibrary.OSVR_ClientContext |
getVRSystem()
Get the object that wraps natively the VR system.
|
void |
grabGLFWContext()
Grab the current GLFW context.
|
boolean |
handleRenderBufferPresent(OSVR_ViewportDescription.ByValue leftView,
OSVR_ViewportDescription.ByValue rightView,
OSVR_RenderBufferOpenGL.ByValue leftBuffer,
OSVR_RenderBufferOpenGL.ByValue rightBuffer)
Access to the underlying OSVR structures.
|
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..
|
boolean |
shareContext()
Enable context sharing.
|
void |
updatePose()
Update Head Mounted Device (HMD) pose internal storage.
|
public static final int FIRST_VIEWER
public static final int EYE_LEFT
public static final int EYE_RIGHT
public static final com.ochafik.lang.jnaerator.runtime.NativeSize EYE_LEFT_SIZE
public static final com.ochafik.lang.jnaerator.runtime.NativeSize EYE_RIGHT_SIZE
public static byte[] defaultJString
public static byte[] OpenGLString
public OSVR(VREnvironment environment)
VR environment.environment - the VR environment to which the input is attached.public boolean handleRenderBufferPresent(OSVR_ViewportDescription.ByValue leftView, OSVR_ViewportDescription.ByValue rightView, OSVR_RenderBufferOpenGL.ByValue leftBuffer, OSVR_RenderBufferOpenGL.ByValue rightBuffer)
leftView - the left viewport.rightView - the right viewport.leftBuffer - the left buffer.rightBuffer - the right buffer.true if the structure are accessible and false otherwise.public boolean initialize()
VRAPIinitialize in interface VRAPItrue if the initialization is a success and false otherwise.public void grabGLFWContext()
public boolean shareContext()
true if the context is successfully shared and false otherwise.public boolean initVRCompositor(boolean allowed)
VRAPIinitVRCompositor in interface VRAPIallowed - true if the use of VR compositor is allowed and false otherwise.true if the initialization is a success and false otherwise.public OsvrClientKitLibrary.OSVR_ClientContext getVRSystem()
VRAPIgetVRSystem in interface VRAPIpublic com.sun.jna.Pointer getCompositor()
VRAPIgetCompositor in interface VRAPIpublic java.lang.String getName()
VRAPIpublic VRInputAPI getVRinput()
VRAPIgetVRinput in interface VRAPIpublic void setFlipEyes(boolean set)
VRAPIsetFlipEyes in interface VRAPIset - true if the eyes has to be flipped and false otherwise.public void printLatencyInfoToConsole(boolean set)
VRAPIprintLatencyInfoToConsole in interface VRAPIset - true if latency information has to be logged and false otherwise.public int getDisplayFrequency()
VRAPIgetDisplayFrequency in interface VRAPIpublic void destroy()
VRAPIpublic boolean isInitialized()
VRAPIisInitialized in interface VRAPItrue if the VR API is initialized and false otherwise.VRAPI.initialize()public void reset()
VRAPIpublic void getRenderSize(Vector2f store)
VRAPIgetRenderSize in interface VRAPIstore - the size of a Head Mounted Device (HMD) rendering area in pixels (modified).public void getEyeInfo()
public float getInterpupillaryDistance()
VRAPIgetInterpupillaryDistance in interface VRAPIpublic Quaternion getOrientation()
VRAPIgetOrientation in interface VRAPIpublic Vector3f getPosition()
VRAPIgetPosition in interface VRAPIpublic void getPositionAndOrientation(Vector3f storePos, Quaternion storeRot)
VRAPIgetPositionAndOrientation in interface VRAPIstorePos - the Head Mounted Device (HMD) position (modified).storeRot - the Head Mounted Device (HMD) rotation (modified).public void updatePose()
VRAPIupdatePose in interface VRAPIpublic Matrix4f getHMDMatrixProjectionLeftEye(Camera cam)
VRAPIgetHMDMatrixProjectionLeftEye in interface VRAPIcam - the camera attached to the left eye.public Matrix4f getHMDMatrixProjectionRightEye(Camera cam)
VRAPIgetHMDMatrixProjectionRightEye in interface VRAPIcam - the camera attached to the right eye.public Vector3f getHMDVectorPoseLeftEye()
VRAPIvector.getHMDVectorPoseLeftEye in interface VRAPIvector.public Vector3f getHMDVectorPoseRightEye()
VRAPIvector.getHMDVectorPoseRightEye in interface VRAPIvector.public Vector3f getSeatedToAbsolutePosition()
VRAPIgetSeatedToAbsolutePosition in interface VRAPIpublic Matrix4f getHMDMatrixPoseLeftEye()
VRAPIgetHMDMatrixPoseLeftEye in interface VRAPIpublic Matrix4f getHMDMatrixPoseRightEye()
VRAPIgetHMDMatrixPoseRightEye in interface VRAPI