CCamera.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "ICamera.h"
5 
6 
7 namespace ion
8 {
9  namespace Scene
10  {
11 
12  class CCamera : public ICamera
13  {
14 
15  public:
16 
17  CCamera();
18 
19  virtual void RecalculateViewMatrix();
20  virtual void Update();
21 
22  virtual vec3f const & GetPosition() const;
23  virtual vec3f const & GetLookDirecton() const;
24  virtual vec3f GetLookAtTarget() const;
25  virtual vec3f const & GetUpVector() const;
26  virtual glm::mat4 GetViewMatrix() const;
27  virtual glm::mat4 GetProjectionMatrix() const;
28 
29  virtual void SetPosition(vec3f const & position);
30  virtual void SetLookDirection(vec3f const & lookDirection);
31  virtual void SetLookAtTarget(vec3f const & lookAtTarget);
32  virtual void SetUpVector(vec3f const & UpVector);
33  virtual void SetViewMatrix(glm::mat4 const & viewMatrix);
34  virtual void SetProjectionMatrix(glm::mat4 const & projectionMatrix);
35 
36  virtual f32 GetNearPlane() const;
37  virtual f32 GetFarPlane() const;
38  virtual void SetNearPlane(f32 const nearPlane);
39  virtual void SetFarPlane(f32 const farPlane);
40 
41  virtual vec2i GetScreenCoordinates(vec3f const & WorldPosition, vec2f const & WindowSize, bool * InFront = nullptr);
42  virtual ray3f GetPickingRay(vec2i const & Pixel, vec2f const & WindowSize);
43 
44  protected:
45 
49 
50  glm::mat4 ViewMatrix;
51  glm::mat4 ProjectionMatrix;
53 
54  };
55 
56  }
57 }
virtual glm::mat4 GetProjectionMatrix() const
Definition: CCamera.cpp:75
virtual vec2i GetScreenCoordinates(vec3f const &WorldPosition, vec2f const &WindowSize, bool *InFront=nullptr)
Definition: CCamera.cpp:110
virtual f32 GetFarPlane() const
Definition: CCamera.cpp:95
virtual void SetLookDirection(vec3f const &lookDirection)
Definition: CCamera.cpp:55
virtual void Update()
Definition: CCamera.cpp:25
vec3f UpVector
Definition: CCamera.h:48
f32 NearPlane
Definition: CCamera.h:52
glm::mat4 ViewMatrix
Definition: CCamera.h:50
CCamera()
Definition: CCamera.cpp:10
virtual vec3f const & GetUpVector() const
Definition: CCamera.cpp:45
virtual void SetNearPlane(f32 const nearPlane)
Definition: CCamera.cpp:100
float f32
Definition: ionTypes.h:94
virtual void SetFarPlane(f32 const farPlane)
Definition: CCamera.cpp:105
virtual vec3f const & GetPosition() const
Definition: CCamera.cpp:30
virtual void SetLookAtTarget(vec3f const &lookAtTarget)
Definition: CCamera.cpp:60
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
virtual void SetViewMatrix(glm::mat4 const &viewMatrix)
Definition: CCamera.cpp:80
virtual void SetPosition(vec3f const &position)
Definition: CCamera.cpp:50
virtual void RecalculateViewMatrix()
Definition: CCamera.cpp:20
vec3f Position
Definition: CCamera.h:46
virtual void SetProjectionMatrix(glm::mat4 const &projectionMatrix)
Definition: CCamera.cpp:85
virtual vec3f GetLookAtTarget() const
Definition: CCamera.cpp:40
virtual glm::mat4 GetViewMatrix() const
Definition: CCamera.cpp:70
Definition: CCamera.h:12
glm::mat4 ProjectionMatrix
Definition: CCamera.h:51
vec3f LookDirection
Definition: CCamera.h:47
virtual ray3f GetPickingRay(vec2i const &Pixel, vec2f const &WindowSize)
Definition: CCamera.cpp:132
virtual f32 GetNearPlane() const
Definition: CCamera.cpp:90
virtual void SetUpVector(vec3f const &UpVector)
Definition: CCamera.cpp:65
3D ray
Definition: ray3.h:10
f32 FarPlane
Definition: CCamera.h:52
Definition: ICamera.h:12
virtual vec3f const & GetLookDirecton() const
Definition: CCamera.cpp:35