Hi Robert,

Sounds good.  Thanks for the update. 

I believe I should just be able to switch to using _boundingShereComputed.

Rick

-----Original Message-----
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Robert Osfield
Sent: Tuesday, June 14, 2016 11:49 AM
To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
Subject: Re: [osg-users] Drawable getBoundingBox() question

Hi Rick,

I've just begun a review of the code and I currently feel that 
_boundingBoxComputed is no longer required and should be removed to avoid 
confusion.  I will need to do another review now to double check that 
everything should work without it.

Robert.

On 13 June 2016 at 15:29, Rick Irons <rick.ir...@mathworks.com> wrote:
> Hi Robert,
>
>
>
> Thank you for the response.
>
>
>
> I am still a little puzzled...shouldn't the code you refer to below 
> set '_boundingBoxComputed' to true in addition to the current behavior 
> of setting ‘_boundingSphereComputed’ to true?  When I compare the OSG 
> 3.0.1 version of the method to the 3.4.0 version the setting of 
> ‘_boundingBoxComputed’ to true has been removed while the setting of 
> ‘_boundingSphereComputed’ to true has been added.  It seems that both 
> are necessary.
>
>
>
> Thanks,
>
> Rick
>
>
>
>
>
> -----Original Message-----
> From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On 
> Behalf Of Robert Osfield
> Sent: Saturday, June 11, 2016 3:07 AM
> To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
> Subject: Re: [osg-users] Drawable getBoundingBox() question
>
>
>
> On 10 June 2016 at 23:02, Rick Irons <rick.ir...@mathworks.com> wrote:
>
>> Shouldn’t the inlined getBoundingBox() method in include/osg/Drawable
>
>> set _boundingBoxComputed to ‘true’ or am I missing something?
>
>
>
> The later :-)
>
>
>
> From git master:
>
>
>
>         /** Get BoundingBox of Drawable.
>
>           * If the BoundingBox is not up to date then its updated via 
> an internal call to computeBond().
>
>           */
>
>         inline const BoundingBox& getBoundingBox() const
>
>         {
>
>             if(!_boundingSphereComputed)
>
>             {
>
>                 _boundingBox = _initialBound;
>
>
>
>                 if (_computeBoundCallback.valid())
>
>
>
> _boundingBox.expandBy(_computeBoundCallback->computeBound(*this));
>
>                 else
>
>                     _boundingBox.expandBy(computeBoundingBox());
>
>
>
>                 if(_boundingBox.valid()){
>
>                     _boundingSphere.set(_boundingBox.center(),
>
> _boundingBox.radius());
>
>                 } else {
>
>                     _boundingSphere.init();
>
>                 }
>
>
>
>                 _boundingSphereComputed = true;
>
>             }
>
>
>
>             return _boundingBox;
>
>         }
>
> _______________________________________________
>
> osg-users mailing list
>
> osg-users@lists.openscenegraph.org
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to