MinVR
0.9.0
A multi-platform virtual reality library
|
Public Member Functions | |
CameraOffAxis (glm::vec3 topLeft, glm::vec3 topRight, glm::vec3 botLeft, glm::vec3 botRight, glm::mat4 initialHeadFrame, double interOcularDistance, double nearClipDist, double farClipDist) | |
virtual | ~CameraOffAxis () |
virtual void | updateHeadTrackingFrame (glm::mat4 newHeadFrame) |
Updates the camera's current head position. More... | |
virtual void | applyProjectionAndCameraMatrices () |
Sets the openGL matrices. More... | |
virtual void | applyProjectionAndCameraMatricesForLeftEye () |
Sets the openGL matrices. More... | |
virtual void | applyProjectionAndCameraMatricesForRightEye () |
Sets the openGL matrices. More... | |
virtual void | setObjectToWorldMatrix (glm::mat4 obj2World) |
Sets the object to world matrix. More... | |
glm::mat4 | getLeftEyeFrame () |
Gets the current location of the left eye. More... | |
glm::mat4 | getRightEyeFrame () |
Gets the current location of the right eye. More... | |
Public Member Functions inherited from MinVR::AbstractCamera | |
AbstractCamera () | |
virtual | ~AbstractCamera () |
Protected Member Functions | |
virtual void | applyProjectionAndCameraMatrices (const glm::mat4 &projectionMat, const glm::mat4 &viewMat) |
glm::mat4 | invertYMat () |
glm::mat4 | perspectiveProjection (double left, double right, double bottom, double top, double nearval, double farval, float upDirection=-1.0) |
Protected Attributes | |
glm::vec3 | _topLeft |
glm::vec3 | _topRight |
glm::vec3 | _botLeft |
glm::vec3 | _botRight |
glm::mat4 | _headFrame |
double | _iod |
double | _nearClip |
double | _farClip |
double | _halfWidth |
double | _halfHeight |
glm::mat4 | _room2tile |
glm::mat4 | _projection |
glm::mat4 | _projectionLeft |
glm::mat4 | _projectionRight |
glm::mat4 | _view |
glm::mat4 | _viewLeft |
glm::mat4 | _viewRight |
glm::mat4 | _object2World |
glm::mat4 | _currentViewMatrix |
An offaxis VR camera
This derived class represents an offaxis view frustrum. It should be used head tracking in front of a flat display tile or in a VR CAVE.
MinVR::CameraOffAxis::CameraOffAxis | ( | glm::vec3 | topLeft, |
glm::vec3 | topRight, | ||
glm::vec3 | botLeft, | ||
glm::vec3 | botRight, | ||
glm::mat4 | initialHeadFrame, | ||
double | interOcularDistance, | ||
double | nearClipDist, | ||
double | farClipDist | ||
) |
|
virtual |
|
virtual |
This method sets the openGL projection and modelview matrices as if the camera is centered between the eyes. This is used for mono rendering.
Implements MinVR::AbstractCamera.
|
protectedvirtual |
|
virtual |
This method sets the openGL projection and modelview matrices as if the camera is located at the left eye. This is used for stereoscopic rendering.
Implements MinVR::AbstractCamera.
|
virtual |
This method sets the openGL projection and modelview matrices as if the camera is located at the right eye. This is used for stereoscopic rendering.
Implements MinVR::AbstractCamera.
glm::mat4 MinVR::CameraOffAxis::getLeftEyeFrame | ( | ) |
Based on the current head position and interocular distance, this returns the left eye position
glm::mat4 MinVR::CameraOffAxis::getRightEyeFrame | ( | ) |
Based on the current head position and interocular distance, this returns the right eye position
|
protected |
|
protected |
|
virtual |
This method sets the transformation between the current object (model) space and world (room) coordinate system. It is used when setting the opengl modelview matrix.
Implements MinVR::AbstractCamera.
|
virtual |
This method is called by the MVREngine to update the current head position. It also recalculates the current offaxis projection matrix based on the head position and modelview matrix.
[in] | The | new head position. |
Implements MinVR::AbstractCamera.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |