Commit 0fcdbe2a authored by Frédéric Larue's avatar Frédéric Larue
Browse files

It is now possible to set/get the render state of the GLViewer, for example to...

It is now possible to set/get the render state of the GLViewer, for example to backup the view configuration at a specific moment.

Moreover, render state can be backed up by using SHIFT+[F1...F12] and restored with [F1...F12].
parent f8232f65
......@@ -134,18 +134,18 @@ void GLViewer::init( DisplayDoF dof )
m_BelowCursor = NULL;
m_MustUpdateFocal = false;
m_MustUpdateProjectionMatrix = false;
m_MustUpdateViewMatrix = false;
m_MustUpdateFocal = true;
m_MustUpdateProjectionMatrix = true;
m_MustUpdateViewMatrix = true;
m_SpeedFactor = 1.0;
m_CtrlSpeedFactor = 4.0;
m_ShiftSpeedFactor = 0.25;
m_FocusPoint = QVector3D(-1.0f,-1.0f,-1.0f);
m_View.focusPoint = QVector3D(-1.0f,-1.0f,-1.0f);
setFocusPoint( QVector3D(0.0f,0.0f,0.0f) );
m_DoF = dof;
m_View.DoF = dof;
QMatrix4x4 rot;
if( dof == DISPLAY_DOF_2D )
rot.setToIdentity();
......@@ -156,14 +156,14 @@ void GLViewer::init( DisplayDoF dof )
}
setViewRotationMatrix( rot );
m_FovY = 0.0f;
m_View.fovY = 0.0f;
setFovY( 65.0f );
m_DistToFocusPoint = 0.0f;
m_View.distToFocusPoint = 0.0f;
setDistToFocusPoint( 400.0f );
m_PointSize = 2;
m_IsCullingEnabled = false;
m_View.pointSize = 2;
m_View.isCullingEnabled = false;
if( !m_InfoBarManager )
{
......@@ -171,7 +171,7 @@ void GLViewer::init( DisplayDoF dof )
m_InfoBarManager->setInfoBar( new InfoBar(), InfoBar::BOTTOM );
}
m_IsGridDisplayed = true;
m_View.isGridDisplayed = true;
// Initialize selection tools.
......@@ -194,11 +194,11 @@ void GLViewer::init( DisplayDoF dof )
m_MetricGrid.disableAxis( MetricGrid::ALL );
m_MetricGrid.disableGrid( MetricGrid::ALL );
m_LightRotationMatrix.setToIdentity();
m_View.lightRotationMatrix.setToIdentity();
m_IsLightTrackingEnabled = true;
m_IsLightingEnabled = true;
m_IsWireframeEnabled = false;
m_View.isLightTrackingEnabled = true;
m_View.isLightingEnabled = true;
m_View.isWireframeEnabled = false;
m_AnimationsRunningAtPreviousFrame = false;
......@@ -224,6 +224,18 @@ void GLViewer::init( DisplayDoF dof )
}
void GLViewer::setRenderState( const RenderState& state )
{
m_View = state;
m_MustUpdateFocal = true;
m_MustUpdateProjectionMatrix = true;
m_MustUpdateViewMatrix = true;
update();
}
void GLViewer::populateDisplayerFactories( DisplayableFactoryInterface *plugin )
{
const unsigned int NB_ROWS = 3;
......@@ -718,10 +730,10 @@ void GLViewer::mouseMotionNavigationEvent( float dx, float dy, QMouseEvent *evt
QMatrix4x4 deltaRot;
deltaRot.rotate( 0.5f*axisLen, axis/axisLen );
if( m_IsLightTrackingEnabled )
m_LightRotationMatrix = deltaRot * m_LightRotationMatrix;
if( m_View.isLightTrackingEnabled )
m_View.lightRotationMatrix = deltaRot * m_View.lightRotationMatrix;
else
m_LightRotationMatrix = viewRotationMatrix() * deltaRot * viewRotationMatrix().inverted() * m_LightRotationMatrix;
m_View.lightRotationMatrix = viewRotationMatrix() * deltaRot * viewRotationMatrix().inverted() * m_View.lightRotationMatrix;
update();
}
......@@ -963,7 +975,7 @@ void GLViewer::paintGL()
glMatrixMode( GL_MODELVIEW );
glLoadMatrixf( viewMatrix().data() );
glPointSize( (GLfloat) m_PointSize );
glPointSize( (GLfloat) m_View.pointSize );
glColor3ub( 255, 255, 255 );
setupScene();
......@@ -990,7 +1002,7 @@ void GLViewer::paintGL()
releaseScene();
// Display the metric grid.
if( m_IsGridDisplayed )
if( m_View.isGridDisplayed )
{
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
glDepthMask( GL_FALSE );
......@@ -1051,9 +1063,9 @@ void GLViewer::setupScene()
glMatrixMode( GL_MODELVIEW );
glPushMatrix();
if( m_IsLightTrackingEnabled )
if( m_View.isLightTrackingEnabled )
glLoadIdentity();
glMultMatrixf( m_LightRotationMatrix.data() );
glMultMatrixf( m_View.lightRotationMatrix.data() );
GLfloat lightPos[4] = { 0.0f, 0.0f, 1.0f, 0.0f };
glLightfv( GL_LIGHT0, GL_POSITION, lightPos );
......@@ -1065,7 +1077,7 @@ void GLViewer::setupScene()
glEnable( GL_DEPTH_TEST );
glEnable( GL_MULTISAMPLE );
if( m_IsLightingEnabled )
if( m_View.isLightingEnabled )
{
glEnable( GL_LIGHTING );
glEnable( GL_LIGHT0 );
......@@ -1078,9 +1090,9 @@ void GLViewer::setupScene()
glDisable( GL_COLOR_MATERIAL );
}
glPolygonMode( GL_FRONT_AND_BACK, m_IsWireframeEnabled && !m_SelectionEnabled? GL_LINE : GL_FILL );
glPolygonMode( GL_FRONT_AND_BACK, m_View.isWireframeEnabled && !m_SelectionEnabled? GL_LINE : GL_FILL );
if( m_IsCullingEnabled )
if( m_View.isCullingEnabled )
{
glEnable( GL_CULL_FACE );
glCullFace( GL_BACK );
......@@ -1191,7 +1203,7 @@ void GLViewer::updateSelection( SelectionTool &tool )
// Initializes the selection context.
tool.setDepthBuffer( m_SelectionDepthBuffer );
tool.selectBackFacingGeometry( m_IsCullingEnabled? GL_FALSE : GL_TRUE );
tool.selectBackFacingGeometry( m_View.isCullingEnabled? GL_FALSE : GL_TRUE );
tool.preSelectionUpdate();
......@@ -1278,7 +1290,7 @@ void GLViewer::updateSelectionZBuffer()
glMatrixMode( GL_MODELVIEW );
glLoadMatrixf( viewMatrix().data() );
glPointSize( (GLfloat) m_PointSize );
glPointSize( (GLfloat) m_View.pointSize );
setupScene();
......@@ -1797,48 +1809,37 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
{
case Qt::Key_Space: centerView(); break;
case Qt::Key_F1:
{
std::ofstream file( ".viewer.cfg", std::ios::binary );
file.write( (char*) &focusPoint(), sizeof(QVector3D) );
float f = distToFocusPoint();
file.write( (char*) &f, sizeof(float) );
file.write( (char*) &viewRotationMatrix(), sizeof(QMatrix4x4) );
double d = speedFactor();
file.write( (char*) &d, sizeof(double) );
d = ctrlSpeedFactor();
file.write( (char*) &d, sizeof(double) );
d = shiftSpeedFactor();
file.write( (char*) &d, sizeof(double) );
file.close();
break;
}
case Qt::Key_F2:
case Qt::Key_F3:
case Qt::Key_F4:
case Qt::Key_F5:
case Qt::Key_F6:
case Qt::Key_F7:
case Qt::Key_F8:
case Qt::Key_F9:
case Qt::Key_F10:
case Qt::Key_F11:
case Qt::Key_F12:
{
std::ifstream file( ".viewer.cfg", std::ios::binary );
if( file.bad() )
break;
QString filename;
filename.sprintf(".viewer_%02i.cfg", evt->key() - Qt::Key_F1 + 1 );
QVector3D fp;
QMatrix4x4 vRot;
float dist2fp;
double spF, ctrlSpF, shftSpF;
file.read( (char*) &fp, sizeof(QVector3D) );
file.read( (char*) &dist2fp, sizeof(float) );
file.read( (char*) &vRot, sizeof(QMatrix4x4) );
file.read( (char*) &spF, sizeof(double) );
file.read( (char*) &ctrlSpF, sizeof(double) );
file.read( (char*) &shftSpF, sizeof(double) );
file.close();
setFocusPoint( fp );
setDistToFocusPoint( dist2fp );
setViewRotationMatrix( vRot );
setSpeedFactor( spF );
setCtrlSpeedFactor( ctrlSpF );
setShiftSpeedFactor( shftSpF );
if( evt->modifiers() == Qt::Modifier::SHIFT )
{
std::ofstream file( filename.toStdString(), std::ios::binary );
file.write( (char*) &m_View, sizeof(RenderState) );
}
else
{
std::ifstream file( filename.toStdString(), std::ios::binary );
if( !file.bad() )
{
RenderState state;
file.read( (char*) &state, sizeof(RenderState) );
setRenderState( state );
}
}
update();
break;
}
case Qt::Key_4:
......@@ -1932,11 +1933,11 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
float f = distToFocusPoint();
file.write( (char*) &f, sizeof(float) );
file.write( (char*) &viewRotationMatrix(), sizeof(QMatrix4x4) );
file.write( (char*) &m_LightRotationMatrix, sizeof(QMatrix4x4) );
file.write( (char*) &m_IsWireframeEnabled, sizeof(bool) );
file.write( (char*) &m_IsLightingEnabled, sizeof(bool) );
file.write( (char*) &m_IsCullingEnabled, sizeof(bool) );
file.write( (char*) &m_IsLightTrackingEnabled, sizeof(bool) );
file.write( (char*) &m_View.lightRotationMatrix, sizeof(QMatrix4x4) );
file.write( (char*) &m_View.isWireframeEnabled, sizeof(bool) );
file.write( (char*) &m_View.isLightingEnabled, sizeof(bool) );
file.write( (char*) &m_View.isCullingEnabled, sizeof(bool) );
file.write( (char*) &m_View.isLightTrackingEnabled, sizeof(bool) );
double d = speedFactor();
file.write( (char*) &d, sizeof(double) );
d = ctrlSpeedFactor();
......@@ -1960,7 +1961,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
file.read( (char*) &fp, sizeof(QVector3D) );
file.read( (char*) &dist2fp, sizeof(float) );
file.read( (char*) &vRot, sizeof(QMatrix4x4) );
file.read( (char*) &m_LightRotationMatrix, sizeof(QMatrix4x4) );
file.read( (char*) &m_View.lightRotationMatrix, sizeof(QMatrix4x4) );
file.read( (char*) &wireframe, sizeof(bool) );
file.read( (char*) &lighting, sizeof(bool) );
file.read( (char*) &culling, sizeof(bool) );
......@@ -2062,7 +2063,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
switch( evt->key() )
{
case Qt::Key_C: toggleCulling(); break;
case Qt::Key_G: m_IsGridDisplayed = !m_IsGridDisplayed; update(); break;
case Qt::Key_G: m_View.isGridDisplayed = !m_View.isGridDisplayed; update(); break;
case Qt::Key_Escape:
{
if( isSelectionEnabled() )
......@@ -2328,16 +2329,16 @@ void GLViewer::setShiftSpeedFactor( const float shiftSpeedFactor )
void GLViewer::increasePointSize()
{
++ m_PointSize;
++ m_View.pointSize;
update();
}
void GLViewer::decreasePointSize()
{
if( m_PointSize > 1 )
if( m_View.pointSize > 1 )
{
-- m_PointSize;
-- m_View.pointSize;
update();
}
}
......@@ -2345,15 +2346,15 @@ void GLViewer::decreasePointSize()
void GLViewer::setFocusPoint( const QVector3D& p )
{
if( p.x() != m_FocusPoint.x() ||
p.y() != m_FocusPoint.y() ||
p.z() != m_FocusPoint.z() )
if( p.x() != m_View.focusPoint.x() ||
p.y() != m_View.focusPoint.y() ||
p.z() != m_View.focusPoint.z() )
{
m_FocusPoint = p;
m_View.focusPoint = p;
m_MustUpdateViewMatrix = true;
emit focusPointChanged( m_FocusPoint );
emit focusPointChanged( m_View.focusPoint );
update();
}
}
......@@ -2361,16 +2362,16 @@ void GLViewer::setFocusPoint( const QVector3D& p )
void GLViewer::setDistToFocusPoint( const float d )
{
if( d != m_DistToFocusPoint )
if( d != m_View.distToFocusPoint )
{
m_DistToFocusPoint = d;
m_ZNear = 0.01 * m_DistToFocusPoint;
m_ZFar = 5.0 * m_DistToFocusPoint;
m_View.distToFocusPoint = d;
m_View.zNear = 0.01 * m_View.distToFocusPoint;
m_View.zFar = 5.0 * m_View.distToFocusPoint;
m_MustUpdateProjectionMatrix = true;
m_MustUpdateViewMatrix = true;
emit distToFocusPointChanged( m_DistToFocusPoint );
emit distToFocusPointChanged( m_View.distToFocusPoint );
update();
}
}
......@@ -2378,7 +2379,7 @@ void GLViewer::setDistToFocusPoint( const float d )
void GLViewer::setViewRotationMatrix( const QMatrix4x4& m )
{
m_ViewRotationMatrix = m;
m_View.viewRotationMatrix = m;
m_MustUpdateViewMatrix = true;
......@@ -2388,14 +2389,14 @@ void GLViewer::setViewRotationMatrix( const QMatrix4x4& m )
void GLViewer::setFovY( float fovY )
{
if( fovY != m_FovY )
if( fovY != m_View.fovY )
{
m_FovY = fovY;
m_View.fovY = fovY;
m_MustUpdateFocal = true;
m_MustUpdateProjectionMatrix = true;
emit fovYChanged( m_FovY );
emit fovYChanged( m_View.fovY );
update();
}
}
......@@ -2499,64 +2500,64 @@ void GLViewer::clearSelection( SelectableEntity entities )
void GLViewer::setCullingEnabled( const bool enabled )
{
if( m_IsCullingEnabled != enabled )
if( m_View.isCullingEnabled != enabled )
toggleCulling();
}
void GLViewer::toggleCulling()
{
m_IsCullingEnabled = !m_IsCullingEnabled;
emit cullingToggled( m_IsCullingEnabled );
m_View.isCullingEnabled = !m_View.isCullingEnabled;
emit cullingToggled( m_View.isCullingEnabled );
update();
}
void GLViewer::setWireframeEnabled( const bool enabled )
{
if( m_IsWireframeEnabled != enabled )
if( m_View.isWireframeEnabled != enabled )
toggleWireframe();
}
void GLViewer::setLightingEnabled( const bool enabled )
{
if( m_IsLightingEnabled != enabled )
if( m_View.isLightingEnabled != enabled )
toggleLighting();
}
void GLViewer::setLightTrackingEnabled( const bool enabled )
{
if( m_IsLightTrackingEnabled != enabled )
if( m_View.isLightTrackingEnabled != enabled )
toggleLightTracking();
}
void GLViewer::toggleWireframe()
{
m_IsWireframeEnabled = !m_IsWireframeEnabled;
emit wireframeToggled( m_IsWireframeEnabled );
m_View.isWireframeEnabled = !m_View.isWireframeEnabled;
emit wireframeToggled( m_View.isWireframeEnabled );
update();
}
void GLViewer::toggleLighting()
{
m_IsLightingEnabled = !m_IsLightingEnabled;
emit lightingToggled( m_IsLightingEnabled );
m_View.isLightingEnabled = !m_View.isLightingEnabled;
emit lightingToggled( m_View.isLightingEnabled );
update();
}
void GLViewer::toggleLightTracking()
{
if( m_IsLightTrackingEnabled )
m_LightRotationMatrix = viewRotationMatrix().inverted() * m_LightRotationMatrix;
if( m_View.isLightTrackingEnabled )
m_View.lightRotationMatrix = viewRotationMatrix().inverted() * m_View.lightRotationMatrix;
else
m_LightRotationMatrix = viewRotationMatrix() * m_LightRotationMatrix;
m_View.lightRotationMatrix = viewRotationMatrix() * m_View.lightRotationMatrix;
m_IsLightTrackingEnabled = !m_IsLightTrackingEnabled;
emit lightTrackingToggled( m_IsLightTrackingEnabled );
m_View.isLightTrackingEnabled = !m_View.isLightTrackingEnabled;
emit lightTrackingToggled( m_View.isLightTrackingEnabled );
update();
}
......@@ -38,6 +38,27 @@ public:
unsigned int count;
};
struct RenderState
{
DisplayDoF DoF;
QVector3D focusPoint;
float fovY;
float distToFocusPoint;
float zNear;
float zFar;
QMatrix4x4 viewRotationMatrix;
QMatrix4x4 lightRotationMatrix;
bool isWireframeEnabled;
bool isLightingEnabled;
bool isLightTrackingEnabled;
bool isCullingEnabled;
bool isGridDisplayed;
unsigned int pointSize;
};
protected:
class DisplayableInfo;
......@@ -89,17 +110,7 @@ protected:
| Member variable(s) |
\********************/
protected:
QVector3D m_FocusPoint;
float m_DistToFocusPoint;
QMatrix4x4 m_ViewRotationMatrix;
float m_FovY;
float m_ZNear;
float m_ZFar;
QMatrix4x4 m_LightRotationMatrix;
bool m_IsWireframeEnabled;
bool m_IsLightingEnabled;
bool m_IsLightTrackingEnabled;
RenderState m_View;
float m_SpeedFactor;
float m_CtrlSpeedFactor;
......@@ -107,10 +118,6 @@ protected:
QPoint m_PrevMousePos;
unsigned int m_PointSize;
bool m_IsCullingEnabled;
DisplayDoF m_DoF;
FactoryMap m_Factories;
DisplayableMap m_Displayables;
PriorityMap m_DisplayablesByPriority;
......@@ -119,7 +126,6 @@ protected:
InfoBarManager *m_InfoBarManager;
MetricGrid m_MetricGrid;
bool m_IsGridDisplayed;
QMap<QString,PrimitiveInfo> m_PrimitiveCountMap;
QList<DisplayableInterface*> m_AnimationStartingQueue;
......@@ -198,7 +204,7 @@ protected:
DisplayableMap::iterator removeDisplayable_Internal( DisplayableMap::iterator &dmapIt );
void displayLabel( DisplayableInterface *d );
inline void setLightRotationMatrix( const QMatrix4x4& m ) { m_LightRotationMatrix = m; update(); }
inline void setLightRotationMatrix( const QMatrix4x4& m ) { m_View.lightRotationMatrix = m; update(); }
void repackDisplayables();
......@@ -212,40 +218,43 @@ protected:
public:
void init( DisplayDoF dof );
inline QVector2D screenPosToClipCoord( const QPoint &screenPos ) { return QVector2D( 2.0f*screenPos.x()/width()-1.0f, 1.0f-2.0f*screenPos.y()/height() ); }
inline void getRenderState( RenderState& state ) const { state = m_View; }
void setRenderState( const RenderState& state );
inline QVector2D screenPosToClipCoord( const QPoint &screenPos ) { return QVector2D( 2.0f*screenPos.x()/width()-1.0f, 1.0f-2.0f*screenPos.y()/height() ); }
virtual void initializeGL();
void paintGL();
virtual void resizeGL( int width, int height );
inline float speedFactor() const { return m_SpeedFactor; }
inline float ctrlSpeedFactor() const { return m_CtrlSpeedFactor; }
inline float shiftSpeedFactor() const { return m_ShiftSpeedFactor; }
inline const QVector3D& focusPoint() const { return m_FocusPoint; }
inline float distToFocusPoint() const { return m_DistToFocusPoint; }
inline float fovY() const { return m_FovY; }
inline double focal() const { return m_Focal; }
inline float zNear() const { return m_ZNear; }
inline float zFar() const { return m_ZFar; }
inline float pointSize() const { return m_PointSize; }
inline DisplayDoF dof() const { return m_DoF; }
inline const QMatrix4x4& projectionMatrix() const { return m_ProjectionMatrix; }
inline const QMatrix4x4& projectionMatrixInverse() const { return m_ProjectionMatrixInverse; }
inline const QMatrix4x4& viewMatrix() const { return m_ViewMatrix; }
inline const QMatrix4x4& viewMatrixInverse() const { return m_ViewMatrixInverse; }
inline const QMatrix4x4& viewRotationMatrix() const { return m_ViewRotationMatrix; }
inline const QMatrix4x4& viewRotationMatrixInverse() const { return m_ViewRotationMatrixInverse; }
inline float speedFactor() const { return m_SpeedFactor; }
inline float ctrlSpeedFactor() const { return m_CtrlSpeedFactor; }
inline float shiftSpeedFactor() const { return m_ShiftSpeedFactor; }
inline const QVector3D& focusPoint() const { return m_View.focusPoint; }
inline float distToFocusPoint() const { return m_View.distToFocusPoint; }
inline float fovY() const { return m_View.fovY; }
inline double focal() const { return m_Focal; }
inline float zNear() const { return m_View.zNear; }
inline float zFar() const { return m_View.zFar; }
inline float pointSize() const { return m_View.pointSize; }
inline DisplayDoF dof() const { return m_View.DoF; }
inline const QMatrix4x4& projectionMatrix() const { return m_ProjectionMatrix; }
inline const QMatrix4x4& projectionMatrixInverse() const { return m_ProjectionMatrixInverse; }
inline const QMatrix4x4& viewMatrix() const { return m_ViewMatrix; }
inline const QMatrix4x4& viewMatrixInverse() const { return m_ViewMatrixInverse; }
inline const QMatrix4x4& viewRotationMatrix() const { return m_View.viewRotationMatrix; }
inline const QMatrix4x4& viewRotationMatrixInverse() const { return m_ViewRotationMatrixInverse; }
QMatrix4x4 modelMatrix( const DisplayableInterface *d ) const;
QMatrix4x4 modelMatrixInverse( const DisplayableInterface *d ) const;
inline const QMatrix4x4& viewProjectionMatrix() const { return m_ViewProjectionMatrix; }
inline const QMatrix4x4& viewProjectionMatrixInverse() const { return m_ViewProjectionMatrixInverse; }
inline QMatrix4x4 modelViewMatrix( const DisplayableInterface *d ) const { return viewMatrix() * modelMatrix(d); }
inline QMatrix4x4 modelViewMatrixInverse( const DisplayableInterface *d ) const { return modelViewMatrix(d).inverted(); }
inline QMatrix4x4 MVPMatrix( const DisplayableInterface *d ) const { return viewProjectionMatrix() * modelMatrix(d); }
inline QMatrix4x4 MVPMatrixInverse( const DisplayableInterface *d ) const { return MVPMatrix(d).inverted(); }
inline const QMatrix4x4& viewProjectionMatrix() const { return m_ViewProjectionMatrix; }
inline const QMatrix4x4& viewProjectionMatrixInverse() const { return m_ViewProjectionMatrixInverse; }
inline QMatrix4x4 modelViewMatrix( const DisplayableInterface *d ) const { return viewMatrix() * modelMatrix(d); }
inline QMatrix4x4 modelViewMatrixInverse( const DisplayableInterface *d ) const { return modelViewMatrix(d).inverted(); }
inline QMatrix4x4 MVPMatrix( const DisplayableInterface *d ) const { return viewProjectionMatrix() * modelMatrix(d); }
inline QMatrix4x4 MVPMatrixInverse( const DisplayableInterface *d ) const { return MVPMatrix(d).inverted(); }
inline QVector3D viewpointLocation() const
{
......@@ -258,16 +267,16 @@ public:
return m_PixelToRayMatrix.map( clipCoord ).toVector3D();
}
QMatrix4x4 viewportMatrix( bool flipY = false ) const;
inline QMatrix4x4 normalMatrix( const DisplayableInterface *d ) const { QMatrix4x4 m = modelViewMatrix(d); m(0,3) = m(1,3) = m(2,3) = 0.0f; return m; }
inline const QMatrix4x4& lightRotationMatrix() const { return m_LightRotationMatrix; }
inline QMatrix4x4 normalMatrix( const DisplayableInterface *d ) const { QMatrix4x4 m = modelViewMatrix(d); m(0,3) = m(1,3) = m(2,3) = 0.0f; return m; }
inline const QMatrix4x4& lightRotationMatrix() const { return m_View.lightRotationMatrix; }
inline QVector3D lightDirection() const { return m_LightRotationMatrix.column(2).toVector3D(); }
inline bool isLightingEnabled() const { return m_IsLightingEnabled; }
inline bool isWireframeEnabled() const { return m_IsWireframeEnabled; }
inline bool isCullingEnabled() const { return m_IsCullingEnabled; }
inline bool isLightTrackingEye() const { return m_IsLightTrackingEnabled; }
inline QVector3D lightDirection() const { return m_View.lightRotationMatrix.column(2).toVector3D(); }
inline bool isLightingEnabled() const { return m_View.isLightingEnabled; }
inline bool isWireframeEnabled() const { return m_View.isWireframeEnabled; }
inline bool isCullingEnabled() const { return m_View.isCullingEnabled; }