scg3  0.6
ViewState.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright 2014 Volker Ahlers
12  *
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25 
26 #ifndef VIEWSTATE_H_
27 #define VIEWSTATE_H_
28 
29 #include "scg_glew.h"
30 #include <GLFW/glfw3.h>
31 
32 namespace scg {
33 
34 
39 class ViewState {
40 
41 public:
42 
46  ViewState();
47 
51  virtual ~ViewState();
52 
56  GLFWwindow* getWindow() const;
57 
61  void setWindow(GLFWwindow* window);
62 
66  bool isMouseCursorVisible() const;
67 
71  void setMouseCursorVisible(bool isVisible);
72 
76  bool isAnimationLocked() const;
77 
81  void setAnimationLocked(bool isLocked);
82 
86  bool isFrameRateOutput() const;
87 
91  void setFrameRateOutput(bool isOutput);
92 
99  void setFrameRateInterval(double intervalSec);
100 
104  double getFrameRate() const;
105 
109  void updateFrameRate();
110 
111 protected:
112 
113  GLFWwindow* window_;
118  double frameRate_;
119 
120 };
121 
122 } /* namespace scg */
123 
124 #endif /* VIEWSTATE_H_ */
bool isFrameRateOutput() const
void setMouseCursorVisible(bool isVisible)
void updateFrameRate()
double frameRateInterval_
Definition: ViewState.h:117
GLFWwindow * window_
Definition: ViewState.h:113
bool isMouseCursorVisible() const
double getFrameRate() const
void setAnimationLocked(bool isLocked)
bool isAnimationLocked_
Definition: ViewState.h:115
bool isAnimationLocked() const
void setWindow(GLFWwindow *window)
Local header file for GLEW library.
void setFrameRateOutput(bool isOutput)
The view state of the application, managed by Viewer and accessible by Controller::checkInput() (or d...
Definition: ViewState.h:39
void setFrameRateInterval(double intervalSec)
virtual ~ViewState()
GLFWwindow * getWindow() const
Definition: Animation.h:28
bool isMouseCursorVisible_
Definition: ViewState.h:114
double frameRate_
Definition: ViewState.h:118
bool isFrameRateOutput_
Definition: ViewState.h:116