#include <Camera.h>
Public Member Functions | |
CameraStereo () | |
CameraStereo (int pixelWidth, int pixelHeight, float fov) | |
CameraStereo (int pixelWidth, int pixelHeight, float fov, float nearPlane, float farPlane) | |
float | getConvergence () const |
Returns the current convergence, which is the distance at which there is no parallax. More... | |
void | setConvergence (float distance, bool adjustEyeSeparation=false) |
Sets the convergence of the camera, which is the distance at which there is no parallax. More... | |
float | getEyeSeparation () const |
Returns the distance between the camera's for the left and right eyes. More... | |
void | setEyeSeparation (float distance) |
Sets the distance between the camera's for the left and right eyes. This affects the parallax effect. More... | |
Vec3f | getEyePointShifted () const |
Returns the location of the currently enabled eye camera. More... | |
void | enableStereoLeft () |
Enables the left eye camera. More... | |
bool | isStereoLeftEnabled () const |
void | enableStereoRight () |
Enables the right eye camera. More... | |
bool | isStereoRightEnabled () const |
void | disableStereo () |
Disables stereoscopic rendering, converting the camera to a standard CameraPersp. More... | |
bool | isStereoEnabled () const |
virtual void | getNearClipCoordinates (Vec3f *topLeft, Vec3f *topRight, Vec3f *bottomLeft, Vec3f *bottomRight) const |
virtual void | getFarClipCoordinates (Vec3f *topLeft, Vec3f *topRight, Vec3f *bottomLeft, Vec3f *bottomRight) const |
virtual const Matrix44f & | getProjectionMatrix () const |
virtual const Matrix44f & | getModelViewMatrix () const |
virtual const Matrix44f & | getInverseModelViewMatrix () const |
void | setPerspective (float verticalFovDegrees, float aspectRatio, float nearPlane, float farPlane) |
void | getLensShift (float *horizontal, float *vertical) const |
Vec2f | getLensShift () const |
void | setLensShift (float horizontal, float vertical) |
void | setLensShift (const Vec2f &shift) |
float | getLensShiftHorizontal () const |
Returns the horizontal lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport. More... | |
void | setLensShiftHorizontal (float horizontal) |
float | getLensShiftVertical () const |
Returns the vertical lens shift. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport. More... | |
void | setLensShiftVertical (float vertical) |
virtual bool | isPersp () const |
Returns whether the camera represents a perspective projection instead of an orthographic. More... | |
CameraPersp | getFrameSphere (const class Sphere &worldSpaceSphere, int maxIterations=20) const |
Vec3f | getEyePoint () const |
void | setEyePoint (const Vec3f &aEyePoint) |
float | getCenterOfInterest () const |
void | setCenterOfInterest (float aCenterOfInterest) |
Vec3f | getCenterOfInterestPoint () const |
void | setCenterOfInterestPoint (const Vec3f ¢erOfInterestPoint) |
Vec3f | getWorldUp () const |
void | setWorldUp (const Vec3f &aWorldUp) |
void | lookAt (const Vec3f &target) |
void | lookAt (const Vec3f &aEyePoint, const Vec3f &target) |
void | lookAt (const Vec3f &aEyePoint, const Vec3f &target, const Vec3f &aUp) |
Vec3f | getViewDirection () const |
void | setViewDirection (const Vec3f &aViewDirection) |
Quatf | getOrientation () const |
void | setOrientation (const Quatf &aOrientation) |
float | getFov () const |
void | setFov (float aFov) |
float | getFovHorizontal () const |
void | setFovHorizontal (float aFov) |
float | getAspectRatio () const |
void | setAspectRatio (float aAspectRatio) |
float | getNearClip () const |
void | setNearClip (float aNearClip) |
float | getFarClip () const |
void | setFarClip (float aFarClip) |
void | getFrustum (float *left, float *top, float *right, float *bottom, float *near, float *far) const |
Returns the coordinates of the camera's frustum, suitable for passing to glFrustum . More... | |
Ray | generateRay (float u, float v, float imagePlaneAspectRatio) const |
void | getBillboardVectors (Vec3f *right, Vec3f *up) const |
Vec2f | worldToScreen (const Vec3f &worldCoord, float screenWidth, float screenHeight) const |
Converts a world-space coordinate worldCoord to screen coordinates as viewed by the camera, based ona s screen which is screenWidth x screenHeight pixels. More... | |
Vec3f | worldToEye (const Vec3f &worldCoord) |
Converts a world-space coordinate worldCoord to eye-space, also known as camera-space. -Z is along the view direction. More... | |
float | worldToEyeDepth (const Vec3f &worldCoord) const |
Converts a world-space coordinate worldCoord to the z axis of eye-space, also known as camera-space. -Z is along the view direction. Suitable for depth sorting. More... | |
Vec3f | worldToNdc (const Vec3f &worldCoord) |
Converts a world-space coordinate worldCoord to normalized device coordinates. More... | |
float | getScreenRadius (const class Sphere &sphere, float screenWidth, float screenHeight) const |
Protected Member Functions | |
virtual void | calcModelView () const |
virtual void | calcInverseModelView () const |
virtual void | calcProjection () const |
void | calcMatrices () const |
cinder::CameraStereo::CameraStereo | ( | ) |
cinder::CameraStereo::CameraStereo | ( | int | pixelWidth, |
int | pixelHeight, | ||
float | fov, | ||
float | nearPlane, | ||
float | farPlane | ||
) |
float cinder::CameraStereo::getConvergence | ( | ) | const |
Returns the current convergence, which is the distance at which there is no parallax.
void cinder::CameraStereo::setConvergence | ( | float | distance, |
bool | adjustEyeSeparation = false |
||
) |
Sets the convergence of the camera, which is the distance at which there is no parallax.
float cinder::CameraStereo::getEyeSeparation | ( | ) | const |
Returns the distance between the camera's for the left and right eyes.
void cinder::CameraStereo::setEyeSeparation | ( | float | distance | ) |
Sets the distance between the camera's for the left and right eyes. This affects the parallax effect.
Vec3f cinder::CameraStereo::getEyePointShifted | ( | ) | const |
Returns the location of the currently enabled eye camera.
void cinder::CameraStereo::enableStereoLeft | ( | ) |
Enables the left eye camera.
bool cinder::CameraStereo::isStereoLeftEnabled | ( | ) | const |
void cinder::CameraStereo::enableStereoRight | ( | ) |
Enables the right eye camera.
bool cinder::CameraStereo::isStereoRightEnabled | ( | ) | const |
void cinder::CameraStereo::disableStereo | ( | ) |
Disables stereoscopic rendering, converting the camera to a standard CameraPersp.
bool cinder::CameraStereo::isStereoEnabled | ( | ) | const |
|
virtual |
Reimplemented from cinder::Camera.
|
virtual |
Reimplemented from cinder::Camera.
|
virtual |
Reimplemented from cinder::Camera.
|
virtual |
Reimplemented from cinder::Camera.
|
virtual |
Reimplemented from cinder::Camera.
|
protectedvirtual |
Reimplemented from cinder::Camera.
|
protectedvirtual |
Reimplemented from cinder::Camera.
|
protectedvirtual |
Reimplemented from cinder::CameraPersp.
|
inherited |
|
inherited |
Returns both the horizontal and vertical lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport.
|
inherited |
Returns both the horizontal and vertical lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport.
|
inherited |
Sets both the horizontal and vertical lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport.
Sets both the horizontal and vertical lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport.
|
inherited |
Returns the horizontal lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport.
|
inherited |
Sets the horizontal lens shift. A horizontal lens shift of 1 (-1) will shift the view right (left) by half the width of the viewport.
|
inherited |
Returns the vertical lens shift. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport.
|
inherited |
Sets the vertical lens shift. A vertical lens shift of 1 (-1) will shift the view up (down) by half the height of the viewport.
|
virtualinherited |
Returns whether the camera represents a perspective projection instead of an orthographic.
Implements cinder::Camera.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Returns the coordinates of the camera's frustum, suitable for passing to glFrustum
.
|
inherited |
|
inherited |
Converts a world-space coordinate worldCoord to screen coordinates as viewed by the camera, based ona s screen which is screenWidth x screenHeight pixels.
Converts a world-space coordinate worldCoord to eye-space, also known as camera-space. -Z is along the view direction.
|
inherited |
Converts a world-space coordinate worldCoord to the z axis of eye-space, also known as camera-space. -Z is along the view direction. Suitable for depth sorting.
Converts a world-space coordinate worldCoord to normalized device coordinates.
|
inherited |
|
protectedinherited |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |