Class PolarCamera¶
- Defined in File PolarCamera.h
Inheritance Relationships¶
Base Type¶
public Azura::Camera
(Class Camera)
Class Documentation¶
-
class
PolarCamera
: public Azura::Camera¶ Public Functions
-
PolarCamera
(U32 width, U32 height)¶
-
PolarCamera
(U32 width, U32 height, float thethaDeg, float phiDeg, float zoom)¶
-
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
SetZoom
(float value)¶
-
void
SetZoomAndRecompute
(float value)¶
-
void
RotateAboutUp
(float deg)¶
-
void
RotateAboutRight
(float deg)¶
-
void
TranslateAlongLook
(float amount)¶
-
void
SetStepSize
(float value)¶
-
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
-