pcl 中setCameraPosition的参数说明

谁说我不能喝 提交于 2019-11-25 19:36:14

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

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_x the x coordinate of the camera location
[in] pos_y the y coordinate of the camera location
[in] pos_z the z coordinate of the camera location
[in] view_x the x component of the view point of the camera
[in] view_y the y component of the view point of the camera
[in] view_z the z component of the view point of the camera
[in] up_x the x component of the view up direction of the camera
[in] up_y the y component of the view up direction of the camera
[in] up_z the y component of the view up direction of the camera
[in] viewport the viewport to modify camera of (0 modifies all cameras)

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

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

 

 

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

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!