Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Transformation.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "SceneFBO.hpp"
4 
10 {
11  mat4 m_matrix;
13  vec3 m_position;
14  vec3 m_rotation;
15  float m_scale;
19  vector<function<void()>> m_limits;
21  private:
22  void recalc();
23  void recalcInverse();
25  void checkLimits();
27  public:
32 
39  void setPosition(vec3 const & position);
46  void setRotation(vec3 const & rotation);
53  void setScale(float const & scale);
58  vec3 const & getPosition() const { return m_position; }
63  vec3 const & getRotation() const { return m_rotation; }
68  float const & getScale() const { return m_scale; }
69 
74  mat4 const & getMatrix();
79  mat4 const & getMatrixInverse();
80 
87  void move(vec3 const & delta);
94  void rotate(vec3 const & delta);
95 
100  vec3 const & getLookVector();
105  vec3 const & getSideVector();
106 
111  bool const needsRecalc();
112 
118  void limitRotationX(float from, float to);
124  void limitRotationY(float from, float to);
130  void limitRotationZ(float from, float to);
131 };
132 
vec3 const & getPosition() const
float const & getScale() const
bool const needsRecalc()
mat4 const & getMatrix()
void limitRotationZ(float from, float to)
void limitRotationY(float from, float to)
vec3 const & getSideVector()
void setRotation(vec3 const &rotation)
void move(vec3 const &delta)
void limitRotationX(float from, float to)
vector< function< void()> > m_limits
void rotate(vec3 const &delta)
vec3 const & getLookVector()
void setPosition(vec3 const &position)
void setScale(float const &scale)
vec3 const & getRotation() const
mat4 const & getMatrixInverse()