0.实现效果
显示箭头
![](https://img-blog.csdnimg.cn/direct/8f4163814ce9424584db2702cda4bf0c.png)
vtkOutputWindow::SetGlobalWarningDisplay(0);
pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::PCLVisualizer("3D Viewer"));
viewer->setBackgroundColor(1, 1, 1);
//添加箭头显示
pcl::PointXYZ pA(0, 0, 0);
pcl::PointXYZ pB(5, 5, 5);
viewer->addArrow<pcl::PointXYZ>(pA, pB, 255, 0, 0, true, "arrow", 0);
viewer->addCoordinateSystem(10);
viewer->initCameraParameters();
viewer->setCameraPosition(90, 90, 30, -0.5, -0.5, 0.7);
while (!viewer->wasStopped())
{
viewer->spinOnce(1000);
}
显示球体
![](https://img-blog.csdnimg.cn/direct/0ccb3b0dbfa94bf18d52e5d145aca45e.png)
vtkOutputWind