GlobeEngine
ge::Camera Class Referenceabstract

#include <Camera.h>

Inheritance diagram for ge::Camera:
ge::ArcBallCamera ge::FlightCamera ge::OrthographicMapCamera geAstro::PassiveCamera at::CollisionCamera

Public Types

enum  CAMERATYPE { NORMAL, ARCBALL, STRATEGIC }
 
enum  AXIS { XZ_AXIS = 0, XY_AXIS, YZ_AXIS }
 

Public Member Functions

 Camera ()
 
 ~Camera ()
 
virtual void changeSetup (ViewFrustumProperties _in)
 
virtual void clear ()
 
virtual void destroy ()
 
virtual void update ()=0
 
virtual void calculateViewMatrix ()=0
 
virtual void print ()
 
void setOrthographic ()
 
void setPerspective (int _w=0, int _h=0)
 
void setOrthoCoordinates (vmml::Vector4d _coords)
 
void setViewportSize (int _w, int _h)
 
void setViewportSize (vmml::Vector2d _viewport)
 
vmml::Vector2d getScreenposForPoint (vmml::Vector3d _p, vmml::Matrix4d _modelMatrix)
 
enum Camera::AXIS getOrientationAxis ()
 
enum Camera::AXIS getOrientationFromString (std::string _input)
 
void setOrientationAxis (enum AXIS _in)
 
vmml::Vector2d getViewport () const
 
void applyViewport ()
 
std::shared_ptr< ge::ViewFrustum > const & getViewFrustum () const
 
vmml::Matrix4d getViewMatrix () const
 
void setViewMatrix (vmml::Matrix4d _viewMatrix)
 
vmml::Vector3d getRelativePositionToCenter () const
 
vmml::Vector3d getScenePosition () const
 
void setScenePosition (vmml::Vector3d _pos)
 
void setRelativePositionToCenter (vmml::Vector3d _pos)
 
double getDistanceToCamera (vmml::Vector3d _p) const
 
vmml::Vector3d getDirection () const
 
enum CAMERATYPE getType ()
 
bool hasChanged ()
 
vmml::Matrix4d getProjectionMatrix () const
 
void setProjectionMatrix (vmml::Matrix4d _projectionMatrix)
 
vmml::Matrix4d getViewProjectionMatrix () const
 
void setViewProjectionMatrix (vmml::Matrix4d _viewprojectionMatrix)
 
void enableOrthoProjection ()
 
void disableOrthoProjection ()
 
void setChanged ()
 
vmml::Matrix4d getInverseViewMatrix () const
 
vmml::Matrix4d getInverseProjectionMatrix () const
 
vmml::Matrix4d getInverseProjectionViewMatrix () const
 
vmml::Vector4d getOrthoCoordinates () const
 

Static Public Member Functions

static vmml::Matrix4d createOrthoProjectionMatrix (double l, double r, double b, double t, double n, double f)
 

Protected Member Functions

void moveFrustum ()
 
void setStandardVectors ()
 
vmml::Matrix4d createPerspectiveProjectionMatrix (double fovy, double aspect, double zNear, double zFar)
 
vmml::Matrix4d createFrustumMatrix (double left, double right, double bottom, double top, double zNear, double zFar)
 
vmml::Matrix4d getRotationMatrix (const vmml::Quaterniond &quat)
 

Protected Attributes

enum CAMERATYPE type
 
enum Camera::AXIS orientation_axis
 
std::shared_ptr< ge::ViewFrustumviewfrustum
 
vmml::Vector2d viewport
 
vmml::Vector3d camPosition
 
vmml::Vector3d camRight
 
vmml::Vector3d camUp
 
vmml::Vector3d camDirection
 
vmml::Matrix4d viewMatrix
 
vmml::Matrix4d projectionMatrix
 
vmml::Matrix4d viewProjectionMatrix
 
vmml::Matrix4d perspectiveProjectionMatrix
 
vmml::Matrix4d orthoProjectionMatrix
 
vmml::Vector4d orthoCoord
 
bool changed
 
bool orthoProjMode
 
GLuint cameraBuffers [2]
 

Member Enumeration Documentation

Enumerator
XZ_AXIS 
XY_AXIS 
YZ_AXIS 
Enumerator
NORMAL 
ARCBALL 
STRATEGIC 

Constructor & Destructor Documentation

ge::Camera::Camera ( )
ge::Camera::~Camera ( )

Member Function Documentation

