<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText">Hi Robert,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thank you for the response.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I am still a little puzzled...shouldn't the code you refer to below set '_bounding<b>Box</b>Computed' to true in addition to the current behavior of setting ‘_bounding<b>Sphere</b>Computed’ to true? When I compare the OSG 3.0.1 version
of the method to the 3.4.0 version the setting of ‘_bounding<b>Box</b>Computed’ to true has been removed while the setting of ‘_bounding<b>Sphere</b>Computed’ to true has been added. It seems that both are necessary.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks,<o:p></o:p></p>
<p class="MsoPlainText">Rick<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: osg-users [mailto:osg-users-bounces@lists.openscenegraph.org] On Behalf Of Robert Osfield<br>
Sent: Saturday, June 11, 2016 3:07 AM<br>
To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org><br>
Subject: Re: [osg-users] Drawable getBoundingBox() question</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 10 June 2016 at 23:02, Rick Irons <<a href="mailto:Rick.Irons@mathworks.com"><span style="color:windowtext;text-decoration:none">Rick.Irons@mathworks.com</span></a>> wrote:<o:p></o:p></p>
<p class="MsoPlainText">> Shouldn’t the inlined getBoundingBox() method in include/osg/Drawable
<o:p></o:p></p>
<p class="MsoPlainText">> set _boundingBoxComputed to ‘true’ or am I missing something?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The later :-)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">From git master:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> /** Get BoundingBox of Drawable.<o:p></o:p></p>
<p class="MsoPlainText"> * If the BoundingBox is not up to date then its updated via an internal call to computeBond().<o:p></o:p></p>
<p class="MsoPlainText"> */<o:p></o:p></p>
<p class="MsoPlainText"> inline const BoundingBox& getBoundingBox() const<o:p></o:p></p>
<p class="MsoPlainText"> {<o:p></o:p></p>
<p class="MsoPlainText"> if(!_boundingSphereComputed)<o:p></o:p></p>
<p class="MsoPlainText"> {<o:p></o:p></p>
<p class="MsoPlainText"> _boundingBox = _initialBound;<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> if (_computeBoundCallback.valid())<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">_boundingBox.expandBy(_computeBoundCallback->computeBound(*this));<o:p></o:p></p>
<p class="MsoPlainText"> else<o:p></o:p></p>
<p class="MsoPlainText"> _boundingBox.expandBy(computeBoundingBox());<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> if(_boundingBox.valid()){<o:p></o:p></p>
<p class="MsoPlainText"> _boundingSphere.set(_boundingBox.center(),<o:p></o:p></p>
<p class="MsoPlainText">_boundingBox.radius());<o:p></o:p></p>
<p class="MsoPlainText"> } else {<o:p></o:p></p>
<p class="MsoPlainText"> _boundingSphere.init();<o:p></o:p></p>
<p class="MsoPlainText"> }<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> _boundingSphereComputed = true;<o:p></o:p></p>
<p class="MsoPlainText"> }<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> return _boundingBox;<o:p></o:p></p>
<p class="MsoPlainText"> }<o:p></o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">osg-users mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:osg-users@lists.openscenegraph.org"><span style="color:windowtext;text-decoration:none">osg-users@lists.openscenegraph.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org"><span style="color:windowtext;text-decoration:none">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</span></a><o:p></o:p></p>
</div>
</body>
</html>