Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cinder::CameraOrtho Class Reference

#include <Camera.h>

Inheritance diagram for cinder::CameraOrtho:
[legend]

Public Member Functions

 CameraOrtho ()
 
 CameraOrtho (float left, float right, float bottom, float top, float nearPlane, float farPlane)
 
void setOrtho (float left, float right, float bottom, float top, float nearPlane, float farPlane)
 
virtual bool isPersp () const
 Returns whether the camera represents a perspective projection instead of an orthographic. More...
 
Vec3f getEyePoint () const
 
void setEyePoint (const Vec3f &aEyePoint)
 
float getCenterOfInterest () const
 
void setCenterOfInterest (float aCenterOfInterest)
 
Vec3f getCenterOfInterestPoint () const
 
void setCenterOfInterestPoint (const Vec3f &centerOfInterestPoint)
 
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)
 
virtual void getNearClipCoordinates (Vec3f *topLeft, Vec3f *topRight, Vec3f *bottomLeft, Vec3f *bottomRight) const
 
virtual void getFarClipCoordinates (Vec3f *topLeft, Vec3f *topRight, Vec3f *bottomLeft, Vec3f *bottomRight) const
 
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...
 
virtual const Matrix44fgetProjectionMatrix () const
 
virtual const Matrix44fgetModelViewMatrix () const
 
virtual const Matrix44fgetInverseModelViewMatrix () const
 
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 calcProjection () const
 
void calcMatrices () const
 
virtual void calcModelView () const
 
virtual void calcInverseModelView () const
 

Protected Attributes

Vec3f mEyePoint
 
Vec3f mViewDirection
 
Quatf mOrientation
 
float mCenterOfInterest
 
Vec3f mWorldUp
 
float mFov
 
float mAspectRatio
 
float mNearClip
 
float mFarClip
 
Vec3f mU
 
Vec3f mV
 
Vec3f mW
 
Matrix44f mProjectionMatrix
 
Matrix44f mInverseProjectionMatrix
 
bool mProjectionCached
 
Matrix44f mModelViewMatrix
 
bool mModelViewCached
 
Matrix44f mInverseModelViewMatrix
 
bool mInverseModelViewCached
 
float mFrustumLeft
 
float mFrustumRight
 
float mFrustumTop
 
float mFrustumBottom
 

Constructor & Destructor Documentation

cinder::CameraOrtho::CameraOrtho ( )
cinder::CameraOrtho::CameraOrtho ( float  left,
float  right,
float  bottom,
float  top,
float  nearPlane,
float  farPlane 
)

Member Function Documentation

void cinder::CameraOrtho::setOrtho ( float  left,
float  right,
float  bottom,
float  top,
float  nearPlane,
float  farPlane 
)
virtual bool cinder::CameraOrtho::isPersp ( ) const
virtual

Returns whether the camera represents a perspective projection instead of an orthographic.

Implements cinder::Camera.

void cinder::CameraOrtho::calcProjection ( ) const
protectedvirtual

Implements cinder::Camera.

Vec3f cinder::Camera::getEyePoint ( ) const
inherited
void cinder::Camera::setEyePoint ( const Vec3f aEyePoint)
inherited
float cinder::Camera::getCenterOfInterest ( ) const
inherited
void cinder::Camera::setCenterOfInterest ( float  aCenterOfInterest)
inherited
Vec3f cinder::Camera::getCenterOfInterestPoint ( ) const
inherited
void cinder::Camera::setCenterOfInterestPoint ( const Vec3f centerOfInterestPoint)
inherited
Vec3f cinder::Camera::getWorldUp ( ) const
inherited
void cinder::Camera::setWorldUp ( const Vec3f aWorldUp)
inherited
void cinder::Camera::lookAt ( const Vec3f target)
inherited
void cinder::Camera::lookAt ( const Vec3f aEyePoint,
const Vec3f target 
)
inherited
void cinder::Camera::lookAt ( const Vec3f aEyePoint,
const Vec3f target,
const Vec3f aUp 
)
inherited
Vec3f cinder::Camera::getViewDirection ( ) const
inherited
void cinder::Camera::setViewDirection ( const Vec3f aViewDirection)
inherited
Quatf cinder::Camera::getOrientation ( ) const
inherited
void cinder::Camera::setOrientation ( const Quatf aOrientation)
inherited
float cinder::Camera::getFov ( ) const
inherited
void cinder::Camera::setFov ( float  aFov)
inherited
float cinder::Camera::getFovHorizontal ( ) const
inherited
void cinder::Camera::setFovHorizontal ( float  aFov)
inherited
float cinder::Camera::getAspectRatio ( ) const
inherited
void cinder::Camera::setAspectRatio ( float  aAspectRatio)
inherited
float cinder::Camera::getNearClip ( ) const
inherited
void cinder::Camera::setNearClip ( float  aNearClip)
inherited
float cinder::Camera::getFarClip ( ) const
inherited
void cinder::Camera::setFarClip ( float  aFarClip)
inherited
void cinder::Camera::getNearClipCoordinates ( Vec3f topLeft,
Vec3f topRight,
Vec3f bottomLeft,
Vec3f bottomRight 
) const
virtualinherited

