Jason Daly wrote:
If you really do need to get at the low-level data, you can use the NodeVisitor method I described previously. You'll need to create a class that inherits from osg::NodeVisitor and overrides the apply(Geometry *) method to perform whatever operations you need on each Geometry in your scene. You also might want to look at the AttributeFunctor class inside osg::Drawable and/or the PrimitiveFunctor class inside osg::Geometry. These allow you to perform similar operations on the vertices and/or primitives (triangles, quads, etc.) inside the Geometry object.
I should point out you can also just get the attribute arrays (vertices, normals, etc) by calling the appropriate get*Array() method on the Geometry. For example, getVertexArray() will fetch the vertex coordinate array.
You can do the same with the primitives by calling getPrimitiveSet(). You'll probably need to familiarize yourself with the different types of primitive sets (DrawArrays, DrawArrayLengths, and DrawElements) as well.
--"J" _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

