Thanks again, Robert. One more quick question regarding the use/purpose of MaxtrixTransforms. Is there a reason why the transforms for a node are separate from the Node* class? The reason I ask is that I'm finding myself using a MatrixTransform above many of my objects (static or otherwise), but not anywhere else. Are there other intentions or advanced uses for the MaxtrixTransform class which better demonstrate/explain the separation?
Thanks again for your advice. If I have something worth sharing regarding the physics integration, I'll post it. Cheers E. --- Eric Maslowski Research Computer Specialist University of Michigan 3D Lab Autodesk 3D Studio Max Certified Trainer email: [EMAIL PROTECTED] office: 734-615-9699 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of Robert Osfield > Sent: Thursday, September 21, 2006 16:57 > To: osg users > Subject: Re: [osg-users] simple question regarding transforms > > 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/
