KiCad PCB EDA Suite
ccamera.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
5  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #include "ccamera.h"
31 #include <wx/log.h>
32 
33 
34 // A helper function to normalize aAngle between -2PI and +2PI
35 inline void normalise2PI( float& aAngle )
36 {
37  while( aAngle > 0.0 )
38  aAngle -= static_cast<float>( M_PI * 2.0f );
39 
40  while( aAngle < 0.0 )
41  aAngle += static_cast<float>( M_PI * 2.0f );
42 }
43 
44 
51 const wxChar *CCAMERA::m_logTrace = wxT( "KI_TRACE_CCAMERA" );
52 
53 #define MIN_ZOOM 0.10f
54 #define MAX_ZOOM 1.25f
55 
56 CCAMERA::CCAMERA( float aRangeScale )
57 {
58  wxLogTrace( m_logTrace, wxT( "CCAMERA::CCAMERA" ) );
59 
60  m_range_scale = aRangeScale;
61  m_camera_pos_init = SFVEC3F( 0.0f, 0.0f, -(aRangeScale * 2.0f ) );
63  m_windowSize = SFVEC2I( 0, 0 );
66 
67  Reset();
68 }
69 
70 
72 {
73  m_parametersChanged = true;
74  m_projectionMatrix = glm::mat4( 1.0f );
75  m_projectionMatrixInv = glm::mat4( 1.0f );
76  m_rotationMatrix = glm::mat4( 1.0f );
77  m_rotationMatrixAux = glm::mat4( 1.0f );
78  m_lastPosition = wxPoint( 0, 0 );
79 
80  m_zoom = 1.0f;
81  m_zoom_t0 = 1.0f;
82  m_zoom_t1 = 1.0f;
89 
90  m_rotate_aux = SFVEC3F( 0.0f );
91  m_rotate_aux_t0 = SFVEC3F( 0.0f );
92  m_rotate_aux_t1 = SFVEC3F( 0.0f );
93 
96  m_viewMatrixInverse = glm::inverse( m_viewMatrix );
97  m_scr_nX.clear();
98  m_scr_nY.clear();
100 }
101 
102 
104 {
106  m_zoom_t1 = 1.0f;
107  m_rotate_aux_t1 = SFVEC3F( 0.0f );
109 
110 
111  // Since 0 = 2pi, we want to reset the angle to be the closest
112  // one to where we currently are. That ensures that we rotate
113  // the board around the smallest distance getting there.
114  if( m_rotate_aux_t0.x > M_PI )
115  m_rotate_aux_t1.x = static_cast<float>( 2.0f * M_PI );
116 
117  if( m_rotate_aux_t0.y > M_PI )
118  m_rotate_aux_t1.y = static_cast<float>( 2.0f * M_PI );
119 
120  if( m_rotate_aux_t0.z > M_PI )
121  m_rotate_aux_t1.z = static_cast<float>( 2.0f * M_PI );
122 }
123 
124 
126 {
127  m_viewMatrix = glm::translate( glm::mat4( 1.0f ), m_camera_pos ) *
129  glm::translate( glm::mat4( 1.0f ), -m_lookat_pos );
130 }
131 
132 
134 {
135  m_rotationMatrixAux = glm::rotate( glm::mat4( 1.0f ),
136  m_rotate_aux.x,
137  SFVEC3F( 1.0f, 0.0f, 0.0f ) );
139 
141  m_rotate_aux.y,
142  SFVEC3F( 0.0f, 1.0f, 0.0f ) );
144 
146  m_rotate_aux.z,
147  SFVEC3F( 0.0f, 0.0f, 1.0f ) );
149 
150  m_parametersChanged = true;
151 
153  updateFrustum();
154 }
155 
156 
157 const glm::mat4 CCAMERA::GetRotationMatrix() const
158 {
160 }
161 
162 
164 {
165  if( (m_windowSize.x == 0) ||
166  (m_windowSize.y == 0) )
167  return;
168 
169  m_frustum.ratio = (float) m_windowSize.x / (float)m_windowSize.y;
170 
171  // Consider that we can render double the length multiplied by the 2/sqrt(2)
172  //
173  m_frustum.farD = glm::length( m_camera_pos_init ) * 2.0f * ( 2.0f * sqrtf( 2.0f ) );
174 
175  switch( m_projectionType )
176  {
177  default:
179 
180  m_frustum.nearD = 0.10f;
181 
182  // Ratio width / height of the window display
183  m_frustum.angle = 45.0f * m_zoom;
184 
185 
186  m_projectionMatrix = glm::perspective( glm::radians( m_frustum.angle ),
189  m_frustum.farD );
190 
191  m_projectionMatrixInv = glm::inverse( m_projectionMatrix );
192 
193  m_frustum.tang = glm::tan( glm::radians( m_frustum.angle ) * 0.5f );
194 
195  m_focalLen.x = ( (float)m_windowSize.y / (float)m_windowSize.x ) / m_frustum.tang;
196  m_focalLen.y = 1.0f / m_frustum.tang;
197 
202  break;
203 
205 
206  m_frustum.nearD = -m_frustum.farD; // Use a symmetrical clip plane for ortho projection
207 
208  // This formula was found by trial and error
209  const float orthoReductionFactor = glm::length( m_camera_pos_init ) *
210  m_zoom * m_zoom * 0.5f;
211 
212  // Initialize Projection Matrix for Ortographic View
213  m_projectionMatrix = glm::ortho( -m_frustum.ratio * orthoReductionFactor,
214  m_frustum.ratio * orthoReductionFactor,
215  -orthoReductionFactor,
216  orthoReductionFactor,
218 
219  m_projectionMatrixInv = glm::inverse( m_projectionMatrix );
220 
221  m_frustum.nw = orthoReductionFactor * 2.0f * m_frustum.ratio;
222  m_frustum.nh = orthoReductionFactor * 2.0f;
225 
226  break;
227  }
228 
229  if ( (m_windowSize.x > 0) &&
230  (m_windowSize.y > 0) )
231  {
232  m_scr_nX.resize( m_windowSize.x + 1 );
233  m_scr_nY.resize( m_windowSize.y + 1 );
234 
235  // Precalc X values for camera -> ray generation
236  for( unsigned int x = 0; x < (unsigned int)m_windowSize.x + 1; ++x )
237  {
238  // Converts 0.0 .. 1.0
239  const float xNormalizedDeviceCoordinates = ( ( (float)x + 0.5f ) /
240  (m_windowSize.x - 0.0f) );
241 
242  // Converts -1.0 .. 1.0
243  m_scr_nX[x] = 2.0f * xNormalizedDeviceCoordinates - 1.0f;
244  }
245 
246  // Precalc Y values for camera -> ray generation
247  for( unsigned int y = 0; y < (unsigned int)m_windowSize.y + 1 ; ++y )
248  {
249  // Converts 0.0 .. 1.0
250  const float yNormalizedDeviceCoordinates = ( ( (float)y + 0.5f ) /
251  (m_windowSize.y - 0.0f) );
252 
253  // Converts -1.0 .. 1.0
254  m_scr_nY[y] = 2.0f * yNormalizedDeviceCoordinates - 1.0f;
255  }
256 
257  updateFrustum();
258  }
259 }
260 
261 
263 {
264  // Update matrix and vectors
265  m_viewMatrixInverse = glm::inverse( m_viewMatrix );
266 
267  m_right = glm::normalize( SFVEC3F( m_viewMatrixInverse *
268  glm::vec4( SFVEC3F( 1.0, 0.0, 0.0 ), 0.0 ) ) );
269 
270  m_up = glm::normalize( SFVEC3F( m_viewMatrixInverse *
271  glm::vec4( SFVEC3F( 0.0, 1.0, 0.0 ), 0.0 ) ) );
272 
273  m_dir = glm::normalize( SFVEC3F( m_viewMatrixInverse *
274  glm::vec4( SFVEC3F( 0.0, 0.0, 1.0 ), 0.0 ) ) );
275 
276  m_pos = SFVEC3F( m_viewMatrixInverse * glm::vec4( SFVEC3F( 0.0, 0.0, 0.0 ), 1.0 ) );
277 
278 
279  /*
280  * Frustum is a implementation based on a tutorial by
281  * http://www.lighthouse3d.com/tutorials/view-frustum-culling/
282  */
283 
284  // compute the centers of the near and far planes
287 
288  // compute the 4 corners of the frustum on the near plane
293 
294  // compute the 4 corners of the frustum on the far plane
299 
300  if ( (m_windowSize.x > 0) &&
301  (m_windowSize.y > 0) )
302  {
303  // Reserve size for precalc values
304  m_right_nX.resize( m_windowSize.x + 1 );
305  m_up_nY.resize( m_windowSize.y + 1 );
306 
307  // Precalc X values for camera -> ray generation
308  const SFVEC3F right_nw = m_right * m_frustum.nw;
309 
310  for( unsigned int x = 0; x < ((unsigned int)m_windowSize.x + 1); ++x )
311  m_right_nX[x] = right_nw * m_scr_nX[x];
312 
313  // Precalc Y values for camera -> ray generation
314  const SFVEC3F up_nh = m_up * m_frustum.nh;
315 
316  for( unsigned int y = 0; y < ((unsigned int)m_windowSize.y + 1); ++y )
317  m_up_nY[y] = up_nh * m_scr_nY[y];
318  }
319 }
320 
321 
322 void CCAMERA::MakeRay( const SFVEC2I &aWindowPos,
323  SFVEC3F &aOutOrigin,
324  SFVEC3F &aOutDirection ) const
325 {
326  wxASSERT( aWindowPos.x < m_windowSize.x );
327  wxASSERT( aWindowPos.y < m_windowSize.y );
328 
329  const SFVEC3F up_plus_right = m_up_nY[aWindowPos.y] +
330  m_right_nX[aWindowPos.x];
331 
332  switch( m_projectionType )
333  {
334  default:
336  aOutOrigin = up_plus_right + m_frustum.nc;
337  aOutDirection = glm::normalize( aOutOrigin - m_pos );
338  break;
339 
341  aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
342  aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
343  break;
344  }
345 }
346 
347 
348 void CCAMERA::MakeRay( const SFVEC2F &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &aOutDirection ) const
349 {
350  wxASSERT( aWindowPos.x < (float)m_windowSize.x );
351  wxASSERT( aWindowPos.y < (float)m_windowSize.y );
352 
353  const SFVEC2F floorWinPos_f = glm::floor( aWindowPos );
354  const SFVEC2I floorWinPos_i = (SFVEC2I)floorWinPos_f;
355  const SFVEC2F relativeWinPos = aWindowPos - floorWinPos_f;
356 
357  // Note: size of vectors m_up and m_right are m_windowSize + 1
358  const SFVEC3F up_plus_right = m_up_nY[floorWinPos_i.y] * (1.0f - relativeWinPos.y) +
359  m_up_nY[floorWinPos_i.y + 1] * relativeWinPos.y +
360  m_right_nX[floorWinPos_i.x] * (1.0f - relativeWinPos.x) +
361  m_right_nX[floorWinPos_i.x + 1] * relativeWinPos.x;
362 
363  switch( m_projectionType )
364  {
365  default:
367  aOutOrigin = up_plus_right + m_frustum.nc;
368  aOutDirection = glm::normalize( aOutOrigin - m_pos );
369  break;
370 
372  aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
373  aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
374  break;
375  }
376 }
377 
378 
380  SFVEC3F &aOutDirection ) const
381 {
382  const SFVEC2I windowPos = SFVEC2I( m_lastPosition.x,
384 
385  if( ( 0 < windowPos.x ) && ( windowPos.x < m_windowSize.x ) &&
386  ( 0 < windowPos.y ) && ( windowPos.y < m_windowSize.y ) )
387  {
388  MakeRay( windowPos, aOutOrigin, aOutDirection );
389  }
390 }
391 
392 
393 const glm::mat4 &CCAMERA::GetProjectionMatrix() const
394 {
395  return m_projectionMatrix;
396 }
397 
398 
399 const glm::mat4 &CCAMERA::GetProjectionMatrixInv() const
400 {
401  return m_projectionMatrixInv;
402 }
403 
404 
406 {
407  m_parametersChanged = true;
408  m_camera_pos.x = 0.0f;
409  m_camera_pos.y = 0.0f;
410 
412  updateFrustum();
413 }
414 
415 
417 {
418  m_camera_pos_t1.x = 0.0f;
419  m_camera_pos_t1.y = 0.0f;
420 }
421 
422 
423 const glm::mat4 &CCAMERA::GetViewMatrix() const
424 {
425  return m_viewMatrix;
426 }
427 
428 
429 const glm::mat4 &CCAMERA::GetViewMatrix_Inv() const
430 {
431  return m_viewMatrixInverse;
432 }
433 
434 
435 void CCAMERA::SetCurMousePosition( const wxPoint &aNewMousePosition )
436 {
437  m_lastPosition = aNewMousePosition;
438 }
439 
440 
442 {
445  else
447 
449 }
450 
451 
452 bool CCAMERA::SetCurWindowSize( const wxSize &aSize )
453 {
454  const SFVEC2I newSize = SFVEC2I( aSize.x, aSize.y );
455 
456  if( m_windowSize != newSize )
457  {
458  m_windowSize = newSize;
460 
461  return true;
462  }
463 
464  return false;
465 }
466 
467 
469 {
470  m_zoom = 1.0f;
471 
473 
476 }
477 
478 bool CCAMERA::Zoom( float aFactor )
479 {
480  if ( ( m_zoom == MIN_ZOOM && aFactor > 1 ) || ( m_zoom == MAX_ZOOM && aFactor < 1 ) || aFactor == 1 )
481  return false;
482 
483  m_zoom /= aFactor;
484  if( m_zoom <= MIN_ZOOM )
485  m_zoom = MIN_ZOOM;
486  if( m_zoom >= MAX_ZOOM )
487  m_zoom = MAX_ZOOM;
488 
490 
493 
494  return true;
495 }
496 
497 bool CCAMERA::Zoom_T1( float aFactor )
498 {
499  if( ( m_zoom == MIN_ZOOM && aFactor > 1 ) || ( m_zoom == MAX_ZOOM && aFactor < 1 ) || aFactor == 1 )
500  return false;
501 
502  m_zoom_t1 = m_zoom / aFactor;
503  if (m_zoom_t1 < MIN_ZOOM )
505  if (m_zoom_t1 > MAX_ZOOM )
507 
509 
510  return true;
511 }
512 
513 
514 float CCAMERA::ZoomGet() const
515 {
516  return m_zoom;
517 }
518 
519 
520 void CCAMERA::RotateX( float aAngleInRadians )
521 {
522  m_rotate_aux.x += aAngleInRadians;
524 }
525 
526 
527 void CCAMERA::RotateY( float aAngleInRadians )
528 {
529  m_rotate_aux.y += aAngleInRadians;
531 }
532 
533 
534 void CCAMERA::RotateZ( float aAngleInRadians )
535 {
536  m_rotate_aux.z += aAngleInRadians;
538 }
539 
540 
541 void CCAMERA::RotateX_T1( float aAngleInRadians )
542 {
543  m_rotate_aux_t1.x += aAngleInRadians;
544 }
545 
546 
547 void CCAMERA::RotateY_T1( float aAngleInRadians )
548 {
549  m_rotate_aux_t1.y += aAngleInRadians;
550 }
551 
552 
553 void CCAMERA::RotateZ_T1( float aAngleInRadians )
554 {
555  m_rotate_aux_t1.z += aAngleInRadians;
556 }
557 
558 
560 {
564  m_zoom_t0 = m_zoom;
565 
569  m_zoom_t1 = m_zoom;
570 }
571 
572 
573 void CCAMERA::Interpolate( float t )
574 {
575  wxASSERT( t >= 0.0f );
576 
577  const float t0 = 1.0f - t;
578 
582  m_zoom = m_zoom_t0 * t0 + m_zoom_t1 * t;
583 
584  m_parametersChanged = true;
585 
588 }
589 
590 
592 {
593  const bool parametersChanged = m_parametersChanged;
594 
595  m_parametersChanged = false;
596 
597  return parametersChanged;
598 }
#define MAX_ZOOM
Definition: ccamera.cpp:54
SFVEC3F fc
Definition: ccamera.h:51
void ResetXYpos()
Definition: ccamera.cpp:405
bool m_parametersChanged
Set to true if any of the parameters in the camera was changed.
Definition: ccamera.h:324
SFVEC3F m_dir
Definition: ccamera.h:285
virtual void SetT0_and_T1_current_T()
SetT0_and_T1_current_T - This will set T0 and T1 with the current values.
Definition: ccamera.cpp:559
SFVEC3F ftl
Far Top Left.
Definition: ccamera.h:56
void ResetXYpos_T1()
Definition: ccamera.cpp:416
SFVEC3F ntl
Near Top Left.
Definition: ccamera.h:52
virtual void Reset()
Reset the camera to initial state.
Definition: ccamera.cpp:71
float farD
Definition: ccamera.h:60
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
Definition: ccamera.h:332
SFVEC3F m_board_lookat_pos_init
Default boardlookat position (the board center)
Definition: ccamera.h:298
SFVEC3F m_rotate_aux
Stores the rotation angle auxiliar.
Definition: ccamera.h:300
void ZoomReset()
Definition: ccamera.cpp:468
void RotateY(float aAngleInRadians)
Definition: ccamera.cpp:527
CCAMERA(float aRangeScale)
CCAMERA initialize a camera.
Definition: ccamera.cpp:56
void updateFrustum()
Definition: ccamera.cpp:262
std::vector< SFVEC3F > m_up_nY
Definition: ccamera.h:318
float nearD
Definition: ccamera.h:60
glm::mat4 m_viewMatrixInverse
Definition: ccamera.h:276
float nw
Definition: ccamera.h:61
std::vector< float > m_scr_nY
Definition: ccamera.h:311
std::vector< float > m_scr_nX
Precalc values array used to calc ray for each pixel (constant for the same window size)
Definition: ccamera.h:310
SFVEC3F fbr
Far Bottom Right.
Definition: ccamera.h:59
Define an abstract camera.
glm::ivec2 SFVEC2I
Definition: xv3d_types.h:42
float tang
Definition: ccamera.h:60
void updateViewMatrix()
Definition: ccamera.cpp:125
wxPoint m_lastPosition
The last mouse position in the screen.
Definition: ccamera.h:271
void SetCurMousePosition(const wxPoint &aPosition)
It updates the current mouse position without make any new recalculations on camera.
Definition: ccamera.cpp:435
bool Zoom(float aFactor)
Definition: ccamera.cpp:478
const glm::mat4 GetRotationMatrix() const
Function GetRotationMatrix Get the rotation matrix to be applied in a transformation camera.
Definition: ccamera.cpp:157
float fw
Definition: ccamera.h:61
void RotateZ(float aAngleInRadians)
Definition: ccamera.cpp:534
void RotateX(float aAngleInRadians)
Definition: ccamera.cpp:520
SFVEC2F m_focalLen
Definition: ccamera.h:288
SFVEC3F nbr
Near Bottom Right.
Definition: ccamera.h:55
SFVEC3F m_camera_pos_t1
Definition: ccamera.h:293
SFVEC3F fbl
Far Bottom Left.
Definition: ccamera.h:58
float m_zoom_t0
Definition: ccamera.h:260
float ZoomGet() const
Definition: ccamera.cpp:514
glm::vec2 SFVEC2F
Definition: xv3d_types.h:45
SFVEC3F m_right
Definition: ccamera.h:283
SFVEC3F m_pos
Definition: ccamera.h:286
void ToggleProjection()
Definition: ccamera.cpp:441
float angle
Definition: ccamera.h:60
SFVEC3F m_up
Definition: ccamera.h:284
SFVEC3F m_lookat_pos_t1
Definition: ccamera.h:297
virtual void Interpolate(float t)
Interpolate - It will update the matrix to interpolate between T0 and T1 values.
Definition: ccamera.cpp:573
SFVEC3F nbl
Near Bottom Left.
Definition: ccamera.h:54
float m_range_scale
m_range_scale - the nominal range expected to be used in the camera.
Definition: ccamera.h:254
SFVEC3F m_lookat_pos_t0
Definition: ccamera.h:296
bool SetCurWindowSize(const wxSize &aSize)
SetCurWindowSize - update the windows size of the camera.
Definition: ccamera.cpp:452
glm::mat4 m_rotationMatrix
Definition: ccamera.h:273
SFVEC3F ntr
Near Top Right.
Definition: ccamera.h:53
FRUSTUM m_frustum
Definition: ccamera.h:281
glm::mat4 m_projectionMatrix
Definition: ccamera.h:277
bool Zoom_T1(float aFactor)
Definition: ccamera.cpp:497
void RotateX_T1(float aAngleInRadians)
Definition: ccamera.cpp:541
virtual void Reset_T1()
Definition: ccamera.cpp:103
float m_zoom
3D zoom value (Min 0.0 ...
Definition: ccamera.h:259
SFVEC3F m_rotate_aux_t1
Definition: ccamera.h:302
void updateRotationMatrix()
Definition: ccamera.cpp:133
SFVEC3F m_camera_pos_init
Definition: ccamera.h:290
SFVEC3F m_camera_pos
Definition: ccamera.h:291
SFVEC3F m_camera_pos_t0
Definition: ccamera.h:292
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.
Definition: ccamera.h:317
SFVEC3F nc
Definition: ccamera.h:50
void RotateY_T1(float aAngleInRadians)
Definition: ccamera.cpp:547
void MakeRayAtCurrrentMousePosition(SFVEC3F &aOutOrigin, SFVEC3F &aOutDirection) const
MakeRayAtCurrrentMousePosition - Make a ray based on the latest mouse position.
Definition: ccamera.cpp:379
const glm::mat4 & GetViewMatrix() const
Definition: ccamera.cpp:423
void rebuildProjection()
Definition: ccamera.cpp:163
#define MIN_ZOOM
Definition: ccamera.cpp:53
glm::vec3 SFVEC3F
Definition: xv3d_types.h:47
void normalise2PI(float &aAngle)
Definition: ccamera.cpp:35
SFVEC2I m_windowSize
The window size that this camera is working.
Definition: ccamera.h:266
SFVEC3F ftr
Far Top Right.
Definition: ccamera.h:57
const glm::mat4 & GetProjectionMatrix() const
Definition: ccamera.cpp:393
float m_zoom_t1
Definition: ccamera.h:261
CAMERA_INTERPOLATION m_interpolation_mode
Definition: ccamera.h:304
void MakeRay(const SFVEC2I &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &aOutDirection) const
MakeRay - Make a ray based on a windows screen position.
Definition: ccamera.cpp:322
const glm::mat4 & GetProjectionMatrixInv() const
Definition: ccamera.cpp:399
SFVEC3F m_rotate_aux_t0
Definition: ccamera.h:301
glm::mat4 m_rotationMatrixAux
Definition: ccamera.h:274
const glm::mat4 & GetViewMatrix_Inv() const
Definition: ccamera.cpp:429
void RotateZ_T1(float aAngleInRadians)
Definition: ccamera.cpp:553
float fh
Definition: ccamera.h:61
float nh
Definition: ccamera.h:61
float ratio
Definition: ccamera.h:60
glm::mat4 m_viewMatrix
Definition: ccamera.h:275
glm::mat4 m_projectionMatrixInv
Definition: ccamera.h:278
bool ParametersChanged()
Function ParametersChanged.
Definition: ccamera.cpp:591
SFVEC3F m_lookat_pos
Definition: ccamera.h:295
PROJECTION_TYPE m_projectionType
Definition: ccamera.h:279