Xin Chen wrote:
I'm new to OSG. I use the following code to load my model, which is successful. How can I access the vertices and faces of the model? Thank you.
nNode = osgDB::readNodeFile("D:/Livingroom.3DS");
Access them for what purpose?
When your model is loaded, a scene graph is created from it. This scene
might contain several different sets of vertices, normals, texture
coordinates, and primitives. If you just want to look at them, you can
create a custom NodeVisitor to find all the osg::Geometry objects in the
scene, then query the vertex arrays and primitive sets from each
Chances are that there is an easier way to do what you want, but we
can't help you until you tell us what you're trying to do.
osg-users mailing list