#include <Camera.h>
Public Member Functions | |
Camera () | |
virtual | ~Camera () |
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) |
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 bool | isPersp () const =0 |
Returns whether the camera represents a perspective projection instead of an orthographic. More... | |
virtual const Matrix44f & | getProjectionMatrix () const |
virtual const Matrix44f & | getModelViewMatrix () const |
virtual const Matrix44f & | getInverseModelViewMatrix () 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 | |
void | calcMatrices () const |
virtual void | calcModelView () const |
virtual void | calcInverseModelView () const |
virtual void | calcProjection () const =0 |
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 |
cinder::Camera::Camera | ( | ) |
|
virtual |
Vec3f cinder::Camera::getEyePoint | ( | ) | const |
float cinder::Camera::getCenterOfInterest | ( | ) | const |
void cinder::Camera::setCenterOfInterest | ( | float | aCenterOfInterest | ) |
Vec3f cinder::Camera::getCenterOfInterestPoint | ( | ) | const |
Vec3f cinder::Camera::getWorldUp | ( | ) | const |
Vec3f cinder::Camera::getViewDirection | ( | ) | const |
Quatf cinder::Camera::getOrientation | ( | ) | const |
float cinder::Camera::getFov | ( | ) | const |
void cinder::Camera::setFov | ( | float | aFov | ) |
float cinder::Camera::getFovHorizontal | ( | ) | const |
void cinder::Camera::setFovHorizontal | ( | float | aFov | ) |
float cinder::Camera::getAspectRatio | ( | ) | const |
void cinder::Camera::setAspectRatio | ( | float | aAspectRatio | ) |
float cinder::Camera::getNearClip | ( | ) | const |
void cinder::Camera::setNearClip | ( | float | aNearClip | ) |
float cinder::Camera::getFarClip | ( | ) | const |
void cinder::Camera::setFarClip | ( | float | aFarClip | ) |
|
virtual |
Reimplemented in cinder::CameraStereo.
|
virtual |
Reimplemented in cinder::CameraStereo.
void cinder::Camera::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
.
|
pure virtual |
Returns whether the camera represents a perspective projection instead of an orthographic.
Implemented in cinder::CameraOrtho, and cinder::CameraPersp.
|
virtual |
Reimplemented in cinder::CameraStereo.
|
virtual |
Reimplemented in cinder::CameraStereo.
|
virtual |
Reimplemented in cinder::CameraStereo.
Ray cinder::Camera::generateRay | ( | float | u, |
float | v, | ||
float | imagePlaneAspectRatio | ||
) | const |
Vec2f cinder::Camera::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.
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 |
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.
float cinder::Camera::getScreenRadius | ( | const class Sphere & | sphere, |
float | screenWidth, | ||
float | screenHeight | ||
) | const |
|
protected |
|
protectedvirtual |
Reimplemented in cinder::CameraStereo.
|
protectedvirtual |
Reimplemented in cinder::CameraStereo.
|
protectedpure virtual |
Implemented in cinder::CameraStereo, cinder::CameraOrtho, and cinder::CameraPersp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |