KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CAMERA Class Referenceabstract

A class used to derive camera objects from. More...

#include <camera.h>

Inheritance diagram for CAMERA:
TRACK_BALL

Public Member Functions

 CAMERA (float aInitialDistance)
 Initialize a camera. More...
 
virtual ~CAMERA ()
 
glm::mat4 GetRotationMatrix () const
 Get the rotation matrix to be applied in a transformation camera. More...
 
const glm::mat4 & GetViewMatrix () const
 
const glm::mat4 & GetViewMatrix_Inv () const
 
const glm::mat4 & GetProjectionMatrix () const
 
const glm::mat4 & GetProjectionMatrixInv () const
 
const SFVEC3FGetRight () const
 
const SFVEC3FGetUp () const
 
const SFVEC3FGetDir () const
 
const SFVEC3FGetPos () const
 
const SFVEC2FGetFocalLen () const
 
float GetNear () const
 
float GetFar () const
 
const CAMERA_FRUSTUMGetFrustum () const
 
const SFVEC3FGetLookAtPos () const
 
void SetRotationMatrix (const glm::mat4 &aRotation)
 Set the rotation matrix to be applied in a transformation camera, without making any new calculations on camera. More...
 
void SetViewMatrix (glm::mat4 aViewMatrix)
 Set the affine matrix to be applied to a transformation camera. More...
 
void SetBoardLookAtPos (const SFVEC3F &aBoardPos)
 
void SetLookAtPos_T1 (const SFVEC3F &aLookAtPos)
 
const SFVEC3FGetLookAtPos_T1 () const
 
const SFVEC3FGetCameraPos () const
 
const SFVEC3FGetCameraInitPos () const
 
float GetCameraMinDimension () const
 
virtual void Drag (const wxPoint &aNewMousePosition)=0
 Calculate a new mouse drag position. More...
 
virtual void Pan (const wxPoint &aNewMousePosition)=0
 
virtual void Pan (const SFVEC3F &aDeltaOffsetInc)=0
 
virtual void Pan_T1 (const SFVEC3F &aDeltaOffsetInc)=0
 
virtual void Reset ()
 Reset the camera to initial state. More...
 
virtual void Reset_T1 ()
 
void ResetXYpos ()
 
void ResetXYpos_T1 ()
 
const wxPoint & GetCurMousePosition ()
 Get the current mouse position. More...
 
void SetCurMousePosition (const wxPoint &aPosition)
 Update the current mouse position without make any new calculations on camera. More...
 
void ToggleProjection ()
 
PROJECTION_TYPE GetProjection ()
 
void SetProjection (PROJECTION_TYPE aProjection)
 
bool SetCurWindowSize (const wxSize &aSize)
 Update the windows size of the camera. More...
 
void ZoomReset ()
 
bool Zoom (float aFactor)
 
bool Zoom_T1 (float aFactor)
 
float GetZoom () const
 
float GetMinZoom ()
 
void SetMinZoom (float minZoom)
 
float GetMaxZoom ()
 
void SetMaxZoom (float maxZoom)
 
void RotateX (float aAngleInRadians)
 
void RotateY (float aAngleInRadians)
 
void RotateZ (float aAngleInRadians)
 
void RotateX_T1 (float aAngleInRadians)
 
void RotateY_T1 (float aAngleInRadians)
 
void RotateZ_T1 (float aAngleInRadians)
 
virtual void SetT0_and_T1_current_T ()
 This will set T0 and T1 with the current values. More...
 
virtual void Interpolate (float t)
 It will update the matrix to interpolate between T0 and T1 values. More...
 
void SetInterpolateMode (CAMERA_INTERPOLATION aInterpolateMode)
 
bool ParametersChanged ()
 
bool ParametersChangedQuery () const
 
void MakeRay (const SFVEC2I &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &aOutDirection) const
 Make a ray based on a windows screen position. More...
 
void MakeRay (const SFVEC2F &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &aOutDirection) const
 Make a ray based on a windows screen position, it will interpolate based on the aWindowPos. More...
 
void MakeRayAtCurrentMousePosition (SFVEC3F &aOutOrigin, SFVEC3F &aOutDirection) const
 Make a ray based on the latest mouse position. More...
 
void Update ()
 Update the camera. More...
 

Static Public Attributes

static const float DEFAULT_MIN_ZOOM = 0.020f
 
static const float DEFAULT_MAX_ZOOM = 2.0f
 

Protected Member Functions

void zoomChanged ()
 
void rebuildProjection ()
 
void updateFrustum ()
 
void updateViewMatrix ()
 
void updateRotationMatrix ()
 

Protected Attributes

float m_zoom
 3D zoom value – Z-distance is scaled by it More...
 
float m_zoom_t0
 
float m_zoom_t1
 
float m_minZoom
 Possible 3D zoom range. More...
 
float m_maxZoom
 
SFVEC2I m_windowSize
 The window size that this camera is working. More...
 
wxPoint m_lastPosition
 The last mouse position in the screen. More...
 
glm::mat4 m_rotationMatrix
 
glm::mat4 m_rotationMatrixAux
 
glm::mat4 m_viewMatrix
 
glm::mat4 m_viewMatrixInverse
 
glm::mat4 m_projectionMatrix
 
glm::mat4 m_projectionMatrixInv
 
PROJECTION_TYPE m_projectionType
 
CAMERA_FRUSTUM m_frustum
 
SFVEC3F m_right
 
SFVEC3F m_up
 
SFVEC3F m_dir
 
SFVEC3F m_pos
 
SFVEC2F m_focalLen
 
SFVEC3F m_camera_pos_init
 
SFVEC3F m_camera_pos
 
SFVEC3F m_camera_pos_t0
 
SFVEC3F m_camera_pos_t1
 
SFVEC3F m_lookat_pos
 
SFVEC3F m_lookat_pos_t0
 
SFVEC3F m_lookat_pos_t1
 
SFVEC3F m_board_lookat_pos_init
 Default boardlookat position (the board center). More...
 
SFVEC3F m_rotate_aux
 Stores the rotation angle auxiliary. More...
 
SFVEC3F m_rotate_aux_t0
 
SFVEC3F m_rotate_aux_t1
 
CAMERA_INTERPOLATION m_interpolation_mode
 
std::vector< float > m_scr_nX
 Precalc values array used to calc ray for each pixel (constant for the same window size). More...
 
std::vector< float > m_scr_nY
 
std::vector< SFVEC3Fm_right_nX
 Precalc values array used to calc ray for each pixel, for X and Y axis of each new camera position. More...
 
std::vector< SFVEC3Fm_up_nY
 
bool m_parametersChanged
 Set to true if any of the parameters in the camera was changed. More...
 

Static Protected Attributes

static const wxChar * m_logTrace = wxT( "KI_TRACE_CAMERA" )
 Trace mask used to enable or disable the trace output of this class. More...
 

Detailed Description

A class used to derive camera objects from.

It must be derived by other classes to implement a real camera object.

Definition at line 101 of file camera.h.

Constructor & Destructor Documentation

◆ CAMERA()

CAMERA::CAMERA ( float  aInitialDistance)
explicit

Initialize a camera.

Parameters
aInitialDistanceInitial Z-distance to the board

Definition at line 53 of file camera.cpp.

References DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, m_board_lookat_pos_init, m_camera_pos_init, m_interpolation_mode, m_logTrace, m_maxZoom, m_minZoom, m_projectionType, m_windowSize, and Reset().

◆ ~CAMERA()

virtual CAMERA::~CAMERA ( )
inlinevirtual

Definition at line 114 of file camera.h.

Member Function Documentation

◆ Drag()

virtual void CAMERA::Drag ( const wxPoint &  aNewMousePosition)
pure virtual

Calculate a new mouse drag position.

Implemented in TRACK_BALL.

Referenced by HIDPI_GL_3D_CANVAS::OnMouseMoveCamera().

◆ GetCameraInitPos()

const SFVEC3F & CAMERA::GetCameraInitPos ( ) const
inline

Definition at line 168 of file camera.h.

Referenced by RENDER_3D_RAYTRACE::Reload().

◆ GetCameraMinDimension()

float CAMERA::GetCameraMinDimension ( ) const

Definition at line 426 of file camera.cpp.

References m_camera_pos_init, m_frustum, and CAMERA_FRUSTUM::tang.

◆ GetCameraPos()

const SFVEC3F & CAMERA::GetCameraPos ( ) const
inline

Definition at line 167 of file camera.h.

Referenced by EDA_3D_CANVAS::DisplayStatus().

◆ GetCurMousePosition()

const wxPoint & CAMERA::GetCurMousePosition ( )
inline

Get the current mouse position.

Definition at line 195 of file camera.h.

◆ GetDir()

const SFVEC3F & CAMERA::GetDir ( ) const
inline

Definition at line 133 of file camera.h.

Referenced by RENDER_3D_RAYTRACE::Redraw(), and RENDER_3D_RAYTRACE::render().

◆ GetFar()

float CAMERA::GetFar ( ) const
inline

Definition at line 137 of file camera.h.

◆ GetFocalLen()

const SFVEC2F & CAMERA::GetFocalLen ( ) const
inline

Definition at line 135 of file camera.h.

◆ GetFrustum()

◆ GetLookAtPos()

const SFVEC3F & CAMERA::GetLookAtPos ( ) const
inline

◆ GetLookAtPos_T1()

const SFVEC3F & CAMERA::GetLookAtPos_T1 ( ) const
inline

Definition at line 165 of file camera.h.

Referenced by EDA_3D_CANVAS::render_pivot().

◆ GetMaxZoom()

float CAMERA::GetMaxZoom ( )
inline

Definition at line 228 of file camera.h.

◆ GetMinZoom()

float CAMERA::GetMinZoom ( )
inline

Definition at line 221 of file camera.h.

◆ GetNear()

float CAMERA::GetNear ( ) const
inline

Definition at line 136 of file camera.h.

◆ GetPos()

const SFVEC3F & CAMERA::GetPos ( ) const
inline

◆ GetProjection()

◆ GetProjectionMatrix()

const glm::mat4 & CAMERA::GetProjectionMatrix ( ) const

◆ GetProjectionMatrixInv()

const glm::mat4 & CAMERA::GetProjectionMatrixInv ( ) const

Definition at line 420 of file camera.cpp.

References m_projectionMatrixInv.

◆ GetRight()

const SFVEC3F & CAMERA::GetRight ( ) const
inline

Definition at line 131 of file camera.h.

◆ GetRotationMatrix()

glm::mat4 CAMERA::GetRotationMatrix ( ) const

Get the rotation matrix to be applied in a transformation camera.

Returns
the rotation matrix of the camera

Definition at line 182 of file camera.cpp.

References m_rotationMatrix, and m_rotationMatrixAux.

Referenced by EDA_3D_MODEL_VIEWER::OnPaint(), and RENDER_3D_OPENGL::render3dArrows().

◆ GetUp()

const SFVEC3F & CAMERA::GetUp ( ) const
inline

Definition at line 132 of file camera.h.

◆ GetViewMatrix()

◆ GetViewMatrix_Inv()

const glm::mat4 & CAMERA::GetViewMatrix_Inv ( ) const

Definition at line 488 of file camera.cpp.

References m_viewMatrixInverse.

◆ GetZoom()

◆ Interpolate()

void CAMERA::Interpolate ( float  t)
virtual

It will update the matrix to interpolate between T0 and T1 values.

Parameters
tthe interpolation time, between 0.0f and 1.0f (it will clamp if >1).

Reimplemented in TRACK_BALL.

Definition at line 644 of file camera.cpp.

References m_camera_pos, m_camera_pos_t0, m_camera_pos_t1, m_lookat_pos, m_lookat_pos_t0, m_lookat_pos_t1, m_parametersChanged, m_rotate_aux, m_rotate_aux_t0, m_rotate_aux_t1, m_zoom, m_zoom_t0, m_zoom_t1, rebuildProjection(), and updateRotationMatrix().

Referenced by EDA_3D_CANVAS::DoRePaint(), TRACK_BALL::Interpolate(), and EDA_3D_CANVAS::request_start_moving_camera().

◆ MakeRay() [1/2]

void CAMERA::MakeRay ( const SFVEC2F aWindowPos,
SFVEC3F aOutOrigin,
SFVEC3F aOutDirection 
) const

Make a ray based on a windows screen position, it will interpolate based on the aWindowPos.

Parameters
aWindowPosthe windows buffer position (float value).
aOutOriginout origin position of the ray.
aOutDirectionout direction.

Definition at line 370 of file camera.cpp.

References m_dir, m_frustum, m_pos, m_projectionType, m_right_nX, m_up_nY, m_windowSize, and CAMERA_FRUSTUM::nc.

◆ MakeRay() [2/2]

void CAMERA::MakeRay ( const SFVEC2I aWindowPos,
SFVEC3F aOutOrigin,
SFVEC3F aOutDirection 
) const

Make a ray based on a windows screen position.

Parameters
aWindowPosthe windows buffer position.
aOutOriginout origin position of the ray.
aOutDirectionout direction

Definition at line 348 of file camera.cpp.

References m_dir, m_frustum, m_pos, m_projectionType, m_right_nX, m_up_nY, m_windowSize, and CAMERA_FRUSTUM::nc.

Referenced by MakeRayAtCurrentMousePosition(), RAYPACKET::RAYPACKET(), RAYPACKET_InitRays(), and RAYPACKET_InitRays_with2DDisplacement().

◆ MakeRayAtCurrentMousePosition()

void CAMERA::MakeRayAtCurrentMousePosition ( SFVEC3F aOutOrigin,
SFVEC3F aOutDirection 
) const

Make a ray based on the latest mouse position.

Parameters
aOutOriginout origin position of the ray.
aOutDirectionout direction.

Definition at line 402 of file camera.cpp.

References m_lastPosition, m_windowSize, and MakeRay().

Referenced by NL_3D_VIEWER_PLUGIN_IMPL::GetPointerPosition(), and EDA_3D_CANVAS::getRayAtCurrentMousePosition().

◆ Pan() [1/2]

virtual void CAMERA::Pan ( const SFVEC3F aDeltaOffsetInc)
pure virtual

Implemented in TRACK_BALL.

◆ Pan() [2/2]

virtual void CAMERA::Pan ( const wxPoint &  aNewMousePosition)
pure virtual

◆ Pan_T1()

virtual void CAMERA::Pan_T1 ( const SFVEC3F aDeltaOffsetInc)
pure virtual

Implemented in TRACK_BALL.

Referenced by EDA_3D_CANVAS::SetView3D().

◆ ParametersChanged()

bool CAMERA::ParametersChanged ( )
Returns
true if some of the parameters in camera was changed, it will reset the flag.

Definition at line 662 of file camera.cpp.

References m_parametersChanged.

Referenced by EDA_3D_CANVAS::DoRePaint(), and RENDER_3D_RAYTRACE::Redraw().

◆ ParametersChangedQuery()

bool CAMERA::ParametersChangedQuery ( ) const
inline
Returns
true if some of the parameters in camera was changed, it will NOT reset the flag.

Definition at line 268 of file camera.h.

◆ rebuildProjection()

◆ Reset()

◆ Reset_T1()

void CAMERA::Reset_T1 ( )
virtual

◆ ResetXYpos()

void CAMERA::ResetXYpos ( )

Definition at line 432 of file camera.cpp.

References m_camera_pos, m_parametersChanged, updateFrustum(), and updateViewMatrix().

◆ ResetXYpos_T1()

void CAMERA::ResetXYpos_T1 ( )

Definition at line 443 of file camera.cpp.

References m_camera_pos_t1.

Referenced by EDA_3D_CANVAS::move_pivot_based_on_cur_mouse_position().

◆ RotateX()

void CAMERA::RotateX ( float  aAngleInRadians)

Definition at line 591 of file camera.cpp.

References m_rotate_aux, and updateRotationMatrix().

Referenced by EDA_3D_CONTROLLER::RotateView().

◆ RotateX_T1()

void CAMERA::RotateX_T1 ( float  aAngleInRadians)

Definition at line 612 of file camera.cpp.

References m_rotate_aux_t1.

Referenced by EDA_3D_CANVAS::SetView3D().

◆ RotateY()

void CAMERA::RotateY ( float  aAngleInRadians)

Definition at line 598 of file camera.cpp.

References m_rotate_aux, and updateRotationMatrix().

Referenced by EDA_3D_CONTROLLER::RotateView().

◆ RotateY_T1()

void CAMERA::RotateY_T1 ( float  aAngleInRadians)

Definition at line 618 of file camera.cpp.

References m_rotate_aux_t1.

Referenced by EDA_3D_CANVAS::SetView3D().

◆ RotateZ()

void CAMERA::RotateZ ( float  aAngleInRadians)

Definition at line 605 of file camera.cpp.

References m_rotate_aux, and updateRotationMatrix().

Referenced by EDA_3D_CONTROLLER::RotateView().

◆ RotateZ_T1()

void CAMERA::RotateZ_T1 ( float  aAngleInRadians)

Definition at line 624 of file camera.cpp.

References m_rotate_aux_t1.

Referenced by EDA_3D_CANVAS::SetView3D().

◆ SetBoardLookAtPos()

void CAMERA::SetBoardLookAtPos ( const SFVEC3F aBoardPos)

◆ SetCurMousePosition()

void CAMERA::SetCurMousePosition ( const wxPoint &  aPosition)

Update the current mouse position without make any new calculations on camera.

Definition at line 494 of file camera.cpp.

References m_lastPosition.

Referenced by EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), EDA_3D_MODEL_VIEWER::OnMouseWheel(), and HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().

◆ SetCurWindowSize()

bool CAMERA::SetCurWindowSize ( const wxSize &  aSize)

Update the windows size of the camera.

Returns
true if the windows size changed since last time.

Definition at line 511 of file camera.cpp.

References m_windowSize, and rebuildProjection().

Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), and EDA_3D_MODEL_VIEWER::OnPaint().

◆ SetInterpolateMode()

void CAMERA::SetInterpolateMode ( CAMERA_INTERPOLATION  aInterpolateMode)
inline

◆ SetLookAtPos_T1()

void CAMERA::SetLookAtPos_T1 ( const SFVEC3F aLookAtPos)
inline

◆ SetMaxZoom()

void CAMERA::SetMaxZoom ( float  maxZoom)
inline

Definition at line 229 of file camera.h.

Referenced by RENDER_3D_RAYTRACE::Reload().

◆ SetMinZoom()

void CAMERA::SetMinZoom ( float  minZoom)
inline

Definition at line 222 of file camera.h.

Referenced by RENDER_3D_RAYTRACE::Reload().

◆ SetProjection()

void CAMERA::SetProjection ( PROJECTION_TYPE  aProjection)
inline

Definition at line 204 of file camera.h.

Referenced by EDA_3D_CANVAS::SetProjectionMode().

◆ SetRotationMatrix()

void CAMERA::SetRotationMatrix ( const glm::mat4 &  aRotation)

Set the rotation matrix to be applied in a transformation camera, without making any new calculations on camera.

Parameters
aRotationis the total rotation matrix of the camera.

Definition at line 188 of file camera.cpp.

References m_parametersChanged, m_rotationMatrix, and m_rotationMatrixAux.

Referenced by SetViewMatrix().

◆ SetT0_and_T1_current_T()

void CAMERA::SetT0_and_T1_current_T ( )
virtual

◆ SetViewMatrix()

void CAMERA::SetViewMatrix ( glm::mat4  aViewMatrix)

Set the affine matrix to be applied to a transformation camera.

Parameters
aViewMatrixis the affine matrix of the camera. The affine matrix maps coordinates in the world frame to those in the camera frame.

Definition at line 456 of file camera.cpp.

References m_camera_pos, m_camera_pos_init, m_logTrace, m_lookat_pos, m_maxZoom, m_minZoom, m_rotationMatrix, m_rotationMatrixAux, m_viewMatrix, m_zoom, and SetRotationMatrix().

Referenced by APPEARANCE_CONTROLS_3D::doApplyViewport(), and NL_3D_VIEWER_PLUGIN_IMPL::SetCameraMatrix().

◆ ToggleProjection()

void CAMERA::ToggleProjection ( )

◆ Update()

void CAMERA::Update ( )
inline

Update the camera.

Definition at line 300 of file camera.h.

Referenced by NL_3D_VIEWER_PLUGIN_IMPL::SetCameraMatrix().

◆ updateFrustum()

◆ updateRotationMatrix()

void CAMERA::updateRotationMatrix ( )
protected

◆ updateViewMatrix()

◆ Zoom()

◆ Zoom_T1()

bool CAMERA::Zoom_T1 ( float  aFactor)

Definition at line 569 of file camera.cpp.

References m_camera_pos_init, m_camera_pos_t1, m_maxZoom, m_minZoom, m_zoom, and m_zoom_t1.

