#include <CameraSystem.hpp>
Definition at line 25 of file CameraSystem.hpp.
◆ CameraSystem()
| CameraSystem::CameraSystem |
( |
| ) |
|
|
inlineprivate |
◆ getAngle()
| ae::q20_12_t CameraSystem::getAngle |
( |
| ) |
const |
|
inline |
◆ getCameraPosition()
Returns the camera position.
camPos gets updated in the CameraSystem:update(ae::q20_12_t) loop. This is a temporary helper function that should get removed while certain parts of the game still do not comply with aegis-engine.
- Todo
- In practice, code that needs to recieve the CameraPosition should capture CameraPosition as a Event, which automatically gets broadcasted during the CameraSystem::update(ae::q20_12_t) loop.
- Returns
- The latest camera position.
Definition at line 155 of file CameraSystem.hpp.
◆ getMode()
◆ getMovementAngle()
| ae::q20_12_t CameraSystem::getMovementAngle |
( |
| ) |
const |
Returns the angle that maps the UP key to "move away from camera".
For Follow/Free returns the current orbit angle. For CCTV/Static computes atan2 from the fixed eye position toward the character, so movement direction stays correct regardless of where the camera is mounted.
- Returns
- Angle in radians.
Definition at line 56 of file CameraSystem.cpp.
◆ init()
| void CameraSystem::init |
( |
| ) |
|
|
override |
◆ isPathComplete()
| bool CameraSystem::isPathComplete |
( |
| ) |
const |
|
inline |
Returns true once the Path playback has reached its last keyframe.
Definition at line 126 of file CameraSystem.hpp.
◆ on_receive() [1/6]
ETL message handler to configure the camera settings.
Resets all tuning parameters and mode from config. Call this after setupCamera() sets up the room-specific CameraConfig.
Required to call in order to enable the CameraSystem
- Parameters
-
| config | The event payload containing the camera configuration to apply. |
Definition at line 4 of file CameraSystem.cpp.
◆ on_receive() [2/6]
ETL message handler to set the active camera mode at runtime.
- Parameters
-
| msg | The event payload containing the camera mode to apply. |
Definition at line 18 of file CameraSystem.cpp.
◆ on_receive() [3/6]
ETL message handler to set the path used by CameraMode::Path and rewinds playback.
Call this before switching mode to Path. The pointer must remain valid for the lifetime of the playback.
- Parameters
-
| msg | The event payload containing the pointer to the CameraPath to play. Must not be null |
Definition at line 33 of file CameraSystem.cpp.
◆ on_receive() [4/6]
ETL message handler to set the character position.
- Parameters
-
Definition at line 41 of file CameraSystem.cpp.
◆ on_receive() [5/6]
ETL message handler to make the Camera active.
- Parameters
-
| msg | The event payload (unused) |
Definition at line 46 of file CameraSystem.cpp.
◆ on_receive() [6/6]
ETL message handler to disable the Camera.
- Parameters
-
| msg | The event payload (unused) |
Definition at line 51 of file CameraSystem.cpp.
◆ on_receive_unknown()
| void CameraSystem::on_receive_unknown |
( |
const etl::imessage & | msg | ) |
|
|
inline |
Fallback handler for unhandled ETL messages.
Required by the ETL message router interface. Safely ignores any messages routed to the CameraSystem that do not have a specific handler.
- Parameters
-
| msg | The unhandled incoming message (unused). |
Definition at line 109 of file CameraSystem.hpp.
◆ shutdown()
| void CameraSystem::shutdown |
( |
| ) |
|
|
override |
◆ update()
| void CameraSystem::update |
( |
ae::q20_12_t | | ) |
|
|
override |
Core update loop that advances camera state and broadcasts the resulting gluLookAt arguments.
- Parameters
-
| dt | Fixed-point delta time passed from the aegis engine loop (currently unused). |
Definition at line 79 of file CameraSystem.cpp.
◆ Singleton< CameraSystem >
◆ angle
| ae::q20_12_t CameraSystem::angle {0} |
|
private |
◆ angleIncrement
| ae::q20_12_t CameraSystem::angleIncrement {0.05} |
|
private |
◆ camPos
◆ charPos
◆ currentPos
| Vec3<ae::q20_12_t> CameraSystem::currentPos = {} |
|
private |
◆ distance
| ae::q20_12_t CameraSystem::distance {1.5} |
|
private |
◆ freeCameraSpeed
| ae::q20_12_t CameraSystem::freeCameraSpeed {0.02} |
|
private |
◆ freeInitialised
| bool CameraSystem::freeInitialised = false |
|
private |
◆ height
| ae::q20_12_t CameraSystem::height {0.6} |
|
private |
◆ isRotationLocked
| bool CameraSystem::isRotationLocked = false |
|
private |
◆ lookAhead
| ae::q20_12_t CameraSystem::lookAhead {0.5} |
|
private |
◆ math
| MathManager& CameraSystem::math = MathManager::getInstance() |
|
private |
◆ mode
◆ path
◆ pathDone
| bool CameraSystem::pathDone = false |
|
private |
◆ pathFrame
| int CameraSystem::pathFrame = 0 |
|
private |
◆ pathKeyIndex
| int CameraSystem::pathKeyIndex = 0 |
|
private |
◆ targetPos
| Vec3<ae::q20_12_t> CameraSystem::targetPos = {} |
|
private |
The documentation for this class was generated from the following files: