This class implements a camera. More...
#include "Camera.hpp"
Public Member Functions | |
Vector3fT | GetXAxis () const |
Returns the x-axis (pointing right) of the camera space. More... | |
Vector3fT | GetYAxis () const |
Returns the y-axis (pointing forward) of the camera space. This is the direction the camera is looking into! More... | |
Vector3fT | GetZAxis () const |
Returns the z-axis (pointing up) of the camera space. More... | |
const MatrixT & | GetMatrix () const |
Returns the matrix that represents the position and orientation of this camera. More... | |
void | SetLookAtPos (const Vector3fT &LookAtPos) |
This method automatically computes the orientation of the camera so that it looks at the given point. More... | |
void | LimitAngles () |
This method wraps the yaw into the [0°, 360°[ intervall and clamps the pitch to -90° and +90°. Call this method after each manipulation of the angles! More... | |
Public Attributes | |
Vector3fT | Pos |
The cameras position in the world. More... | |
cf::math::AnglesfT | Angles |
The angles that describe the cameras orientation. The pitch value is limited/clamped to the interval from -90° to +90°, and roll is not used at all. More... | |
float | ViewDirLength |
This member defines how long the view direction vector (GetYAxis()) is drawn in the 2D views. More... | |
float | VerticalFOV |
The cameras field-of-view angle, in vertical (up/down) direction. More... | |
float | NearPlaneDist |
The distance of the near clip plane to the tip of the view pyramid. More... | |
float | FarPlaneDist |
The distance of the far clip plane to the tip of the view pyramid. More... | |
This class implements a camera.
Cameras are associated with the 3D views and controlled with the Camera tool. A camera is represented by an orthogonal, right-handed coordinate system, where the x-axis points right, the y-axis points forward (the viewing direction) and the z-axis points up.
const MatrixT & CameraT::GetMatrix | ( | ) | const |
Returns the matrix that represents the position and orientation of this camera.
Vector3fT CameraT::GetXAxis | ( | ) | const |
Returns the x-axis (pointing right) of the camera space.
Vector3fT CameraT::GetYAxis | ( | ) | const |
Returns the y-axis (pointing forward) of the camera space. This is the direction the camera is looking into!
Vector3fT CameraT::GetZAxis | ( | ) | const |
Returns the z-axis (pointing up) of the camera space.
void CameraT::LimitAngles | ( | ) |
This method wraps the yaw into the [0°, 360°[ intervall and clamps the pitch to -90° and +90°. Call this method after each manipulation of the angles!
void CameraT::SetLookAtPos | ( | const Vector3fT & | LookAtPos | ) |
This method automatically computes the orientation of the camera so that it looks at the given point.
cf::math::AnglesfT CameraT::Angles |
The angles that describe the cameras orientation. The pitch value is limited/clamped to the interval from -90° to +90°, and roll is not used at all.
float CameraT::FarPlaneDist |
The distance of the far clip plane to the tip of the view pyramid.
float CameraT::NearPlaneDist |
The distance of the near clip plane to the tip of the view pyramid.
Vector3fT CameraT::Pos |
The cameras position in the world.
float CameraT::VerticalFOV |
The cameras field-of-view angle, in vertical (up/down) direction.
float CameraT::ViewDirLength |
This member defines how long the view direction vector (GetYAxis()) is drawn in the 2D views.