|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
#include <FreeLookCameraController.hpp>
Public Member Functions | |
| FreeLookCameraController (GameObject *object) | |
| ~FreeLookCameraController () override | |
| virtual float | GetAcceleration () const |
| virtual float | GetDamping () const |
| bool | GetInvertY () const |
| virtual float | GetMaxSpeed () const |
| float | GetPitch () const |
| Math::Vector2D | GetPitchRange () const |
| float | GetRoll () const |
| Math::Vector2D | GetRollRange () const |
| virtual float | GetSpeed () const |
| Math::Vector3D | GetTranslationInput () const |
| virtual Math::Vector3D | GetVelocity () const |
| float | GetYaw () const |
| Math::Vector2D | GetYawRange () const |
| bool | Initialize () override |
| Derives initial yaw/pitch from the camera's current facing direction. | |
| virtual void | OnKeyPressed (const Sleak::Events::Input::KeyPressedEvent &e) |
| Updates translation input state from a key-down event; doubles speed while LCTRL is held. | |
| virtual void | OnKeyReleased (const Sleak::Events::Input::KeyReleasedEvent &e) |
| Clears translation input state from a key-up event. | |
| virtual void | SetAcceleration (float acceleration) |
| virtual void | SetDamping (float damping) |
| void | SetEnabled (bool enabled) override |
| Toggles relative mouse mode and, when re-enabling, resets velocity and re-syncs yaw/pitch. | |
| void | SetInvertY (bool invert) |
| virtual void | SetMaxSpeed (float maxSpeed) |
| void | SetPitch (float pitch) |
| void | SetPitchRange (Math::Vector2D range) |
| void | SetRoll (float roll) |
| void | SetRollRange (Math::Vector2D range) |
| virtual void | SetSpeed (float speed) |
| void | SetYaw (float yaw) |
| void | SetYawRange (Math::Vector2D range) |
| void | ToggleCursor (bool enable) override |
| Shows or hides the OS cursor and, typically, toggles relative mouse mode. | |
| void | Update (float deltaTime) override |
| Public Member Functions inherited from Sleak::CameraController | |
| 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 | IsEnabled () const |
| virtual void | SetSensitivity (float sensitivity) |
| 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) |
Additional Inherited Members | |
| Protected Attributes inherited from Sleak::CameraController | |
| 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 |
Editor/spectator-style camera controller: mouse-look plus accelerated free translation, independent of gravity or collision.
Definition at line 13 of file FreeLookCameraController.hpp.
| Sleak::FreeLookCameraController::FreeLookCameraController | ( | GameObject * | object | ) |
Definition at line 12 of file FreeLookCameraControllerComponent.cpp.
|
override |
Definition at line 32 of file FreeLookCameraControllerComponent.cpp.
|
inlinevirtual |
Definition at line 29 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 31 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 39 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 33 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 49 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 42 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 53 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 46 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 27 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 36 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 34 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 51 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 44 of file FreeLookCameraController.hpp.
|
overridevirtual |
Derives initial yaw/pitch from the camera's current facing direction.
Reimplemented from Sleak::CameraController.
Definition at line 37 of file FreeLookCameraControllerComponent.cpp.
|
virtual |
Updates translation input state from a key-down event; doubles speed while LCTRL is held.
Definition at line 147 of file FreeLookCameraControllerComponent.cpp.
|
virtual |
Clears translation input state from a key-up event.
Definition at line 159 of file FreeLookCameraControllerComponent.cpp.
|
inlinevirtual |
Definition at line 28 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 30 of file FreeLookCameraController.hpp.
|
overridevirtual |
Toggles relative mouse mode and, when re-enabling, resets velocity and re-syncs yaw/pitch.
Reimplemented from Sleak::CameraController.
Definition at line 188 of file FreeLookCameraControllerComponent.cpp.
|
inline |
Definition at line 38 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 32 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 48 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 41 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 52 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 45 of file FreeLookCameraController.hpp.
|
inlinevirtual |
Definition at line 26 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 50 of file FreeLookCameraController.hpp.
|
inline |
Definition at line 43 of file FreeLookCameraController.hpp.
|
overridevirtual |
Shows or hides the OS cursor and, typically, toggles relative mouse mode.
Implements Sleak::CameraController.
Definition at line 60 of file FreeLookCameraControllerComponent.cpp.
|
overridevirtual |
Implements Sleak::CameraController.
Definition at line 53 of file FreeLookCameraControllerComponent.cpp.