Hello,
I have successfully loaded the polygon mesh 3D object file but every time it's loaded on the center position of the viewer.
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer;
viewer->addModelFromPolyData("/somepath/car.obj");
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer;
viewer->addModelFromPolyData("/somepath/car.obj");
To copy to clipboard, switch view to plain text mode
I have tried below but its only helping me to change roatation and its scale but not position.
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
transform->RotateZ(90);
transform->Scale(10, 10, 10);
viewer->addModelFromPolyData(poly_data, transform, "poly_id", 0);
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
transform->RotateZ(90);
transform->Scale(10, 10, 10);
viewer->addModelFromPolyData(poly_data, transform, "poly_id", 0);
To copy to clipboard, switch view to plain text mode
I want to change the position of the object file, like based on user preference I want to set axis center on front/back edge of car.
Please give me some suggestions.
Thanks.
Bookmarks