class
DefaultCameraDefines a default implementation of ICamera.
This can be used to create a new camera only giving implementations for the methods needed.
Base classes
- class ICamera
- This class represents a camera in the game, capable of setting the view transformations used for rendering and receiving input events.
Constructors, destructors, conversion operators
Public functions
- auto AddRef() -> int override
- auto Release() -> int override
-
auto Cast(uint32_
t typeID) const -> void* override - auto OnAttach(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.
- auto OnEnter() -> void override
- Event called when the camera is set as the active camera.
- auto OnExit() -> void override
- Event called when the camera is no longer the active camera.
- auto Update(int deltaTime, cViewer* pViewer) -> void override
- Event called every game loop, which should set all the transformations of the camera into the given Viewer.
- auto func24h(bool) -> void 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() -> PropertyList* override
- Gets the property list from which this camera was generated.
- auto Initialize() -> void override
- auto func54h(Vector3& dst) -> void override
Protected variables
Function documentation
void App:: DefaultCamera:: Update(int deltaTime,
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 App:: DefaultCamera:: 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 App:: DefaultCamera:: 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 App:: DefaultCamera:: 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 App:: DefaultCamera:: 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 App:: DefaultCamera:: 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 App:: DefaultCamera:: 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. |