Hi, I am trying to rotate an object with .obj format. Is there any example that I can learn from?
I checked out the example RotationAroundLine.cxx. It is about rotating an Arrow. It has the following code:
// Create arrow
vtkNew<vtkArrowSource> source;
// Create a transform that rotates the arrow 45° around the z-axis
vtkNew<vtkTransform> transform;
transform->RotateWXYZ(45, 0, 0, -1);
vtkNew<vtkTransformPolyDataFilter> transformFilter;
transformFilter->SetTransform(transform);
transformFilter->SetInputConnection(source->GetOutputPort());
transformFilter->Update();
My issue is when I use vtkSmartPointer polyData to read a .obj file, I can not find equivalent method to perform transformFilter->SetInputConnection(source->GetOutputPort()) for polyData. Can anyone help?
Thanks!