CCameraController.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionCore.h>
5 #include <ionFramework.h>
6 #include <ionWindow.h>
7 #include <ionScene.h>
8 
9 
10 namespace ion
11 {
12 
14  {
15 
16  public:
17 
19 
20  virtual void OnEvent(IEvent & Event);
21  virtual void Update(f64 const TickTime);
22 
23  virtual vec3f const & GetPosition() const;
24  virtual f32 GetPhi() const;
25  virtual f32 GetTheta() const;
26  virtual f32 GetVelocity() const;
27  virtual Scene::ICamera const * GetCamera() const;
28  virtual Scene::ICamera * GetCamera();
29 
30  virtual vec3f GetCurrentSpeed() const;
31 
32  virtual void SetVelocity(float const Velocity);
33  virtual void SetPhi(f32 const Phi);
34  virtual void SetTheta(f32 const Theta);
35 
36  virtual void SetActive(bool const Active);
37 
38  protected:
39 
40  enum class ECommand
41  {
42  Forward = 0,
43  Back = 1,
44  Left = 2,
45  Right = 3,
46  Count = 4
47  };
48 
50 
52  bool Tracking;
54 
56 
58  bool Active = true;
59 
60  };
61 
63  {
64 
65  public:
66 
68  virtual void Update(f64 const TickTime);
69 
70  protected:
71 
73 
74  f32 FocalLengthAccumulator = 0;
75 
76  };
77 
78 }
virtual void SetTheta(f32 const Theta)
Definition: CCameraController.cpp:190
f32 FocalLengthDelta
Definition: CCameraController.h:51
f32 LookSpeed
Definition: CCameraController.h:51
SingletonPointer< CGamePad > GamePad
Definition: CCameraController.h:72
ECommand
Definition: CCameraController.h:40
bool Active
Definition: CCameraController.h:58
Wraps a pointer to a singleton object.
Definition: ionClass.h:123
virtual f32 GetVelocity() const
Definition: CCameraController.cpp:165
virtual void SetPhi(f32 const Phi)
Definition: CCameraController.cpp:180
float f32
Definition: ionTypes.h:94
bool Tracking
Definition: CCameraController.h:52
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
bool Commands[(int) ECommand::Count]
Definition: CCameraController.h:49
Definition: IEvent.h:7
vec3f CurrentSpeed
Definition: CCameraController.h:55
virtual f32 GetTheta() const
Definition: CCameraController.cpp:185
f32 MaxAngleEpsilon
Definition: CCameraController.h:51
virtual f32 GetPhi() const
Definition: CCameraController.cpp:175
virtual vec3f const & GetPosition() const
Definition: CCameraController.cpp:145
Definition: IEventListener.h:8
f32 Phi
Definition: CCameraController.h:53
CCameraController(Scene::ICamera *Camera)
Definition: CCameraController.cpp:11
virtual vec3f GetCurrentSpeed() const
Definition: CCameraController.cpp:160
Scene::ICamera * Camera
Definition: CCameraController.h:57
virtual void SetActive(bool const Active)
Definition: CCameraController.cpp:195
virtual void SetVelocity(float const Velocity)
Definition: CCameraController.cpp:170
virtual void Update(f64 const TickTime)
Definition: CCameraController.cpp:109
Definition: CCameraController.h:62
Definition: CCameraController.h:13
double f64
Definition: ionTypes.h:95
f32 MoveSpeed
Definition: CCameraController.h:51
Definition: ICamera.h:12
virtual void OnEvent(IEvent &Event)
Definition: CCameraController.cpp:26
virtual Scene::ICamera const * GetCamera() const
Definition: CCameraController.cpp:150
f32 Theta
Definition: CCameraController.h:53