[vtkusers] Query Regarding 3DS Importer

Vardhman Jain vardhman at gmail.com
Sun Mar 20 15:01:48 EST 2005


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



More information about the vtkusers mailing list