Hi Eric,

Take a look at two things that might be of interest:

The Dice example: 

http://andesengineering.com/misc/dice.zip

A snippet from the Training course:

http://andesengineering.com/misc/shmmatx.zip

The first integrates OSG with ODE a popular open source physics engine.  It does so via MatrixTransform callbacks, that reference the ODE structures and convert ODE matrices to OSG matrices.

The second example is a teaser for anyone considering taking the OSG Training course.  It is an example on how to build Node Kits.  The example extends the base osg::MatrixTransform class by providing the capability to allocate the Matrix in shared memory.  (shared memory in this case, is implemented with memory mapped files). 

The reason this might interest you is that you can create a scene that is loaded from a .osg file format containing ShmemMatrixTransforms in it.  You can then attach to the shared memory via the file names through an external program.  This way you can keep your physics engine code completely separate (and in a different program - if you so choose) from the scene graph and simply update the scene externally.

-don

On 9/21/06, Eric Maslowski <[EMAIL PROTECTED]> wrote:
Hello all,

  In line with recent discussions regarding documentation and such, what is
the recommended way to grab a arbitrary node from the scenegraph and move it
manually? I'm working on integrating a physics engine with OSG and I would
like to simply "bind" an osg node to the physics-based object so that the
physics transform overwrites that of the OSG node. All nodes are previously
loaded before building the physics objects so I have to query the scenegraph
for the necessary elements.



I can grab a node from the scene graph without issue, but just moving the
object seems problematic. I have tried dynamic_cast, using
asTransform/asMatrixTransform routines, grabbing the parent and
casting/modifying that, but it never moves. What is the recommended method?



Thanks



E.




_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to