[vtkusers] VtkVRMLImporter

alletto at dei.unipd.it alletto at dei.unipd.it
Sat May 22 11:13:45 EDT 2004


Hi vtk users,
I have some problems when using vtkVRMLImporter, namely with importing colour.
Does vtk support color node and precisely ColorPerVertex?

vtkRenderWindow *renWin = vtkRenderWindow::New();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
vtkInteractorStyleTrackballCamera *style = 
vtkInteractorStyleTrackballCamera::New();
vtkVRMLImporter *importObj = vtkVRMLImporter::New();
importObj->SetFileName(newfile);
importObj->SetRenderWindow(renWin);
importObj->Read();

vtkRenderer *ren1 = importObj->GetRenderer();
iren->SetRenderWindow(renWin);  
iren->SetInteractorStyle(style);
renWin->Render();
renWin->SetWindowName(newfile);
renWin->Render();
    
iren->Start();
	 
renWin->Delete();
iren->Delete();
style->Delete();
importObj->Delete();

Is there anything wrong?

Thank you in advance

Michele Alletto



-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



More information about the vtkusers mailing list