26 Camera::Camera(
const Point3f &position_,
const Quaternion &orientation_,
const float &near_clip_,
const float &far_clip_,
const float &fov_rad_,
const float &tunnel_vision_factor_)
27 : position(position_),
28 orientation(orientation_),
29 near_clip(near_clip_),
32 tunnel_vision_factor(tunnel_vision_factor_)
Camera(const Point3f &position=ZENI_DEFAULT_CAMERA_POSITION, const Quaternion &orientation=ZENI_DEFAULT_CAMERA_ORIENTATION, const float &near_clip=ZENI_DEFAULT_CAMERA_NEAR_CLIP, const float &far_clip=ZENI_DEFAULT_CAMERA_FAR_CLIP, const float &fov_rad_=ZENI_DEFAULT_CAMERA_FOV, const float &tunnel_vision_factor=ZENI_DEFAULT_CAMERA_TUNNEL_VISION)
The Camera constructor is an alternative to using the numerous setter functions.
Vector3f get_forward() const
Get the vector indicating the direction in which the camera is pointing.
GLint GLenum GLboolean normalized
void adjust_yaw(const float &theta)
Adjust the orientation of the camera: left == positive;.
static Quaternion Axis_Angle(const Vector3f &v, const float &theta)
Create a Quaternion from an Axis/Angle pair.
const Vector3f & get_normal() const
Vector3f get_ij() const
Get just the i and j parts.
A 3D Point represented with floats.
A Featureful 3-Space Vector Class.
GLsizei GLsizei GLfloat distance
A Featureful Quaternion Class.
static Quaternion Forward_Up(const Vector3f &destination_forward, const Vector3f &destination_up, const Vector3f &default_forward=ZENI_DEFAULT_FORWARD_VECTOR, const Vector3f &default_up=ZENI_DEFAULT_UP_VECTOR)
Create a Quaternion from a Forward/Up Vector3f pair.
void move_left_xy(const float &distance)
Move the camera in the left direction, projected onto the xy-plane.
void turn_left_xy(const float &theta)
Turn the camera left about the z-axis.
Vector3f get_left() const
Get the vector indicating what is "left" from the perspective of the camera.
void adjust_pitch(const float &phi)
Adjust the orientation of the camera: up == positive;.
void look_at(const Point3f &world_coord, const Vector3f &horizon_plane_normal=ZENI_DEFAULT_UP_VECTOR)
Set the Camera to look at a specific Point3f while maintaining a horizontal horizon for a Plane with ...
Vector3f get_up() const
Get the vector indicating what is "up" from the perspective of the camera.
Vector3f normalized() const
Get the normalized vector.
void adjust_roll(const float &rho)
Adjust the orientation of the camera: spin right == positive;.
#define ZENI_DEFAULT_UP_VECTOR
void move_forward_xy(const float &distance)
Move the camera in the forward direction, projected onto the xy-plane.
#define ZENI_DEFAULT_FORWARD_VECTOR