Hi Chase, I'd create a new MatrixTransfrom and set its matrix up to the same value as the PositionAttitudeTransform then copy across the children. Rather than deep copy I'd recommend sharing as much as possible - ideally just adding the PAT's children directly to the MatrixTransform.
Robert. On 2/18/07, Bradford, Chase <[EMAIL PROTECTED]> wrote:
Hi Everyone, I was wondering if there is a safe technique for converting between node types. I would like to substitute all PAT nodes with MatrixTransforms, but I can't think of any elegant way of ensuring that all data defined in their common base (ie. Transform), gets copied in full. Essentially, I don't care about data specific to the PAT, other than the position and attitude, which is very easy to translate with special code. What I want is a way to deep copy all data that they both inherit from their common ancestors (descriptions, statesets, reference frame, etc.), then I can explicitly translate the info of interest from the PAT to the MatrixTransform. I'm sure C++ doesn't have any builtin ways of doing this, but I thought I might see if something like this has been added to OSG. Thanks, Chase Bradford _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
