[vtkusers] vtkOBJImporter can't read the whole mesh of an obj file including several parts
maskjp
jiangpengyiwu at gmail.com
Fri Oct 19 17:43:55 EDT 2018
Hi,everyone!
I use vtkOBJImporter to read an obj file including several parts (the file
is from shapenet https://www.shapenet.org/ <https://www.shapenet.org/>
models.zip <http://vtk.1045678.n5.nabble.com/file/t342591/models.zip> ).
But it can only read part of it. I also try to use paraview, but get the
same results. The following is the code:(its's the example code on
website.).
Thanks.
vtkNew<vtkOBJImporter> importer;
importer->SetFileName(filenameOBJ.data());
importer->SetFileNameMTL(filenameMTL.data());
importer->SetTexturePath(texturePath.data());
vtkNew<vtkRenderer> ren;
vtkNew<vtkRenderWindow> renWin;
vtkNew<vtkRenderWindowInteractor> iren;
renWin->AddRenderer(ren);
iren->SetRenderWindow(renWin);
importer->SetRenderWindow(renWin);
importer->Update();
renWin->SetSize(800,600);
ren->SetBackground(0.4,0.5,0.6);
ren->ResetCamera();
renWin->Render();
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list