View.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <ege/camera/Camera.hpp>
9 
10 namespace ege {
11  namespace camera {
12  class View : public Camera {
13  protected:
17  void update();
18  public:
22  View(const vec3& _eye=vec3(0,0,0), const vec3& _target=vec3(0,0,1), float _angle=0.0f);
26  ~View() {}
27  protected:
29  public:
34  virtual void setEye(const vec3& _eye);
39  virtual vec3 getEye() const {
40  return m_eye;
41  };
42  protected:
43  vec3 m_target;
44  public:
49  virtual void setTarget(const vec3& _target);
54  const vec3& getTarget() const {
55  return m_target;
56  };
57  protected:
58  float m_angle;
59  public:
64  virtual void setAngle(float _angle);
69  float getAngle() const {
70  return m_angle;
71  };
72  protected:
73  virtual vec3 getViewVector() const;
74  public:
75  virtual ege::Ray getRayFromScreen(const vec2& _offset);
77  virtual float getTetha();
78  virtual float getPsy();
79  };
80  }
81 }
82 
View(const vec3 &_eye=vec3(0, 0, 0), const vec3 &_target=vec3(0, 0, 1), float _angle=0.0f)
Constructor.
Definition: View.hpp:12
virtual vec3 getEye() const
get the curent Camera Eye position.
Definition: View.hpp:39
~View()
Destructor.
Definition: View.hpp:26
virtual void setTarget(const vec3 &_target)
set a new Camera target position.
Definition: AudioElement.hpp:8
virtual void drawDebug(ememory::SharedPtr< ewol::resource::Colored3DObject > _draw, ememory::SharedPtr< ege::Camera > _camera)
Debug display of the current element.
Definition: Camera.hpp:18
Definition: Ray.hpp:17
virtual void setAngle(float _angle)
Set the camera angle.
float m_angle
rotation angle of the camera (in rad) through the axis origin->eye
Definition: View.hpp:56
void update()
update the matrix property
float getAngle() const
Get the camera angle.
Definition: View.hpp:69
virtual ege::Ray getRayFromScreen(const vec2 &_offset)
virtual void setEye(const vec3 &_eye)
set the position of the camera.
const vec3 & getTarget() const
Get the curent Camera target position.
Definition: View.hpp:54
vec3 m_target
origin of the camera
Definition: View.hpp:41
vec3 m_eye
position where the camera see
Definition: View.hpp:28