Hi Tom, There isn't a convenience function to jump from a Matrix to a ControlPoint so you'll need to extract the position, rotation and scale from the osg::Matrix yourself. There are Matrix::getTrans(), Matrix::getRotate() and Matrix::getScale() methods that while they aren't full proof should help.
Robert. On 2 July 2013 18:52, Tom Jones <[email protected]> wrote: > Hi, > > A project I am working on involves adding a 3d visualization component to a > simulation model. The simulation code returns a 4x4 transformation matrix of > the component for each time point you are interested in. The format of this > 4x4 transformation matrix is pretty much your typical standard OpenGL 3d > transformation matrix. > > However, because I am using osg for the 3d visualization, and I need to take > this 4x4 transformation matrix and convert it into a Vec3 for position, Quat4 > for rotation, scaling, etc. Unfortunately I do not have access and ability to > modify the source of the simulation component, so I can't change it's output, > I have to make some kind of bridge between it and the osg AnimationPath > ControlPoint setup. > > Does anyone know how to convert a 4x4 transformation matrix to an > AnimationPath::ControlPoint? If not, is there a way to create AnimationPaths > by inserting a TransformMatrix instead of a ControlPoint? > > Thank you. > ... > > Best, > Tom > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=55095#55095 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

