HI Lionel,

On 14 May 2014 14:51, Lionel Lagarde <[email protected]> wrote:
> In order to get the center of the bounding box of a drawable, using to Bound
> helper class, you have to do:
> const osg::BoundingBox &bbox = geometry->getBound(); // type cast operator
> osg::Vec3 c = bbox.center();
>
> Because:
> osg::Vec3 c = geometry->getBound().center();
>
> Will throw a segmentation fault while trying to access to the bounding
> sphere member of the Bound helper class.

It shouldn't throw an seg fault once I've checked in my current work
as the getBound() from a Drawable will always pass back a valid
BoundingBox as well as valid BoundingSphere.

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

Reply via email to