void ge::Camera::applyViewport ( )
virtual void ge::Camera::calculateViewMatrix ( )
pure virtual
void ge::Camera::changeSetup ( ViewFrustumProperties  _in)
virtual
void ge::Camera::clear ( )
virtual
vmml::Matrix4d ge::Camera::createFrustumMatrix ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
protected
vmml::Matrix4d ge::Camera::createOrthoProjectionMatrix ( double  l,
double  r,
double  b,
double  t,
double  n,
double  f 
)
static
vmml::Matrix4d ge::Camera::createPerspectiveProjectionMatrix ( double  fovy,
double  aspect,
double  zNear,
double  zFar 
)
protected
void ge::Camera::destroy ( )
virtual
void ge::Camera::disableOrthoProjection ( )
void ge::Camera::enableOrthoProjection ( )
vmml::Vector3d ge::Camera::getDirection ( ) const
double ge::Camera::getDistanceToCamera ( vmml::Vector3d  _p) const
vmml::Matrix4d ge::Camera::getInverseProjectionMatrix ( ) const
vmml::Matrix4d ge::Camera::getInverseProjectionViewMatrix ( ) const
vmml::Matrix4d ge::Camera::getInverseViewMatrix ( ) const
enum Camera::AXIS ge::Camera::getOrientationAxis ( )
enum Camera::AXIS ge::Camera::getOrientationFromString ( std::string  _input)
vmml::Vector4d ge::Camera::getOrthoCoordinates ( ) const
vmml::Matrix4d ge::Camera::getProjectionMatrix ( ) const
vmml::Vector3d ge::Camera::getRelativePositionToCenter ( ) const
vmml::Matrix4d ge::Camera::getRotationMatrix ( const vmml::Quaterniond &  quat)
protected
vmml::Vector3d ge::Camera::getScenePosition ( ) const
vmml::Vector2d ge::Camera::getScreenposForPoint ( vmml::Vector3d  _p,
vmml::Matrix4d  _modelMatrix 
)
enum CAMERATYPE ge::Camera::getType ( )
inline
std::shared_ptr< ge::ViewFrustum > const & ge::Camera::getViewFrustum ( ) const
vmml::Matrix4d ge::Camera::getViewMatrix ( ) const
vmml::Vector2d ge::Camera::getViewport ( ) const
vmml::Matrix4d ge::Camera::getViewProjectionMatrix ( ) const
bool ge::Camera::hasChanged ( )
inline
void ge::Camera::moveFrustum ( )
protected
void ge::Camera::print ( )
virtual

Reimplemented in ge::FlightCamera.

void ge::Camera::setChanged ( )
void ge::Camera::setOrientationAxis ( enum AXIS  _in)
void ge::Camera::setOrthoCoordinates ( vmml::Vector4d  _coords)
void ge::Camera::setOrthographic ( )
void ge::Camera::setPerspective ( int  _w = 0,
int  _h = 0 
)
void ge::Camera::setProjectionMatrix ( vmml::Matrix4d  _projectionMatrix)
void ge::Camera::setRelativePositionToCenter ( vmml::Vector3d  _pos)
void ge::Camera::setScenePosition ( vmml::Vector3d  _pos)
void ge::Camera::setStandardVectors ( )
protected
void ge::Camera::setViewMatrix ( vmml::Matrix4d  _viewMatrix)
void ge::Camera::setViewportSize ( int  _w,
int  _h 
)
void ge::Camera::setViewportSize ( vmml::Vector2d  _viewport)
void ge::Camera::setViewProjectionMatrix ( vmml::Matrix4d  _viewprojectionMatrix)
virtual void ge::Camera::update ( )
pure virtual

Member Data Documentation

vmml::Vector3d ge::Camera::camDirection
protected
GLuint ge::Camera::cameraBuffers[2]
protected
vmml::Vector3d ge::Camera::camPosition
protected
vmml::Vector3d ge::Camera::camRight
protected
vmml::Vector3d ge::Camera::camUp
protected
bool ge::Camera::changed
protected
enum Camera::AXIS ge::Camera::orientation_axis
protected
vmml::Vector4d ge::Camera::orthoCoord
protected
vmml::Matrix4d ge::Camera::orthoProjectionMatrix
protected
bool ge::Camera::orthoProjMode
protected
vmml::Matrix4d ge::Camera::perspectiveProjectionMatrix
protected
vmml::Matrix4d ge::Camera::projectionMatrix
protected
enum CAMERATYPE ge::Camera::type
protected
std::shared_ptr<ge::ViewFrustum> ge::Camera::viewfrustum
protected
vmml::Matrix4d ge::Camera::viewMatrix
protected
vmml::Vector2d ge::Camera::viewport
protected
vmml::Matrix4d ge::Camera::viewProjectionMatrix
protected

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