Hello Deepu,
I am working on a simulation project in which I have to
define an OSG node in the physics world (Bullet Physics). Can any one
guide me towards a method by which I can convert an OSG node to a mesh
so that I can define it in the physics world.
In general, you would write a node visitor that given your node, would
extract the vertices and triangles. Then you would give those to your
physics engine. You'll have to figure out the particular format of the
mesh the physics engine expects, of course. We can't help you with that.
There is some code in the OBJ writer
(src/osgPlugins/obj/OBJWriterNodeVisitor.{cpp|h}) which you could use as
an example of how to extract vertices and triangles from a geometry object.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org