On 9/21/06, Eric Maslowski <[EMAIL PROTECTED]> wrote:
Thanks Robert,
  Unfortunately, I currently don't have the luxury of doing it at
construction time, but this is something I will probably address in the near
future.

Is there an easy way to query whether or not a specific node already has a
MatrixTransform sitting above it? (casting the results of getParent()
perhaps?) I would like to avoid creating duplicate MatrixTransforms,
especially for scenes that may be comprised of many rigid bodies.

Sure, just use:
  for(all my parents)
  {
     if (!getParent(i)->asTransform())
     {
         need to insert a parent, but first put this in a list
     }

  }
  // then change the parents over to avoid invalidating parent positions/iterators.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to