[vtkusers] Query Regarding 3DS Importer

??? zionman at seed.net.tw
Tue Mar 22 06:48:00 EST 2005


It seems that the calling sequence is wrong.

importer->SetRenderWindow(renWin);
should be called before all another importer function call.
while SetRenderWindow, the default renderer with renderwindow and their
properties
, include Actors bind to  that will be reset to that of new RenderWindow.

----- Original Message ----- 
From: "Vardhman Jain" <vardhman at gmail.com>
To: <vtkusers at vtk.org>
Sent: Monday, March 21, 2005 4:01 AM
Subject: [vtkusers] Query Regarding 3DS Importer


> Hi,
>     Has any one obtained any success loading 3ds file in VTK in C++.
> I am using the simplest possible code as below to load a 3ds file and
> nothing seems to be rendered, can some one suggest any solutions.
> [snip]
> vtkRenderer *ren = vtkRenderer::New();
>  vtkRenderWindow *renWin = vtkRenderWindow::New();
>  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
>  renWin->AddRenderer(ren);
>  iren->SetRenderWindow(renWin);
>  ren->SetBackground(0, 0, 0);
>  renWin->SetSize(480, 480);
> vtk3DSImporter *importer=vtk3DSImporter::New();
>  importer->ComputeNormalsOn();
>  importer->SetFileName(argv[1]);
>  importer->Read();
>  importer->SetRenderWindow(renWin);
> renWin->Render();
> iren->Start();
>
> [/snip]
>
> Thanks
> -- 
> Vardhman
> http://vardhman.blogspot.com
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list