[vtkusers] Importing 3DS and VRML files.

Robert Belleman robbel at science.uva.nl
Tue Apr 23 11:13:40 EDT 2002


On Tue, Apr 23, 2002 at 05:04:14PM +0200, Allan Reinhold Jensen wrote:
> I did try the GetNumberOfItems() function, however this only tells me how
> many items the list contains, and not their type. The item list contains
> geometrical objects as well as lights, cameras etc. If I enable the
> debugger with importer->DebugOn(), I can see it loads a set of polygons, a
> camera, and some lightsources. This is all printed out in the debug window.

That's weird; the importer should read actors, lights and cameras
separately. Well; I'm assuming that's what the protected methods
ImportActors(), ImportCameras() and ImportLights() do in vtkImporter...

And as these things are put into different collections, I would expect
you get the number of items in that collection only (although I'm not
sure what happens when there are multiple cameras, since there is no
such thig as a vtkCameraCollection).

What do you get when you call this?:

   int nlights = importer->GetRenderer()->GetLights()->GetNumberOfItems();

-- Rob

-- 
[] Robert Belleman         X  Section Computational Science            []
[] robbel at science.uva.nl  |X| University of Amsterdam, the Netherlands []
[] tel: (+31) 20 525 7510  X  http://www.science.uva.nl/~robbel/       []



More information about the vtkusers mailing list