If you want to go straight to specific index then you'll need to cast the drawable to osg::Geometry and walk through the PrimitiveSet's yourself. Be perpared to have to learn quite a bit about how flexible OpenGL can be w.r.t how it represent primitives.
Robert.
On 9/5/06, Bill Prendergast <[EMAIL PROTECTED]> wrote:
I have a Geometry from a loaded model and I want to get the information
about a specific primitive (vertices, color, normals, etc.) from the PrimitiveSet.
For a specific indexed Primitive (say the 10th one), I want to get the indices
into the VertexArray, NormalArray, etc.
Let's assume that everything is bound with BIND_PER_VERTEX to
make this simpler.
Is there a means using a TriangleIndexFunctor to get a specific
indexed primitive?
I can see one method which is to overload the operator() that I add to the
functor to ignore the first N calls and snapshot the three indices made in
the Nth call (i.e., if I want the vertex indices for the 10th triangle, then
I wait until the 10th operator() call and save the arguments).
Is there something faster / more elegant?
Thanks,
Bill Prendergast
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
