EditorCamera class
#include <Editor/Public/EditorCamera.h>
Public functions
- void Fly(const EditorCameraInput& input, float dt)
- Free-fly: mouse look, WASD/QE translation, wheel scales move speed.
- void Orbit(float dx, float dy, const float pivot[3])
- Turn around
pivotby a mouse movement in pixels, keeping the distance to it. - void Pan(float dx, float dy, float unitsPerPixel)
- void Dolly(float amount, const float pivot[3])
- Move toward
pivotbyamountof the distance to it (negative moves away). - void ChangeSpeed(float notches)
- Scale the fly speed by wheel notches.
- void SetPose(float x, float y, float z, float yaw, float pitch)
- Place the camera explicitly.
- void Frame(const float centre[3], float radius)
- void SeedFrom(const TemporalFrameHeader& header)
- auto IsSeeded() const -> bool
- auto GetMoveSpeed() const -> float
- auto GetFocusDistance() const -> float
- How far ahead the camera looks at: what it orbits when nothing is selected.
- void FocusPoint(float out[3]) const
- The point FocusDistance ahead.
- auto GetView() const -> ViewCamera
Function documentation
void EditorCamera:: Pan(float dx,
float dy,
float unitsPerPixel)
Slide in the view plane so what is under the pointer follows it; unitsPerPixel at the depth being dragged.
void EditorCamera:: Frame(const float centre[3],
float radius)
Move back along the current view direction until a sphere at centre of radius fills the view.
void EditorCamera:: SeedFrom(const TemporalFrameHeader& header)
Adopt the world's published camera the first time the viewport is used, so switching to the editor camera doesn't teleport the view.