gramods
|
The base of graphics Camera implementations. More...
#include <Camera.hh>
Public Member Functions | |
Camera (size_t frame_number) | |
Creates a camera for rendering the specified frame number. More... | |
Camera (const Camera &other) | |
Camera & | operator= (const Camera &other) |
template<class T > | |
Camera (const T &object) | |
Creates a camera copying frame number from another object. More... | |
Eigen::Matrix4f | getProjectionMatrix () const |
Computes and returns a projection matrix for the current camera and near and far distances. More... | |
Eigen::Affine3f | getViewMatrix () const |
Computes and returns a view matrix for the current camera. More... | |
Eigen::Vector3f | getPosition () const |
Get the position of the camera. More... | |
void | setPosition (Eigen::Vector3f p) |
Set the position of the camera. More... | |
Eigen::Quaternionf | getOrientation () const |
Get the orientation of the camera. More... | |
void | setOrientation (Eigen::Quaternionf q) |
Set the orientation of the camera. More... | |
void | setClipPlanes (float l, float r, float b, float t) |
Explicitly sets the frustum clip planes at a distance of 1. More... | |
void | getClipPlanes (float &l, float &r, float &b, float &t) const |
Gets the frustum clip planes at a distance of 1. More... | |
void | setFieldOfView (float fov_h, float fov_v) |
Sets the frustum planes of a symmetric frustum for the camera based on horizontal and vertical field-of-view, expressed in radians. More... | |
void | setClipAngles (float l, float r, float b, float t) |
Sets the frustum planes of an asymmetric frustum for the camera based on left, right, bottom and top field-of-view, expressed in radians. More... | |
void | setPose (Eigen::Vector3f p, Eigen::Quaternionf r) |
Sets the pose of the camera. More... | |
bool | setLookAtPoints (Eigen::Vector3f p, const std::vector< Eigen::Vector3f > &pts, bool symmetric=true, Eigen::Vector3f up=Eigen::Vector3f::Zero()) |
Set the position, orientation and frustum of this camera based on a eye position and a set of points that should be made visible from this point. More... | |
void | setNearFar (float near, float far) |
Sets the near and far planes. More... | |
void | setEye (Eye e) |
Sets which eye the camera is supposed to render. More... | |
Eye | getEye () const |
Sets which eye the camera is supposed to render. More... | |
Public Attributes | |
const size_t | frame_number |
The frame currently being rendered. More... | |
The base of graphics Camera implementations.
|
inline |
Creates a camera for rendering the specified frame number.
|
inline |
Creates a camera copying frame number from another object.
|
inline |
Gets the frustum clip planes at a distance of 1.
|
inline |
Sets which eye the camera is supposed to render.
Use this for example to select between left or right eye textures.
|
inline |
Get the orientation of the camera.
|
inline |
Get the position of the camera.
Eigen::Matrix4f gramods::gmGraphics::Camera::getProjectionMatrix | ( | ) | const |
Computes and returns a projection matrix for the current camera and near and far distances.
Eigen::Affine3f gramods::gmGraphics::Camera::getViewMatrix | ( | ) | const |
Computes and returns a view matrix for the current camera.
void gramods::gmGraphics::Camera::setClipAngles | ( | float | l, |
float | r, | ||
float | b, | ||
float | t | ||
) |
Sets the frustum planes of an asymmetric frustum for the camera based on left, right, bottom and top field-of-view, expressed in radians.
The left field-of-view increase left-wise while the right field-of-view increase right-wise.
|
inline |
Explicitly sets the frustum clip planes at a distance of 1.
Near and far planes are defined by the renderer that requests a projection matrix for the camera.
|
inline |
Sets which eye the camera is supposed to render.
void gramods::gmGraphics::Camera::setFieldOfView | ( | float | fov_h, |
float | fov_v | ||
) |
Sets the frustum planes of a symmetric frustum for the camera based on horizontal and vertical field-of-view, expressed in radians.
bool gramods::gmGraphics::Camera::setLookAtPoints | ( | Eigen::Vector3f | p, |
const std::vector< Eigen::Vector3f > & | pts, | ||
bool | symmetric = true , |
||
Eigen::Vector3f | up = Eigen::Vector3f::Zero() |
||
) |
Set the position, orientation and frustum of this camera based on a eye position and a set of points that should be made visible from this point.
|
inline |
Sets the near and far planes.
|
inline |
Set the orientation of the camera.
|
inline |
Sets the pose of the camera.
|
inline |
Set the position of the camera.
const size_t gramods::gmGraphics::Camera::frame_number |
The frame currently being rendered.