Referenced by EDA_3D_CANVAS::SetView3D().

◆ zoomChanged()

void CAMERA::zoomChanged ( )
protected

◆ ZoomReset()

void CAMERA::ZoomReset ( )

Member Data Documentation

◆ DEFAULT_MAX_ZOOM

const float CAMERA::DEFAULT_MAX_ZOOM = 2.0f
static

Definition at line 105 of file camera.h.

Referenced by CAMERA(), and RENDER_3D_RAYTRACE::Reload().

◆ DEFAULT_MIN_ZOOM

const float CAMERA::DEFAULT_MIN_ZOOM = 0.020f
static

Definition at line 104 of file camera.h.

Referenced by CAMERA().

◆ m_board_lookat_pos_init

SFVEC3F CAMERA::m_board_lookat_pos_init
protected

Default boardlookat position (the board center).

Definition at line 358 of file camera.h.

Referenced by CAMERA(), Reset(), Reset_T1(), and SetBoardLookAtPos().

◆ m_camera_pos

◆ m_camera_pos_init

SFVEC3F CAMERA::m_camera_pos_init
protected

◆ m_camera_pos_t0

SFVEC3F CAMERA::m_camera_pos_t0
protected

Definition at line 352 of file camera.h.

Referenced by Interpolate(), Reset(), and SetT0_and_T1_current_T().

◆ m_camera_pos_t1

SFVEC3F CAMERA::m_camera_pos_t1
protected

◆ m_dir

SFVEC3F CAMERA::m_dir
protected

Definition at line 345 of file camera.h.

Referenced by MakeRay(), and updateFrustum().

◆ m_focalLen

SFVEC2F CAMERA::m_focalLen
protected

Definition at line 348 of file camera.h.

Referenced by rebuildProjection().

◆ m_frustum

CAMERA_FRUSTUM CAMERA::m_frustum
protected

◆ m_interpolation_mode

CAMERA_INTERPOLATION CAMERA::m_interpolation_mode
protected

Definition at line 364 of file camera.h.

Referenced by CAMERA(), and TRACK_BALL::Interpolate().

◆ m_lastPosition

wxPoint CAMERA::m_lastPosition
protected

The last mouse position in the screen.

Definition at line 331 of file camera.h.

Referenced by TRACK_BALL::Drag(), MakeRayAtCurrentMousePosition(), TRACK_BALL::Pan(), Reset(), and SetCurMousePosition().

◆ m_lookat_pos

SFVEC3F CAMERA::m_lookat_pos
protected

◆ m_lookat_pos_t0

SFVEC3F CAMERA::m_lookat_pos_t0
protected

Definition at line 356 of file camera.h.

Referenced by Interpolate(), Reset(), and SetT0_and_T1_current_T().

◆ m_lookat_pos_t1

SFVEC3F CAMERA::m_lookat_pos_t1
protected

Definition at line 357 of file camera.h.

Referenced by Interpolate(), Reset(), Reset_T1(), and SetT0_and_T1_current_T().

◆ m_maxZoom

float CAMERA::m_maxZoom
protected

Definition at line 321 of file camera.h.

Referenced by CAMERA(), rebuildProjection(), SetViewMatrix(), Zoom(), Zoom_T1(), and zoomChanged().

◆ m_minZoom

float CAMERA::m_minZoom
protected

Possible 3D zoom range.

Definition at line 320 of file camera.h.

Referenced by CAMERA(), SetViewMatrix(), Zoom(), Zoom_T1(), and zoomChanged().

◆ m_parametersChanged

bool CAMERA::m_parametersChanged
protected

Set to true if any of the parameters in the camera was changed.

Definition at line 382 of file camera.h.

Referenced by TRACK_BALL::Drag(), Interpolate(), TRACK_BALL::Pan(), ParametersChanged(), Reset(), ResetXYpos(), SetBoardLookAtPos(), SetRotationMatrix(), and updateRotationMatrix().

◆ m_pos

SFVEC3F CAMERA::m_pos
protected

Definition at line 346 of file camera.h.

Referenced by MakeRay(), and updateFrustum().

◆ m_projectionMatrix

glm::mat4 CAMERA::m_projectionMatrix
protected

Definition at line 337 of file camera.h.

