关键代码:
vtkSmartPointer<vtkTexture> atext =
vtkSmartPointer<vtkTexture>::New();
atext->SetInputConnection(textureFile->GetOutputPort());
atext->InterpolateOn();
// Create a plane source and actor. The vtkPlanesSource generates
// texture coordinates.
//
vtkSmartPointer<vtkPlaneSource> plane =
vtkSmartPointer<vtkPlaneSource>::New();
vtkSmartPointer<vtkPolyDataMapper> planeMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
planeMapper->SetInputConnection(plane->GetOutputPort());
vtkSmartPointer<vtkActor> planeActor =
vtkSmartPointer<vtkActor>::New();
planeActor->SetMapper(planeMapper);
planeActor->SetTexture(atext);
demo:https://lorensen.github.io/VTKExamples/site/Cxx/Texture/TexturePlane/