[vtkusers] A question of attributes

Mark Coletti mcoletti at lychnobite.org
Mon Feb 25 17:47:27 EST 2002


I have some National Hydrography Dataset (http://nhd.usgs.gov/) data
that I've succeeded in rendering in vtk.  Now the problem is to find
the best way to mix in other data with the raw geospatial stuff.  I've
yet to find a good way to do this in vtk.

Currently I do this to render the spatial data.

1. create a vtkPolyData
2. for all lines, do:

   2.1 append its points to a point vector
   2.2 append a new vtkPolyLine to the vtkPolyData using
       the point ids of the points from 2.1


Again, I want to do more than look at water topologies.  I have a few
other goals:

- must be able to find specific spatial entity

- ... then be able to assign additional attributes to it; note that
  this means adding a attribute for a vtkPolyLine, not its points
  (i.e., at the cell level)

- must be pickable


This implies that I should associate a vtkActor with each poly line,
and then possibly aggregate them in a vtkAssembly as actors and
assemblies are the only pickable vtk entities.  However, I don't see
where I can associate attributes with either of these.  Is there a way
to bind attributes to actors and/or assemblies?  If not, what
alternative implementation mechanism is there, if any?

I'm beginning to wonder if I should just go with a scenegraph based
mechanims, like Open Inventor.  =\


Cheers!

Mark
-- 
 Mark Coletti | mailto:mcoletti at lychnobite.org | http://www.lychnobite.org/
Most C++ programmers really only use a subset of C++ commonly known as C++--




More information about the vtkusers mailing list