Dear Cory Quammen and Mathieu Westphal,
thanks for your reply. Below is the sample code i used to test and generate above images.
void testReadPolydata(int argc, char* argv[])
{
vtkNew<vtkXMLPolyDataReader> reader;
reader->SetFileName(argv[1]);
reader->Update();
auto poly = reader->GetOutput();
vtkNew<vtkOpenGLPolyDataMapper> mapper;
mapper->SetInputData(poly);
vtkNew<vtkActor> actor;
actor->SetMapper(mapper);
actor->GetProperty()->SetEdgeVisibility(1);
vtkNew<vtkRenderer> render;
render->AddViewProp(actor);
vtkNew<vtkRenderWindow> window;
window->AddRenderer(render);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(window);
renderWindowInteractor->Initialize();
window->Render();
renderWindowInteractor->Start();
}
thanks for your kindly help!