<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:x="urn:schemas-microsoft-com:office:excel" 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=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
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=ES link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>I think there is a bug in <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> vesActor::computeBounds()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> assert(<span style='color:blue'>this</span>->m_mapper);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (<span style='color:blue'>this</span>->m_mapper && <span style='color:blue'>this</span>->m_mapper->boundsDirty()) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->m_mapper->computeBounds();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> vesVector3f min = transformPoint3f(<span style='color:blue'>this</span>->matrix(), <span style='color:blue'>this</span>->m_mapper->boundsMinimum());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> vesVector3f max = transformPoint3f(<span style='color:blue'>this</span>->matrix(), <span style='color:blue'>this</span>->m_mapper->boundsMaximum());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setBounds(min, max);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:green'>// Since now we have new internal bounds, we would have to</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:green'>// calculate whole bounds for this actor once again.</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setBoundsDirty(<span style='color:blue'>true</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setBoundsDirty(<span style='color:blue'>false</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setParentBoundsDirty(<span style='color:blue'>true</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>else</span> <span style='color:blue'>if</span> (!<span style='color:blue'>this</span>->m_mapper && <span style='color:blue'>this</span>->boundsDirty()) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>this</span><span style='font-size:9.5pt;font-family:Consolas'>->resetBounds();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'>}<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US>I have included an additional checking just in order that this-</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>></span><span lang=EN-US>_mapper is true but the bounds are ”not dirty”.If I use the same mapper for different actors, the mapper becomes “not dirty” and the bounds of the scene are not properly calculated. In this case the resetview does not fit the whole scene. At least this works for me.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> vesActor::computeBounds()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> assert(<span style='color:blue'>this</span>->m_mapper);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (<span style='color:blue'>this</span>->m_mapper && <span style='color:blue'>this</span>->m_mapper->boundsDirty()) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->m_mapper->computeBounds();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> vesVector3f min = transformPoint3f(<span style='color:blue'>this</span>->matrix(), <span style='color:blue'>this</span>->m_mapper->boundsMinimum());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> vesVector3f max = transformPoint3f(<span style='color:blue'>this</span>->matrix(), <span style='color:blue'>this</span>->m_mapper->boundsMaximum());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setBounds(min, max);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:green'>// Since now we have new internal bounds, we would have to</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:green'>// calculate whole bounds for this actor once again.</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setBoundsDirty(<span style='color:blue'>true</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setBoundsDirty(<span style='color:blue'>false</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->setParentBoundsDirty(<span style='color:blue'>true</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>else</span> <span style='color:blue'>if</span> (!<span style='color:blue'>this</span>->m_mapper && <span style='color:blue'>this</span>->boundsDirty()) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>this</span>->resetBounds();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<span style='color:red'>else <o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'>{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'> this->m_mapper->computeBounds();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'> vesVector3f min = transformPoint3f(this->matrix(), this->m_mapper->boundsMinimum());<o:p></o:p></span></p><p class=MsoNormal style='text-indent:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'> vesVector3f max = transformPoint3f(this->matrix(), this->m_mapper->boundsMaximum());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'> this->setBounds(min, max);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:red'>}<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>}<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>