[vtkusers] Can I have 2 set of points with vtkGlyph3d?

Drak draktharrblorf at gmail.com
Wed May 13 14:59:57 EDT 2015


Let's say I have 2 sets of points (polydata1 and polydata2), one that I want
to visualize with arrowsSource and the other with cubeSource. What I've been
trying to do is the following:

          glyphSource = vtkSmartPointer<vtkArrowSource>::New();
          glyphSource2 = vtkSmartPointer<vtkCubeSource>::New();

          glyph3D = vtkSmartPointer<vtkGlyph3D>::New();
          glyph3D->SetIndexModeToOff();

          glyph3D->SetSourceConnection(0, glyphSource->GetOutputPort());
          glyph3D->SetInputData(0, polydata);                                         
// FIRST SET OF POINTS
          glyph3D->SetInputConnection(1, glyphSource2->GetOutputPort());
          glyph3D->SetInputData(1, polydata2);                                       
// SECOND SET OF POINTS

          mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
          mapper->SetInputConnection(glyph3D->GetOutputPort());

          actor =  vtkActor::New();
          actor->SetMapper(mapper);

Unfortunately, nothing appears. :(

Is there something I've done wrong? The documentation for having several
ports/connection really isn't clear and I can't seem to find the
problem/solution.

Again, I have no problem with one set of points, but if I have more than one
set of points, the function setDatainput (int, polydata) doesn't seem to
work as intended.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Can-I-have-2-set-of-points-with-vtkGlyph3d-tp5731902.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list