how to use vtk import obj file which contains multiple objects?

I am using vtkobjreader to import obj and show them in my viewer.
One obj file may contain more than one object.
How to import the obj file and create multiple objects?

Use vtkOBJImporter to import multiple objects from a .obj file.

See this example. It also shows how to get each object.

There are many examples in the VTKExamples Project.

Enjoy VTK,


What about stl or ply? Do they have reader and importer? Importer for a file that contains multiple objects? @lorensen

They do not have importers.