|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
#include <CameraController.hpp>
Public Member Functions | |
| CameraController (GameObject *object) | |
| ~CameraController () override=default | |
| Camera * | GetCamera () |
| Casts the owning GameObject to Camera; valid only when attached to one. | |
| virtual float | GetSensitivity () const |
| virtual bool | Initialize () |
| One-time setup, called after the component is attached and the owner is initialized. | |
| virtual bool | IsEnabled () const |
| virtual void | SetEnabled (bool enabled) |
| virtual void | SetSensitivity (float sensitivity) |
| virtual void | ToggleCursor (bool enable)=0 |
| Shows or hides the OS cursor and, typically, toggles relative mouse mode. | |
| virtual void | Update (float deltaTime)=0 |
| Public Member Functions inherited from Sleak::Component | |
| Component (GameObject *object) | |
| virtual | ~Component ()=default |
| virtual void | FixedUpdate (float fixedDeltaTime) |
| GameObject * | GetOwner () |
| virtual void | LateUpdate (float deltaTime) |
| virtual void | OnDestroy () |
| Called when the component is detached or the owner is destroyed. | |
| virtual void | OnDisable () |
| virtual void | OnEnable () |
| Public Member Functions inherited from Sleak::Object | |
| Object (const std::string &name="Object") | |
| virtual | ~Object ()=default |
| const std::string & | GetName () const |
| uint64_t | GetUniqueID () const |
| void | SetName (const std::string &value) |
Protected Member Functions | |
| virtual void | UpdateCamera (float deltaTime)=0 |
| Applies accumulated input to the camera's position/orientation. | |
| virtual void | UpdateInput (float deltaTime)=0 |
| Polls raw input devices and updates translation/rotation input state. | |
Protected Attributes | |
| Camera * | camera = nullptr |
| bool | isEnabled = true |
| Math::Vector2D | LastMousePosition |
| Math::Vector2D | MousePosition |
| Math::Vector3D | rotationInput |
| float | sensitivity = 0.0f |
| Math::Vector3D | translationInput |
| Protected Attributes inherited from Sleak::Component | |
| bool | bIsInitialized |
| GameObject * | owner |
Base for components that drive a Camera GameObject from input. Concrete controllers (first-person, free-look) implement UpdateInput/UpdateCamera.
Definition at line 14 of file CameraController.hpp.
|
inline |
Definition at line 16 of file CameraController.hpp.
|
overridedefault |
|
inline |
Casts the owning GameObject to Camera; valid only when attached to one.
Definition at line 38 of file CameraController.hpp.
|
inlinevirtual |
Definition at line 35 of file CameraController.hpp.
|
inlinevirtual |
One-time setup, called after the component is attached and the owner is initialized.
Implements Sleak::Component.
Reimplemented in Sleak::FirstPersonController, and Sleak::FreeLookCameraController.
Definition at line 19 of file CameraController.hpp.
|
inlinevirtual |
Definition at line 33 of file CameraController.hpp.
|
inlinevirtual |
Reimplemented in Sleak::FirstPersonController, and Sleak::FreeLookCameraController.
Definition at line 32 of file CameraController.hpp.
|
inlinevirtual |
Definition at line 34 of file CameraController.hpp.
|
pure virtual |
Shows or hides the OS cursor and, typically, toggles relative mouse mode.
Implemented in Sleak::FirstPersonController, and Sleak::FreeLookCameraController.
|
pure virtual |
Implements Sleak::Component.
Implemented in Sleak::FirstPersonController, and Sleak::FreeLookCameraController.
|
protectedpure virtual |
Applies accumulated input to the camera's position/orientation.
|
protectedpure virtual |
Polls raw input devices and updates translation/rotation input state.
|
protected |
Definition at line 55 of file CameraController.hpp.
|
protected |
Definition at line 49 of file CameraController.hpp.
|
protected |
Definition at line 53 of file CameraController.hpp.
|
protected |
Definition at line 53 of file CameraController.hpp.
|
protected |
Definition at line 52 of file CameraController.hpp.
|
protected |
Definition at line 48 of file CameraController.hpp.
|
protected |
Definition at line 51 of file CameraController.hpp.