On Saturday 02 July 2011 20:49:49 David Cofer wrote:
> Hi,
> 
> This may be easy and I am just not seeing how to do it at the moment. I have
> a scene graph and I would like to add an object to an arbitrary node on the
> graph, but I want to make sure that the new node is positioned at the world
> coordinates that I have specified. So I need to calculate the local
> transform that would be needed when added to a node that would give the new
> node that world coordinates. This is obviously not a simple matter of
> finding the difference between the world coords and the parent object,
> because there could be any number of rotations in the scene graph to that
> point. I was wondering if anyone knew if there was a simple way to do this
> before I go digging out my matrix math books to try and figure this out.
> 
> Thank you!
> 
> Cheers,
> David

Hi David,

have a look at the getWorldMatrices() method of osg::Node. It returns a list 
of all matrices that are in the scene graph above a particular node.

Regards,

Magnus

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to