#include <ogre_oculus.h>
Public Member Functions | |
Ogre::Camera * | getCamera (unsigned int i) |
Retrieve either of the two cameras. | |
Ogre::SceneNode * | getCameraNode () |
Retrieve the SceneNode that contains the two cameras used for stereo rendering. | |
float | getCentreOffset () const |
Retrieve the projection centre offset. | |
Ogre::CompositorInstance * | getCompositor (unsigned int i) |
Retrieve either of the two distortion compositors. | |
const OVR::HMDDevice * | getHMDDevice () |
Ogre::Quaternion | getOrientation () const |
Retrieve the current orientation of the Oculus HMD. | |
Ogre::Viewport * | getViewport (unsigned int i) |
Retrieve either of the two viewports. | |
bool | isMagCalibrated () |
Get status of mag calibration. | |
bool | isOculusReady () const |
bool | isOgreReady () const |
Oculus (void) | |
void | resetOrientation () |
Reset orientation of the sensor. | |
void | setPredictionDt (float dt) |
Set motion prediction time window (0 to disable) | |
bool | setupOculus () |
bool | setupOgre (Ogre::SceneManager *sm, Ogre::RenderWindow *win, Ogre::SceneNode *parent=0) |
void | shutDownOculus () |
void | shutDownOgre () |
void | update () |
Update camera node using current Oculus orientation. | |
void | updateProjectionMatrices () |
Re-create projection matrices based on camera parameters. | |
~Oculus (void) | |
Protected Attributes | |
Ogre::SceneNode * | m_cameraNode |
Ogre::Camera * | m_cameras [2] |
Projection centre offset. | |
float | m_centreOffset |
Ogre::CompositorInstance * | m_compositors [2] |
OVR::DeviceManager * | m_deviceManager |
OVR::HMDDevice * | m_hmd |
OVR::Util::MagCalibration * | m_magCalibration |
bool | m_oculusReady |
bool | m_ogreReady |
Has the oculus rift been fully initialised? | |
Ogre::Quaternion | m_orientation |
Ogre::SceneManager * | m_sceneManager |
Has ogre been fully initialised? | |
OVR::SensorDevice * | m_sensor |
OVR::SensorFusion * | m_sensorFusion |
OVR::Util::Render::StereoConfig * | m_stereoConfig |
Ogre::Viewport * | m_viewports [2] |
Ogre::RenderWindow * | m_window |
Definition at line 51 of file ogre_oculus.h.
oculus_rviz_plugins::Oculus::Oculus | ( | void | ) |
Definition at line 39 of file ogre_oculus.cpp.
oculus_rviz_plugins::Oculus::~Oculus | ( | void | ) |
Definition at line 51 of file ogre_oculus.cpp.
Ogre::Camera* oculus_rviz_plugins::Oculus::getCamera | ( | unsigned int | i | ) | [inline] |
Retrieve either of the two cameras.
Definition at line 79 of file ogre_oculus.h.
Ogre::SceneNode * oculus_rviz_plugins::Oculus::getCameraNode | ( | ) |
Retrieve the SceneNode that contains the two cameras used for stereo rendering.
Definition at line 306 of file ogre_oculus.cpp.
float oculus_rviz_plugins::Oculus::getCentreOffset | ( | ) | const |
Retrieve the projection centre offset.
Definition at line 337 of file ogre_oculus.cpp.
Ogre::CompositorInstance * oculus_rviz_plugins::Oculus::getCompositor | ( | unsigned int | i | ) |
Retrieve either of the two distortion compositors.
Definition at line 332 of file ogre_oculus.cpp.
const OVR::HMDDevice* oculus_rviz_plugins::Oculus::getHMDDevice | ( | ) | [inline] |
Definition at line 93 of file ogre_oculus.h.
Ogre::Quaternion oculus_rviz_plugins::Oculus::getOrientation | ( | ) | const |
Retrieve the current orientation of the Oculus HMD.
Definition at line 319 of file ogre_oculus.cpp.
Ogre::Viewport* oculus_rviz_plugins::Oculus::getViewport | ( | unsigned int | i | ) | [inline] |
Retrieve either of the two viewports.
Definition at line 85 of file ogre_oculus.h.
Get status of mag calibration.
Definition at line 301 of file ogre_oculus.cpp.
bool oculus_rviz_plugins::Oculus::isOculusReady | ( | ) | const |
Definition at line 120 of file ogre_oculus.cpp.
bool oculus_rviz_plugins::Oculus::isOgreReady | ( | ) | const |
Definition at line 125 of file ogre_oculus.cpp.
Reset orientation of the sensor.
Definition at line 342 of file ogre_oculus.cpp.
void oculus_rviz_plugins::Oculus::setPredictionDt | ( | float | dt | ) |
Set motion prediction time window (0 to disable)
Definition at line 311 of file ogre_oculus.cpp.
Definition at line 130 of file ogre_oculus.cpp.
bool oculus_rviz_plugins::Oculus::setupOgre | ( | Ogre::SceneManager * | sm, |
Ogre::RenderWindow * | win, | ||
Ogre::SceneNode * | parent = 0 |
||
) |
Definition at line 186 of file ogre_oculus.cpp.
Definition at line 57 of file ogre_oculus.cpp.
Definition at line 88 of file ogre_oculus.cpp.
void oculus_rviz_plugins::Oculus::update | ( | ) |
Update camera node using current Oculus orientation.
Definition at line 284 of file ogre_oculus.cpp.
Re-create projection matrices based on camera parameters.
Definition at line 269 of file ogre_oculus.cpp.
Ogre::SceneNode* oculus_rviz_plugins::Oculus::m_cameraNode [protected] |
Definition at line 118 of file ogre_oculus.h.
Ogre::Camera* oculus_rviz_plugins::Oculus::m_cameras[2] [protected] |
Projection centre offset.
Definition at line 121 of file ogre_oculus.h.
float oculus_rviz_plugins::Oculus::m_centreOffset [protected] |
Definition at line 120 of file ogre_oculus.h.
Ogre::CompositorInstance* oculus_rviz_plugins::Oculus::m_compositors[2] [protected] |
Definition at line 123 of file ogre_oculus.h.
Definition at line 108 of file ogre_oculus.h.
OVR::HMDDevice* oculus_rviz_plugins::Oculus::m_hmd [protected] |
Definition at line 109 of file ogre_oculus.h.
Definition at line 111 of file ogre_oculus.h.
bool oculus_rviz_plugins::Oculus::m_oculusReady [protected] |
Definition at line 114 of file ogre_oculus.h.
bool oculus_rviz_plugins::Oculus::m_ogreReady [protected] |
Has the oculus rift been fully initialised?
Definition at line 115 of file ogre_oculus.h.
Ogre::Quaternion oculus_rviz_plugins::Oculus::m_orientation [protected] |
Definition at line 119 of file ogre_oculus.h.
Ogre::SceneManager* oculus_rviz_plugins::Oculus::m_sceneManager [protected] |
Has ogre been fully initialised?
Definition at line 116 of file ogre_oculus.h.
OVR::SensorDevice* oculus_rviz_plugins::Oculus::m_sensor [protected] |
Definition at line 112 of file ogre_oculus.h.
Definition at line 113 of file ogre_oculus.h.
Definition at line 110 of file ogre_oculus.h.
Ogre::Viewport* oculus_rviz_plugins::Oculus::m_viewports[2] [protected] |
Definition at line 122 of file ogre_oculus.h.
Ogre::RenderWindow* oculus_rviz_plugins::Oculus::m_window [protected] |
Definition at line 117 of file ogre_oculus.h.