scg3  0.6
scg::ViewState Class Reference

The view state of the application, managed by Viewer and accessible by Controller::checkInput() (or derived classes). More...

#include "ViewState.h"

Public Member Functions

 ViewState ()
 
virtual ~ViewState ()
 
GLFWwindow * getWindow () const
 
void setWindow (GLFWwindow *window)
 
bool isMouseCursorVisible () const
 
void setMouseCursorVisible (bool isVisible)
 
bool isAnimationLocked () const
 
void setAnimationLocked (bool isLocked)
 
bool isFrameRateOutput () const
 
void setFrameRateOutput (bool isOutput)
 
void setFrameRateInterval (double intervalSec)
 
double getFrameRate () const
 
void updateFrameRate ()
 

Protected Attributes

GLFWwindow * window_
 
bool isMouseCursorVisible_
 
bool isAnimationLocked_
 
bool isFrameRateOutput_
 
double frameRateInterval_
 
double frameRate_
 

Detailed Description

The view state of the application, managed by Viewer and accessible by Controller::checkInput() (or derived classes).

Definition at line 39 of file ViewState.h.

Constructor & Destructor Documentation

◆ ViewState()

scg::ViewState::ViewState ( )

Constructor.

◆ ~ViewState()

virtual scg::ViewState::~ViewState ( )
virtual

Destructor.

Member Function Documentation

◆ getFrameRate()

double scg::ViewState::getFrameRate ( ) const

Get current frame rate (FPS).

◆ getWindow()

GLFWwindow* scg::ViewState::getWindow ( ) const

Get window pointer, called by camera controllers.

◆ isAnimationLocked()

bool scg::ViewState::isAnimationLocked ( ) const

Check locked state of animations.

◆ isFrameRateOutput()

bool scg::ViewState::isFrameRateOutput ( ) const

Check frame output mode.

◆ isMouseCursorVisible()

bool scg::ViewState::isMouseCursorVisible ( ) const

Check mouse cursor visibility.

◆ setAnimationLocked()

void scg::ViewState::setAnimationLocked ( bool  isLocked)

Set locked state of animations (default: false/unlocked).

◆ setFrameRateInterval()

void scg::ViewState::setFrameRateInterval ( double  intervalSec)

Set interval for frame rate computation (default: 3 sec).

Parameters
intervalSecinterval (seconds) for frame rate computation; 0 deactivates frame rate computation

◆ setFrameRateOutput()

void scg::ViewState::setFrameRateOutput ( bool  isOutput)

Set frame output mode (default: false/disabled).

◆ setMouseCursorVisible()

void scg::ViewState::setMouseCursorVisible ( bool  isVisible)

Set mouse cursor visibility (default: true/visible).

◆ setWindow()

void scg::ViewState::setWindow ( GLFWwindow *  window)

Set window pointer.

◆ updateFrameRate()

void scg::ViewState::updateFrameRate ( )

Update frame rate, called by Viewer::startMainLoop().

Member Data Documentation

◆ frameRate_

double scg::ViewState::frameRate_
protected

Definition at line 118 of file ViewState.h.

◆ frameRateInterval_

double scg::ViewState::frameRateInterval_
protected

Definition at line 117 of file ViewState.h.

◆ isAnimationLocked_

bool scg::ViewState::isAnimationLocked_
protected

Definition at line 115 of file ViewState.h.

◆ isFrameRateOutput_

bool scg::ViewState::isFrameRateOutput_
protected

Definition at line 116 of file ViewState.h.

◆ isMouseCursorVisible_

bool scg::ViewState::isMouseCursorVisible_
protected

Definition at line 114 of file ViewState.h.

◆ window_

GLFWwindow* scg::ViewState::window_
protected

Definition at line 113 of file ViewState.h.


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