Xin Chen wrote:
        Thank you for the reply. I do need the vertices and faces. My 
application is to load CAD model and simulate the projection (X-ray image) of 
the model according to the materials. So the ability to access individual 
vertices are important for my application. Any easy ways to build a program 
that able to load different types of model and also can access individual 
vertices and faces? Thanks

I'm not sure what you mean by "simulate the projection ... according to the materials". Can you elaborate?

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.

--"J"

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to