Hi Arka? Saha? On 6 April 2013 14:10, Arka Saha <[email protected]> wrote: > I just started using OSG. I need to know how to get size of the parent.
You phone up your parents and ask them, or just sneak a tape measure next time you see them :-) > Actually I have a flat UTM terrain and I need to put some object on that. > Now I have no idea about how much the child needed to be translated and logic > behind it. Probably if I can get the size of the parent in OSG world then I > can calculate the child position. You can get the bonding sphere of any node in the scene graph, and you can get a nodes parent node via Node::getParents() and get the boudning sphere(s) but I really don't think this is what you are after and the "parent" in your question is probably just misleading. Geometry in the OSG are all on the leaves so they can't be the parent of anything. If you have a Geometry that you want to know the size of then you can use it's bounding box, or just get the vertex array and walk thorugh it. However, whether this is appropriate in your case I can't say with so few details about your usage model and scene graph construction. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

