![]() |
A customized osg::DisplaySettings, to be used with Oculus device. More...
#include <SurgSim/Devices/Oculus/OculusDisplaySettings.h>
Public Member Functions | |
OculusDisplaySettings () | |
Constructor. More... | |
OculusDisplaySettings (const osg::DisplaySettings *displaySettings) | |
Constructor. More... | |
void | setLeftEyeProjectionMatrix (const SurgSim::Math::Matrix44d &matrix) |
Set the projection matrix of the left eye. More... | |
SurgSim::Math::Matrix44d | getLeftEyeProjectionMatrix () const |
Get the projection matrix of the left eye. More... | |
void | setRightEyeProjectionMatrix (const SurgSim::Math::Matrix44d &matrix) |
Set the projection matrix of the right eye. More... | |
SurgSim::Math::Matrix44d | getRightEyeProjectionMatrix () const |
Get the projection matrix of the right eye. More... | |
osg::Matrixd | computeLeftEyeProjectionImplementation (const osg::Matrixd &) const override |
This method returns the projection matrix set by setLeftEyeProjectionMatrix() method. More... | |
osg::Matrixd | computeRightEyeProjectionImplementation (const osg::Matrixd &) const override |
This method returns the projection matrix set by setRighttEyeProjectionMatrix() method. More... | |
Private Attributes | |
osg::Matrixd | m_leftEyeProjectionMatrix |
Left eye projection matrix. More... | |
osg::Matrixd | m_rightEyeProjectionMatrix |
Right eye projection matrix. More... | |
A customized osg::DisplaySettings, to be used with Oculus device.
It passes customized projection matrices to OSG for rendering.
SurgSim::Devices::OculusDisplaySettings::OculusDisplaySettings | ( | ) |
Constructor.
|
explicit |
Constructor.
displaySettings | An instance of osg::DisplaySettings |
|
override |
This method returns the projection matrix set by setLeftEyeProjectionMatrix() method.
OSG calls this overriding function to get the left eye projection matrix to use. The parameter passed in is NOT used.
|
override |
This method returns the projection matrix set by setRighttEyeProjectionMatrix() method.
OSG calls this overiding function to get the right eye projection matrix to use. The parameter passed in is NOT used.
SurgSim::Math::Matrix44d SurgSim::Devices::OculusDisplaySettings::getLeftEyeProjectionMatrix | ( | ) | const |
Get the projection matrix of the left eye.
SurgSim::Math::Matrix44d SurgSim::Devices::OculusDisplaySettings::getRightEyeProjectionMatrix | ( | ) | const |
Get the projection matrix of the right eye.
void SurgSim::Devices::OculusDisplaySettings::setLeftEyeProjectionMatrix | ( | const SurgSim::Math::Matrix44d & | matrix | ) |
Set the projection matrix of the left eye.
matrix | Projection matrix for left eye |
void SurgSim::Devices::OculusDisplaySettings::setRightEyeProjectionMatrix | ( | const SurgSim::Math::Matrix44d & | matrix | ) |
Set the projection matrix of the right eye.
matrix | Projection matrix for right eye |
|
private |
Left eye projection matrix.
|
private |
Right eye projection matrix.