|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.device.input.vfx.VFXDriver
public class VFXDriver
Class which implements a global driver interface for the VFX3D handling.
The code forms the interface to the native underlying libraries. When using the HMD in stereo mode the calls should be made to this library before initializing Java3D, and after you have closed everything down.
The assumption is that there is only one HMD attached to the system at a time, and that in doing so, the application has all the control over the class. A singleton is provided to avoid messy issues with needing to track how many enables and disables have been called when dealing with the native library.
Reading tracker data is a polling only operation. It is typically fast enough that it can be used within a tight render loop and does not need external asynchronous handling.
Method Summary | |
---|---|
void |
disableStereo()
Disable the stereo output now. |
void |
enableStereo(boolean isDirect3D)
Enable the VFX driver for a specific type of renderer. |
void |
getTrackerPosition(float[] orientation)
Fetch the current tracking position from the HMD. |
static VFXDriver |
getVFXDriver()
Get hold of the single global instance of this driver. |
boolean |
isDeviceActive()
Check to see if the device has been previously shut down. |
void |
resetZeroPosition()
Reset the zero position of the tracker to be it's current orientation. |
void |
shutdownDevice()
Shut down the entire device now. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static VFXDriver getVFXDriver()
public void enableStereo(boolean isDirect3D) throws java.lang.IllegalStateException
isDirect3D
- True if the application is running on the D3D version
java.lang.IllegalStateException
- The device has been shut down or the
device is currently enabledpublic void disableStereo() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- The device has been shut downpublic void resetZeroPosition() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- The device has been shut downpublic void getTrackerPosition(float[] orientation) throws java.lang.IllegalStateException
orientation
- The array to copy the location information into
java.lang.IllegalStateException
- The device has been shut downpublic boolean isDeviceActive()
public void shutdownDevice() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- The device has been shut down
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |