Editors::EditorCamera class

Base classes

class App::ICamera
This class represents a camera in the game, capable of setting the view transformations used for rendering and receiving input events.
class App::IMessageListener
An interface that can receive messages sent through the app.
class IVirtual
A default interface that provides a virtual destructor, it should only be used internally.

Constructors, destructors, conversion operators

EditorCamera(App::PropertyList* pPropList)
~EditorCamera() virtual

Public functions

auto AddRef() -> int override
auto Release() -> int override
auto Cast(uint32_t type) const -> void* override
auto OnAttach(App::ICameraManager* pManager) -> bool override
Event called when the camera is added to the camera manager.
auto OnDeattach() -> bool override
Event called when the camera is no longer in the camera manager.
void OnEnter() override
Event called when the camera is set as the active camera.
void OnExit() override
Event called when the camera is no longer the active camera.
void Update(int deltaTime, App::cViewer* pViewer) override
Event called every game loop, which should set all the transformations of the camera into the given Viewer.
void func24h(bool) override
auto OnKeyDown(int virtualKey, KeyModifiers modifiers) -> bool override
An event listener called every time a key is pressed while this camera is active.
auto OnKeyUp(int virtualKey, KeyModifiers modifiers) -> bool override
An event listener called every time a key is released while this camera is active.
auto OnMouseDown(MouseButton mouseButton, float mouseX, float mouseY, MouseState mouseState) -> bool override
An event listener called every time a mouse key is pressed while this camera is active.
auto OnMouseUp(MouseButton mouseButton, float mouseX, float mouseY, MouseState mouseState) -> bool override
An event listener called every time a mouse key is released while this camera is active.
auto OnMouseMove(float mouseX, float mouseY, MouseState mouseState) -> bool override
An event listener called every time the mouse is moved while this camera is active.
auto OnMouseWheel(int wheelDelta, float mouseX, float mouseY, MouseState mouseState) -> bool override
An event listener called every time the mouse wheel is moved while this camera is active.
auto func40h(int) -> bool override
auto func44h(int) -> bool override
auto func48h(int) -> bool override
auto GetPropertyList() -> App::PropertyList* override
Gets the property list from which this camera was generated.
void Initialize() override
void func54h(Vector3& dst) override

Protected variables

int mnRefCount
intrusive_ptr<App::PropertyList> mpPropList
float mfZoomScale
float mfTranslateScale
float mfRotateScale
float field_20
float field_24
float mfInitialZoom
bool field_2C
float field_30
float field_34
float mfZoom
float field_3C
float field_40
float field_44
float field_48
float field_4C
float field_50
float field_54
float mfMinZoomDistance
float mfMaxZoomDistance
float mfMinPitch
float mfMaxPitch
float mfNearClip
float mfFarClip
float mfInitialFOV
Vector3 field_74
Vector3 field_80
float field_8C
bool mbEditorCameraTurntableStyle
float field_94
float field_98
bool field_9C
GameInput mInput
App::cViewer* mpViewer

Function documentation

void Editors::EditorCamera::Update(int deltaTime, App::cViewer* pViewer) override

Event called every game loop, which should set all the transformations of the camera into the given Viewer.

Parameters
deltaTime The time ellapsed since the last call, in milliseconds.
pViewer The Viewer instance where the transformations must be set.

bool Editors::EditorCamera::OnKeyDown(int virtualKey, KeyModifiers modifiers) override

An event listener called every time a key is pressed while this camera is active.

Parameters
virtualKey The VK code of the key.
modifiers The modifiers (Ctrl, Alt and Shift) currently being pressed.
Returns Whether the event was handled or not.

bool Editors::EditorCamera::OnKeyUp(int virtualKey, KeyModifiers modifiers) override

An event listener called every time a key is released while this camera is active.

Parameters
virtualKey The VK code of the key.
modifiers The modifiers (Ctrl, Alt and Shift) currently being pressed.
Returns Whether the event was handled or not.

bool Editors::EditorCamera::OnMouseDown(MouseButton mouseButton, float mouseX, float mouseY, MouseState mouseState) override

An event listener called every time a mouse key is pressed while this camera is active.

Parameters
mouseButton The button that was pressed.
mouseX The X position of the mouse.
mouseY The Y position of the mouse.
mouseState The state of the mouse.
Returns Whether the event was handled or not.

bool Editors::EditorCamera::OnMouseUp(MouseButton mouseButton, float mouseX, float mouseY, MouseState mouseState) override

An event listener called every time a mouse key is released while this camera is active.

Parameters
mouseButton The button that was released.
mouseX The X position of the mouse.
mouseY The Y position of the mouse.
mouseState The state of the mouse.
Returns Whether the event was handled or not.

bool Editors::EditorCamera::OnMouseMove(float mouseX, float mouseY, MouseState mouseState) override

An event listener called every time the mouse is moved while this camera is active.

Parameters
mouseX The X position of the mouse.
mouseY The Y position of the mouse.
mouseState The state of the mouse.
Returns Whether the event was handled or not.

bool Editors::EditorCamera::OnMouseWheel(int wheelDelta, float mouseX, float mouseY, MouseState mouseState) override

An event listener called every time the mouse wheel is moved while this camera is active.

Parameters
wheelDelta The amount of units the wheel moved. This is a multiple of UTFWin::kMouseWheelDelta.
mouseX The X position of the mouse.
mouseY The Y position of the mouse.
mouseState The state of the mouse.
Returns Whether the event was handled or not.