Toast Engine
Loading...
Searching...
No Matches
toast::EditorCameraController Class Reference

Public Member Functions

void tick (float dt, Camera *target)
 Advances the fly camera and writes the result onto target.
void setEnabled (bool enabled) noexcept
 Enables or disables input handling for this controller.
void configure (event::EditorCameraMode mode, float speed)
void copyViewFrom (const EditorCameraController &other) noexcept
auto mode () const noexcept -> event::EditorCameraMode
auto speed () const noexcept -> float
auto position () const noexcept -> glm::vec3
auto orbitRadius () const noexcept -> float
auto orbitElevation () const noexcept -> float

Member Function Documentation

◆ setEnabled()

void toast::EditorCameraController::setEnabled ( bool enabled)
noexcept

Enables or disables input handling for this controller.

Every open Workspace owns a controller and they all subscribe to the same global input events, so without this a fly-camera drag in one workspace would silently move and rotate every other workspace's camera too - the drift only becoming visible on switching tabs. Only the workspace being looked through should consume input

◆ tick()

void toast::EditorCameraController::tick ( float dt,
Camera * target )

Advances the fly camera and writes the result onto target.

Parameters
dtDelta time in seconds

The documentation for this class was generated from the following files: