pcl 中setCameraPosition的参数说明

开发手册上给出的参数说明如下: 

void pcl::visualization::PCLVisualizer::setCameraPosition(double pos_x,
  double pos_y,
  double pos_z,
  double view_x,
  double view_y,
  double view_z,
  double up_x,
  double up_y,
  double up_z,
  int viewport = 0 
 )  

Set the camera pose given by position, viewpoint and up vector.

Parameters

[in]pos_xthe x coordinate of the camera location
[in]pos_ythe y coordinate of the camera location
[in]pos_zthe z coordinate of the camera location
[in]view_xthe x component of the view point of the camera
[in]view_ythe y component of the view point of the camera
[in]view_zthe z component of the view point of the camera
[in]up_xthe x component of the view up direction of the camera
[in]up_ythe y component of the view up direction of the camera
[in]up_zthe y component of the view up direction of the camera
[in]viewportthe viewport to modify camera of (0 modifies all cameras)

但是对于初学者来说,几个方向向量的说明不够清晰,遂对其进一步说明。 

该方法参考 vtk Camera中关于vtkCamera::SetPosition()设置方法。

 

 

(图片来自 https://blog.csdn.net/shenziheng1/article/details/53195489

其中up为朝上方向,view为视角方向,其中方向是用方向向量表示的,及函数输入是用的方向向量。