#include <camera.h>
Public Member Functions | |
virtual void | doCreate (ContextInfo &info) |
virtual void | doDestroy (ContextInfo &info) |
virtual void | getContextDependencies (V_UUID &deps) |
const rve_msgs::Quaternion & | getOrientation () |
const rve_msgs::Vector3 & | getPosition () |
const rve_msgs::Matrix4 & | getProjectionMatrix () |
const ProjectionMatrixFactoryPtr & | getProjectionMatrixFactory () const |
rve_interfaces::CameraProxy * | getProxy (const ContextInfo &info) |
Scene * | getScene () |
void | lookAt (const rve_msgs::Vector3 &point) |
template<typename T > | |
void | lookAt (T t) |
void | move (const rve_msgs::Vector3 &v) |
template<typename T > | |
void | move (T t) |
void | moveRelative (const rve_msgs::Vector3 &v) |
template<typename T > | |
void | moveRelative (T t) |
void | rotate (const rve_msgs::Quaternion &q) |
template<typename T > | |
void | rotate (T t) |
template<typename T > | |
void | rotateRelative (T t) |
void | setAspectRatio (float width_over_height) |
void | setDirection (const rve_msgs::Vector3 &dir) |
void | setOrientation (const rve_msgs::Quaternion &orient) |
template<typename T > | |
void | setOrientation (T t) |
void | setPosition (const rve_msgs::Vector3 &pos) |
template<typename T > | |
void | setPosition (T t) |
void | setProjectionMatrixFactory (const ProjectionMatrixFactoryPtr &factory) |
void | setTransform (const rve_msgs::Vector3 &pos, const rve_msgs::Quaternion &orient) |
template<typename V , typename Q > | |
void | setTransform (V v, Q q) |
Private Member Functions | |
Camera () | |
void | setProjectionMatrix (const rve_msgs::Matrix4 &matrix) |
~Camera () | |
Private Attributes | |
float | aspect_ratio_ |
rve_msgs::Quaternion | orientation_ |
rve_msgs::Vector3 | position_ |
rve_msgs::Matrix4 | projection_matrix_ |
ProjectionMatrixFactoryPtr | projection_matrix_factory_ |
uint32_t | proxy_index_ |
Scene * | scene_ |
Friends | |
CameraPtr | createCamera (Scene *) |
class | ProjectionMatrixFactory |
rve_render_client::Camera::Camera | ( | ) | [private] |
Definition at line 53 of file camera.cpp.
rve_render_client::Camera::~Camera | ( | ) | [private] |
Definition at line 61 of file camera.cpp.
void rve_render_client::Camera::doCreate | ( | ContextInfo & | info | ) | [virtual] |
Implements rve_render_client::SceneObject.
Definition at line 66 of file camera.cpp.
void rve_render_client::Camera::doDestroy | ( | ContextInfo & | info | ) | [virtual] |
Implements rve_render_client::SceneObject.
Definition at line 79 of file camera.cpp.
virtual void rve_render_client::Camera::getContextDependencies | ( | V_UUID & | deps | ) | [inline, virtual] |
Implements rve_render_client::SceneObject.
const rve_msgs::Quaternion& rve_render_client::Camera::getOrientation | ( | ) | [inline] |
const rve_msgs::Vector3& rve_render_client::Camera::getPosition | ( | ) | [inline] |
const rve_msgs::Matrix4& rve_render_client::Camera::getProjectionMatrix | ( | ) | [inline] |
const ProjectionMatrixFactoryPtr& rve_render_client::Camera::getProjectionMatrixFactory | ( | ) | const [inline] |
rve_interfaces::CameraProxy * rve_render_client::Camera::getProxy | ( | const ContextInfo & | info | ) |
Definition at line 90 of file camera.cpp.
Scene* rve_render_client::Camera::getScene | ( | ) | [inline] |
void rve_render_client::Camera::lookAt | ( | const rve_msgs::Vector3 & | point | ) |
Set the orientation of the camera such that it points toward the given point. See setOrientation() for the coordinate frame.
Definition at line 123 of file camera.cpp.
void rve_render_client::Camera::lookAt | ( | T | t | ) | [inline] |
void rve_render_client::Camera::move | ( | const rve_msgs::Vector3 & | v | ) |
Definition at line 129 of file camera.cpp.
void rve_render_client::Camera::move | ( | T | t | ) | [inline] |
void rve_render_client::Camera::moveRelative | ( | const rve_msgs::Vector3 & | v | ) |
Definition at line 138 of file camera.cpp.
void rve_render_client::Camera::moveRelative | ( | T | t | ) | [inline] |
void rve_render_client::Camera::rotate | ( | const rve_msgs::Quaternion & | q | ) |
Definition at line 148 of file camera.cpp.
void rve_render_client::Camera::rotate | ( | T | t | ) | [inline] |
void rve_render_client::Camera::rotateRelative | ( | T | t | ) | [inline] |
void rve_render_client::Camera::setAspectRatio | ( | float | width_over_height | ) |
Definition at line 179 of file camera.cpp.
void rve_render_client::Camera::setDirection | ( | const rve_msgs::Vector3 & | dir | ) |
Set the orientation of the camera such that it points in the direction described by the given direction vector. See setOrientation() for the coordinate frame.
Definition at line 110 of file camera.cpp.
void rve_render_client::Camera::setOrientation | ( | const rve_msgs::Quaternion & | orient | ) |
Set the orientation of the camera relative to the world. For the purposes of this function, the camera points in the +X direction, with +Z pointing up in the image frame and +Y pointing to the left.
Definition at line 104 of file camera.cpp.
void rve_render_client::Camera::setOrientation | ( | T | t | ) | [inline] |
void rve_render_client::Camera::setPosition | ( | const rve_msgs::Vector3 & | pos | ) |
Definition at line 98 of file camera.cpp.
void rve_render_client::Camera::setPosition | ( | T | t | ) | [inline] |
void rve_render_client::Camera::setProjectionMatrix | ( | const rve_msgs::Matrix4 & | matrix | ) | [private] |
Set the projection matrix.
The matrix is assumed to be constructed after the fashion described here: http://www.songho.ca/opengl/gl_projectionmatrix.html in which the -Z axis points away from the camera along the view axis, +X points to the right, and +Y points up. This is typical for computer graphics, but is different from the assumptions made by Camera::setOrientation().
setProjectionMatrix() is private because it should be set by a ProjectionMatrixFactory.
matrix | the new projection matrix. |
Definition at line 163 of file camera.cpp.
void rve_render_client::Camera::setProjectionMatrixFactory | ( | const ProjectionMatrixFactoryPtr & | factory | ) |
Definition at line 169 of file camera.cpp.
void rve_render_client::Camera::setTransform | ( | const rve_msgs::Vector3 & | pos, |
const rve_msgs::Quaternion & | orient | ||
) |
Definition at line 157 of file camera.cpp.
void rve_render_client::Camera::setTransform | ( | V | v, |
Q | q | ||
) | [inline] |
CameraPtr createCamera | ( | Scene * | scene | ) | [friend] |
friend class ProjectionMatrixFactory [friend] |
float rve_render_client::Camera::aspect_ratio_ [private] |
ProjectionMatrixFactoryPtr rve_render_client::Camera::projection_matrix_factory_ [private] |
uint32_t rve_render_client::Camera::proxy_index_ [private] |
Scene* rve_render_client::Camera::scene_ [private] |