Reimplemented in cinder::CameraStereo.

void cinder::Camera::getFarClipCoordinates ( Vec3f topLeft,
Vec3f topRight,
Vec3f bottomLeft,
Vec3f bottomRight 
) const
virtualinherited

Reimplemented in cinder::CameraStereo.

void cinder::Camera::getFrustum ( float *  left,
float *  top,
float *  right,
float *  bottom,
float *  near,
float *  far 
) const
inherited

Returns the coordinates of the camera's frustum, suitable for passing to glFrustum.

virtual const Matrix44f& cinder::Camera::getProjectionMatrix ( ) const
virtualinherited

Reimplemented in cinder::CameraStereo.

virtual const Matrix44f& cinder::Camera::getModelViewMatrix ( ) const
virtualinherited

Reimplemented in cinder::CameraStereo.

virtual const Matrix44f& cinder::Camera::getInverseModelViewMatrix ( ) const
virtualinherited

Reimplemented in cinder::CameraStereo.

Ray cinder::Camera::generateRay ( float  u,
float  v,
float  imagePlaneAspectRatio 
) const
inherited
void cinder::Camera::getBillboardVectors ( Vec3f right,
Vec3f up 
) const
inherited
Vec2f cinder::Camera::worldToScreen ( const Vec3f worldCoord,
float  screenWidth,
float  screenHeight 
) const
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.

Vec3f cinder::Camera::worldToEye ( const Vec3f worldCoord)
inherited

Converts a world-space coordinate worldCoord to eye-space, also known as camera-space. -Z is along the view direction.

float cinder::Camera::worldToEyeDepth ( const Vec3f worldCoord) const
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.

Vec3f cinder::Camera::worldToNdc ( const Vec3f worldCoord)
inherited

Converts a world-space coordinate worldCoord to normalized device coordinates.

float cinder::Camera::getScreenRadius ( const class Sphere sphere,
float  screenWidth,
float  screenHeight 
) const
inherited
void cinder::Camera::calcMatrices ( ) const
protectedinherited
void cinder::Camera::calcModelView ( ) const
protectedvirtualinherited

Reimplemented in cinder::CameraStereo.

void cinder::Camera::calcInverseModelView ( ) const
protectedvirtualinherited

Reimplemented in cinder::CameraStereo.

Member Data Documentation

Vec3f cinder::Camera::mEyePoint
protectedinherited
Vec3f cinder::Camera::mViewDirection
protectedinherited
Quatf cinder::Camera::mOrientation
protectedinherited
float cinder::Camera::mCenterOfInterest
protectedinherited
Vec3f cinder::Camera::mWorldUp
protectedinherited
float cinder::Camera::mFov
protectedinherited
float cinder::Camera::mAspectRatio
protectedinherited
float cinder::Camera::mNearClip
protectedinherited
float cinder::Camera::mFarClip
protectedinherited
Vec3f cinder::Camera::mU
mutableprotectedinherited
Vec3f cinder::Camera::mV
mutableprotectedinherited
Vec3f cinder::Camera::mW
mutableprotectedinherited
Matrix44f cinder::Camera::mProjectionMatrix
mutableprotectedinherited
Matrix44f cinder::Camera::mInverseProjectionMatrix
mutableprotectedinherited
bool cinder::Camera::mProjectionCached
mutableprotectedinherited
Matrix44f cinder::Camera::mModelViewMatrix
mutableprotectedinherited
bool cinder::Camera::mModelViewCached
mutableprotectedinherited
Matrix44f cinder::Camera::mInverseModelViewMatrix
mutableprotectedinherited
bool cinder::Camera::mInverseModelViewCached
mutableprotectedinherited
float cinder::Camera::mFrustumLeft
mutableprotectedinherited
float cinder::Camera::mFrustumRight
mutableprotectedinherited
float cinder::Camera::mFrustumTop
mutableprotectedinherited
float cinder::Camera::mFrustumBottom
mutableprotectedinherited

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