[osg-users] Processing vertices in a subtree

Robert Osfield robert.osfield at gmail.com
Wed Jul 16 09:00:39 PDT 2008

On Wed, Jul 16, 2008 at 4:54 PM, Argentieri, John-P63223
<John.Argentieri at gdc4s.com> wrote:
> Robert,
> I've tried to write a NodeVisitor to grab all the vertices in a subtree. I'm
> trying to push those vertices into DelaunayTriangulator. The problem is that
> my NodeVisitor ends up seeing each vertex like 5 times in the subtree. Is
> there a way to get a set of all vertices with no repeats at the
> Geode/Drawable/Geometry/Primitive level?

How many times things are shared is all down to your scene graph, and
how you manage your scene graph in your visitor is entirely down to
your code.  I'd personally use a std::set or similar to keep track of
what elements I've processed already but this really just a C++
programming issue, not at all something that is OSG specific.


More information about the osg-users mailing list