65        nc( { 0.0, 0.0, 0.0 } ),
 
   66        fc( { 0.0, 0.0, 0.0 } ),
 
   67        ntl( { 0.0, 0.0, 0.0 } ),
 
   68        ntr( { 0.0, 0.0, 0.0 } ),
 
   69        nbl( { 0.0, 0.0, 0.0 } ),
 
   70        nbr( { 0.0, 0.0, 0.0 } ),
 
   71        ftl( { 0.0, 0.0, 0.0 } ),
 
   72        ftr( { 0.0, 0.0, 0.0 } ),
 
   73        fbl( { 0.0, 0.0, 0.0 } ),
 
   74        fbr( { 0.0, 0.0, 0.0 } ),
 
 
 
  113    explicit CAMERA( 
float aInitialDistance );
 
  125    glm::mat4 GetRotationMatrix() 
const;
 
  127    const glm::mat4& GetViewMatrix() 
const;
 
  128    const glm::mat4& GetViewMatrix_Inv() 
const;
 
  130    const glm::mat4& GetProjectionMatrix() 
const;
 
  131    const glm::mat4& GetProjectionMatrixInv() 
const;
 
  149    void SetRotationMatrix( 
const glm::mat4& aRotation );
 
  158    void SetViewMatrix( glm::mat4 aViewMatrix );
 
  160    void SetBoardLookAtPos( 
const SFVEC3F& aBoardPos );
 
  172    float GetCameraMinDimension() 
const;
 
  177    virtual void Drag( 
const wxPoint& aNewMousePosition )  = 0;
 
  179    virtual void Pan( 
const wxPoint& aNewMousePosition )  = 0;
 
  188    virtual void Reset();
 
  202    void SetCurMousePosition( 
const wxPoint& aPosition );
 
  204    void ToggleProjection();
 
  213    bool SetCurWindowSize( 
const wxSize& aSize );
 
  217    bool Zoom( 
float aFactor );
 
  219    bool Zoom_T1( 
float aFactor );
 
  242    void RotateScreen( 
float aAngleInRadians );
 
  244    void RotateX( 
float aAngleInRadians );
 
  245    void RotateY( 
float aAngleInRadians );
 
  246    void RotateZ( 
float aAngleInRadians );
 
  248    void RotateX_T1( 
float aAngleInRadians );
 
  249    void RotateY_T1( 
float aAngleInRadians );
 
  250    void RotateZ_T1( 
float aAngleInRadians );
 
  255    virtual void SetT0_and_T1_current_T();
 
  262    virtual void Interpolate( 
float t );
 
  272    bool ParametersChanged();
 
  304    void MakeRayAtCurrentMousePosition( 
SFVEC3F& aOutOrigin, 
SFVEC3F& aOutDirection ) 
const;
 
  313    void rebuildProjection();
 
  314    void updateFrustum();
 
  315    void updateViewMatrix();
 
  317    void updateRotationMatrix();
 
 
declared enumerations and flags
 
Generic cubic Bezier representation.
 
const SFVEC3F & GetRight() const
 
bool m_parametersChanged
Set to true if any of the parameters in the camera was changed.
 
glm::mat4 m_projectionMatrixInv
 
const CAMERA_FRUSTUM & GetFrustum() const
 
bool ParametersChangedQuery() const
 
void SetMinZoom(float minZoom)
 
void SetProjection(PROJECTION_TYPE aProjection)
 
const SFVEC3F & GetPos() const
 
virtual void Pan(const wxPoint &aNewMousePosition)=0
 
glm::mat4 m_projectionMatrix
 
CAMERA_INTERPOLATION m_interpolation_mode
 
wxPoint m_lastPosition
The last mouse position in the screen.
 
PROJECTION_TYPE GetProjection()
 
static const float DEFAULT_MIN_ZOOM
 
static const float DEFAULT_MAX_ZOOM
 
virtual void Pan_T1(const SFVEC3F &aDeltaOffsetInc)=0
 
const SFVEC3F & GetUp() const
 
virtual void Drag(const wxPoint &aNewMousePosition)=0
Calculate a new mouse drag position.
 
void SetInterpolateMode(CAMERA_INTERPOLATION aInterpolateMode)
 
SFVEC3F m_camera_pos_init
 
CAMERA(float aInitialDistance)
Initialize a camera.
 
float m_minZoom
Possible 3D zoom range.
 
virtual void Pan(const SFVEC3F &aDeltaOffsetInc)=0
 
const SFVEC3F & GetLookAtPos() const
 
std::vector< SFVEC3F > m_right_nX
Precalc values array used to calc ray for each pixel, for X and Y axis of each new camera position.
 
const SFVEC2F & GetFocalLen() const
 
PROJECTION_TYPE m_projectionType
 
SFVEC2I m_windowSize
The window size that this camera is working.
 
std::vector< float > m_scr_nX
Precalc values array used to calc ray for each pixel (constant for the same window size).
 
void SetLookAtPos_T1(const SFVEC3F &aLookAtPos)
 
glm::mat4 m_viewMatrixInverse
 
const SFVEC3F & GetLookAtPos_T1() const
 
const wxPoint & GetCurMousePosition()
Get the current mouse position.
 
const SFVEC3F & GetCameraPos() const
 
const SFVEC3F & GetDir() const
 
SFVEC3F m_rotate_aux
Stores the rotation angle auxiliary.
 
glm::mat4 m_rotationMatrixAux
 
glm::mat4 m_rotationMatrix
 
std::vector< float > m_scr_nY
 
void SetMaxZoom(float maxZoom)
 
SFVEC3F m_board_lookat_pos_init
Default boardlookat position (the board center).
 
const SFVEC3F & GetCameraInitPos() const
 
std::vector< SFVEC3F > m_up_nY
 
float m_zoom
3D zoom value – Z-distance is scaled by it
 
void Update()
Update the camera.
 
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
 
Frustum is a implementation based on a tutorial by http://www.lighthouse3d.com/tutorials/view-frustum...
 
SFVEC3F ntr
Near Top Right.
 
SFVEC3F ntl
Near Top Left.
 
SFVEC3F fbr
Far Bottom Right.
 
SFVEC3F nbl
Near Bottom Left.
 
SFVEC3F nbr
Near Bottom Right.
 
SFVEC3F fbl
Far Bottom Left.
 
SFVEC3F ftr
Far Top Right.