Class FlyThroughCamera

Inheritance Relationships

Base Type

Class Documentation

class FlyThroughCamera : public Azura::Camera

Public Functions

FlyThroughCamera(U32 width, U32 height)
void Recompute()

Tells the camera to update its matrices & other properties.

Cameras in Azura don’t recompute always. For example, you maybe wanted to move the camera first, then rotate it, maybe then shift it due to some physics. At the end, One can call recompute only once to get the final view projection matrix.

Recompute will compute the view & projection matrices (and their combinations).

void OnMouseEvent(MouseEvent mouseEvent)
void OnKeyEvent(KeyEvent keyEvent)
void SetTranslationStepSize(float amount)
void RotateAboutUp(float degrees)
void SetAngleAboutRight(float ndcY)
void RotateAboutRight(float degrees)
void TranslateAlongLook(float amt)
void TranslateAlongRight(float amt)
void Update(float timeDelta)

Update based on Window events.

Azura cameras have the ability to listen to keyboard events or mouse events. They can then perform movements based on the timeDelta passed. This is highly useful as every PolarCamera or FlyThroughCamera are generally the same with some modification for the screen, fovy etc.

They all respond to a basic set of movements. However, the user can modify the keyboard keys for each camera. But this is highly dependent on the application using the camera. For example, WASD is the default for all cameras. But one can change those keys to maybe say the arrow keys.

Parameters
  • timeDelta: The time delta