[vtkusers] Query Regarding 3DS Importer

Vardhman Jain vardhman at gmail.com
Wed Mar 23 07:54:51 EST 2005


hi,
   Thanks for the suggestion, infact I changed to the other way of
using 3DSImporter i.e obtaining the renderer etc from the importer,
that worked fine for me, expect that the Imported objects missed the
texture (3DSImporter currently doesn't support Textures).


Vardhman

On Tue, 22 Mar 2005 19:48:00 +0800, ??? <zionman at seed.net.tw> wrote:
> 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
> >
> 
> 


-- 
http://vardhman.blogspot.com



More information about the vtkusers mailing list