Referenced by GetProjectionMatrix(), rebuildProjection(), and Reset().

◆ m_projectionMatrixInv

glm::mat4 CAMERA::m_projectionMatrixInv
protected

Definition at line 338 of file camera.h.

Referenced by GetProjectionMatrixInv(), rebuildProjection(), and Reset().

◆ m_projectionType

PROJECTION_TYPE CAMERA::m_projectionType
protected

Definition at line 339 of file camera.h.

Referenced by CAMERA(), MakeRay(), TRACK_BALL::Pan(), rebuildProjection(), and ToggleProjection().

◆ m_right

SFVEC3F CAMERA::m_right
protected

Definition at line 343 of file camera.h.

Referenced by updateFrustum().

◆ m_right_nX

std::vector< SFVEC3F > CAMERA::m_right_nX
protected

Precalc values array used to calc ray for each pixel, for X and Y axis of each new camera position.

Definition at line 376 of file camera.h.

Referenced by MakeRay(), and updateFrustum().

◆ m_rotate_aux

SFVEC3F CAMERA::m_rotate_aux
protected

Stores the rotation angle auxiliary.

Definition at line 360 of file camera.h.

Referenced by Interpolate(), Reset(), RotateX(), RotateY(), RotateZ(), SetT0_and_T1_current_T(), and updateRotationMatrix().

◆ m_rotate_aux_t0

SFVEC3F CAMERA::m_rotate_aux_t0
protected

Definition at line 361 of file camera.h.

Referenced by Interpolate(), Reset(), Reset_T1(), and SetT0_and_T1_current_T().

◆ m_rotate_aux_t1

SFVEC3F CAMERA::m_rotate_aux_t1
protected

◆ m_rotationMatrix

◆ m_rotationMatrixAux

glm::mat4 CAMERA::m_rotationMatrixAux
protected

◆ m_scr_nX

std::vector< float > CAMERA::m_scr_nX
protected

Precalc values array used to calc ray for each pixel (constant for the same window size).

Definition at line 369 of file camera.h.

Referenced by rebuildProjection(), Reset(), and updateFrustum().

◆ m_scr_nY

std::vector< float > CAMERA::m_scr_nY
protected

Definition at line 370 of file camera.h.

Referenced by rebuildProjection(), Reset(), and updateFrustum().

◆ m_up

SFVEC3F CAMERA::m_up
protected

Definition at line 344 of file camera.h.

Referenced by updateFrustum().

◆ m_up_nY

std::vector< SFVEC3F > CAMERA::m_up_nY
protected

Definition at line 377 of file camera.h.

Referenced by MakeRay(), and updateFrustum().

◆ m_viewMatrix

glm::mat4 CAMERA::m_viewMatrix
protected

Definition at line 335 of file camera.h.

Referenced by GetViewMatrix(), Reset(), SetViewMatrix(), updateFrustum(), and updateViewMatrix().

◆ m_viewMatrixInverse

glm::mat4 CAMERA::m_viewMatrixInverse
protected

Definition at line 336 of file camera.h.

Referenced by GetViewMatrix_Inv(), Reset(), and updateFrustum().

◆ m_windowSize

SFVEC2I CAMERA::m_windowSize
protected

The window size that this camera is working.

Definition at line 326 of file camera.h.

Referenced by CAMERA(), TRACK_BALL::Drag(), MakeRay(), MakeRayAtCurrentMousePosition(), TRACK_BALL::Pan(), rebuildProjection(), SetCurWindowSize(), and updateFrustum().

◆ m_zoom

float CAMERA::m_zoom
protected

3D zoom value – Z-distance is scaled by it

Definition at line 313 of file camera.h.

Referenced by Interpolate(), rebuildProjection(), Reset(), SetT0_and_T1_current_T(), SetViewMatrix(), Zoom(), Zoom_T1(), zoomChanged(), and ZoomReset().

◆ m_zoom_t0

float CAMERA::m_zoom_t0
protected

Definition at line 314 of file camera.h.

Referenced by Interpolate(), Reset(), and SetT0_and_T1_current_T().

◆ m_zoom_t1

float CAMERA::m_zoom_t1
protected

Definition at line 315 of file camera.h.

Referenced by Interpolate(), Reset(), Reset_T1(), SetT0_and_T1_current_T(), and Zoom_T1().


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