SurgSim::Devices::OculusDisplaySettings Class Reference

A customized osg::DisplaySettings, to be used with Oculus device. More...

`#include <SurgSim/Devices/Oculus/OculusDisplaySettings.h>`

Inheritance diagram for SurgSim::Devices::OculusDisplaySettings:

## 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...

## Detailed Description

A customized osg::DisplaySettings, to be used with Oculus device.

It passes customized projection matrices to OSG for rendering.

## Constructor & Destructor Documentation

## OculusDisplaySettings() [1/2]

SurgSim::Devices::OculusDisplaySettings::OculusDisplaySettings | ( |  | ) |

Constructor.

## OculusDisplaySettings() [2/2]

SurgSim::Devices::OculusDisplaySettings::OculusDisplaySettings | ( | const osg::DisplaySettings * | displaySettings | ) |

explicit

Constructor.

Parameters

  displaySettings | An instance of osg::DisplaySettings

## Member Function Documentation

## computeLeftEyeProjectionImplementation()

osg::Matrixd SurgSim::Devices::OculusDisplaySettings::computeLeftEyeProjectionImplementation | ( | const osg::Matrixd & |  | ) | const

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.

## computeRightEyeProjectionImplementation()

osg::Matrixd SurgSim::Devices::OculusDisplaySettings::computeRightEyeProjectionImplementation | ( | const osg::Matrixd & |  | ) | const

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.

## getLeftEyeProjectionMatrix()

SurgSim::Math::Matrix44d SurgSim::Devices::OculusDisplaySettings::getLeftEyeProjectionMatrix | ( |  | ) | const

Get the projection matrix of the left eye.

Returns
  Projection matrix for left eye

## getRightEyeProjectionMatrix()

SurgSim::Math::Matrix44d SurgSim::Devices::OculusDisplaySettings::getRightEyeProjectionMatrix | ( |  | ) | const

Get the projection matrix of the right eye.

Returns
  Projection matrix for right eye

## setLeftEyeProjectionMatrix()

void SurgSim::Devices::OculusDisplaySettings::setLeftEyeProjectionMatrix | ( | const SurgSim::Math::Matrix44d & | matrix | ) |

Set the projection matrix of the left eye.

Parameters

  matrix | Projection matrix for left eye

## setRightEyeProjectionMatrix()

void SurgSim::Devices::OculusDisplaySettings::setRightEyeProjectionMatrix | ( | const SurgSim::Math::Matrix44d & | matrix | ) |

Set the projection matrix of the right eye.

Parameters

  matrix | Projection matrix for right eye

## Member Data Documentation

## m_leftEyeProjectionMatrix

osg::Matrixd SurgSim::Devices::OculusDisplaySettings::m_leftEyeProjectionMatrix

private

Left eye projection matrix.

## m_rightEyeProjectionMatrix

osg::Matrixd SurgSim::Devices::OculusDisplaySettings::m_rightEyeProjectionMatrix

private

Right eye projection matrix.

The documentation for this class was generated from the following files:

- SurgSim/Devices/Oculus/OculusDisplaySettings.h
- SurgSim/Devices/Oculus/OculusDisplaySettings.cpp