Jason Daly wrote:
> Xin Chen wrote:
>
> > Hi,
> >
> > 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
> Geometry object.
>
> 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.
>
> --"J"
>
> _______________________________________________
> osg-users mailing list
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ------------------
> Post generated by Mail2Forum
Hello J,
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
Xin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13130#13130
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org