0.实现效果
显示箭头
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);
}
显示球体
vtkOutputWind