14 #ifndef SRC_CRAFT_CAM_H_
15 #define SRC_CRAFT_CAM_H_
199 void WalkForward(
double dt);
200 void WalkBackward(
double dt);
201 void RotateLeft(
double dt);
202 void RotateRight(
double dt);
203 void LookWithMouse(
const Vector2 &mouse_delta);
This implements a user interface for controlling the camera with the mouse.
void set_look_scale(float s)
This is the scale factor used to speed up / slow down looking around when moving the head with the mo...
void set_translation_scale(float s)
This is the scale factor used to speed up / slow down forward/backward translation when walking for t...
void UpdateSimulation(double dt, GLFWwindow *window_ptr)
Call this from your app's UpdateSimulation() method. This tells the camera to simulate walking based ...
Vector3 look()
Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.
void set_rotation_scale(float s)
This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT /...
void set_view_matrix(Matrix4 view_matrix)
This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...
Point3 eye()
Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.
void OnMouseMove(const Vector2 &normalized_mouse_delta)
Call this from your app's OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to al...
float translation_scale()
This is the scale factor used to speed up / slow down forward/backward translation when walking for t...
float look_scale()
This is the scale factor used to speed up / slow down looking around when moving the head with the mo...
float rotation_scale()
This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT /...
CraftCam(const Matrix4 &initial_view_matrix)
Creates a CraftCam object with the supplied initial view matrix.
Matrix4 view_matrix()
Access the camera view matrix created by the CraftCam interactions via this method and use it to draw...
CraftCam()
Creates a CraftCam object with an initial view matrix = identity.
void UpdateHeight(float new_y_value)
Sets the y value of the camera (i.e., the height). If you want to set the entire view matrix,...
A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements,...
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Namespace for the MinGfx Toolkit.