Camera class holds a set of camera parameters together with the window pos/size. More...
#include <common.h>
Public Member Functions | |
| void | computeProjectionMatrix (Eigen::Matrix4d &proj) const |
| Computes Projection Matrix for Camera. | |
| void | computeViewMatrix (Eigen::Matrix4d &view_mat) const |
| Computes View matrix for Camera (Based on gluLookAt) | |
| template<typename PointT > | |
| void | cvtWindowCoordinates (const PointT &pt, Eigen::Vector4d &window_cord) const |
| converts point to window coordiantes | |
| template<typename PointT > | |
| void | cvtWindowCoordinates (const PointT &pt, Eigen::Vector4d &window_cord, const Eigen::Matrix4d &composite_mat) const |
| converts point to window coordiantes | |
Public Attributes | |
| double | clip [2] |
| Clipping planes depths. clip[0] is near clipping plane, and clip [1] is the far clipping plane. | |
| double | focal [3] |
| Focal point or lookAt. | |
| double | fovy |
| Field of view angle in y direction (radians). | |
| double | pos [3] |
| Position of the camera. | |
| double | view [3] |
| Up vector of the camera. | |
| double | window_pos [2] |
| double | window_size [2] |
Camera class holds a set of camera parameters together with the window pos/size.
Definition at line 122 of file visualization/include/pcl/visualization/common/common.h.
| void Camera::computeProjectionMatrix | ( | Eigen::Matrix4d & | proj | ) | const |
Computes Projection Matrix for Camera.
| [out] | proj | the resultant matrix |
Definition at line 385 of file visualization/src/common/common.cpp.
| void Camera::computeViewMatrix | ( | Eigen::Matrix4d & | view_mat | ) | const |
Computes View matrix for Camera (Based on gluLookAt)
| [out] | view_mat | the resultant matrix |
Definition at line 362 of file visualization/src/common/common.cpp.
| void Camera::cvtWindowCoordinates | ( | const PointT & | pt, |
| Eigen::Vector4d & | window_cord | ||
| ) | const |
converts point to window coordiantes
Converts point to window coordinates.
| [in] | pt | xyz point to be converted |
| [out] | window_cord | vector containing the pts' window X,Y, Z and 1 |
This function computes the projection and view matrix every time. It is very inefficient to use this for every point in the point cloud!
| [in] | pt | xyz point to be converted |
| [out] | window_cord | vector containing the pts' window X,Y, Z and 1 |
Definition at line 49 of file visualization/include/pcl/visualization/common/impl/common.hpp.
| void Camera::cvtWindowCoordinates | ( | const PointT & | pt, |
| Eigen::Vector4d & | window_cord, | ||
| const Eigen::Matrix4d & | composite_mat | ||
| ) | const |
converts point to window coordiantes
| [in] | pt | xyz point to be converted |
| [out] | window_cord | vector containing the pts' window X,Y, Z and 1 |
| [in] | composite_mat | composite transformation matrix (proj*view) |
Use this function to compute window coordinates with a precomputed transformation function. The typical composite matrix will be the projection matrix * the view matrix. However, additional matrices like a camera disortion matrix can also be added.
| [in] | pt | xyz point to be converted |
| [out] | window_cord | vector containing the pts' window X,Y, Z and 1 |
| [in] | composite_mat | composite transformation matrix (proj*view) |
Definition at line 69 of file visualization/include/pcl/visualization/common/impl/common.hpp.
| double pcl::visualization::Camera::clip[2] |
Clipping planes depths. clip[0] is near clipping plane, and clip [1] is the far clipping plane.
Definition at line 140 of file visualization/include/pcl/visualization/common/common.h.
| double pcl::visualization::Camera::focal[3] |
Focal point or lookAt.
Definition at line 128 of file visualization/include/pcl/visualization/common/common.h.
Field of view angle in y direction (radians).
Definition at line 143 of file visualization/include/pcl/visualization/common/common.h.
| double pcl::visualization::Camera::pos[3] |
Position of the camera.
Definition at line 131 of file visualization/include/pcl/visualization/common/common.h.
| double pcl::visualization::Camera::view[3] |
Up vector of the camera.
Definition at line 135 of file visualization/include/pcl/visualization/common/common.h.
| double pcl::visualization::Camera::window_pos[2] |
Definition at line 148 of file visualization/include/pcl/visualization/common/common.h.
| double pcl::visualization::Camera::window_size[2] |
Definition at line 147 of file visualization/include/pcl/visualization/common/common.h.