The idea is that i have a large structure, and then a sub-group called something like "bolts", which in turn contains aprox 30 bolts (every one a scene node). Each particular bolt has a correct aabb, but no other group does. This happens along the entire tree, independent of the level of depth, some leafs are 1 or 2 levels after the root, some are 5, and only the leafs have the correct info.
I can post some code if you want, but is fairly simple, or the .scene, but that one has 15.000 lines, so i'm pasting a few extracts
The .scene
Code: Select all
<scene upAxis="y" unitsPerMeter="1" unitType="meters" formatVersion="1.0" minOgreVersion="Latest version" author="EasyOgreExporter">
<environment>
<colourAmbient r="0" g="0" b="0" />
<colourBackground r="0.580392" g="0.580392" b="0.580392" />
</environment>
<nodes>
<node name="Group04" id="0" isTarget="false">
<position x="13.2807" y="-3.05176e-007" z="0" />
<rotation qx="-0" qy="-0" qz="-0" qw="-1" />
<scale x="1" y="1" z="1" />
<node name="Group04_rejilla" id="1" isTarget="false">
<position x="5.36625" y="3.05176e-007" z="-1.83105e-006" />
<rotation qx="-0" qy="-0" qz="-0" qw="-1" />
<scale x="1" y="1" z="1" />
<node name="slG04e13" id="2" isTarget="false">
<position x="0.438257" y="-1.52588e-007" z="6.67572e-008" />
<rotation qx="-0" qy="-0" qz="-0" qw="-1" />
<scale x="1" y="1" z="1" />
<entity name="slG04e13" id="3" meshFile="slG04e13.mesh" castShadows="true">
<subentities>
<subentity index="0" materialName="alum" />
</subentities>
</entity>
</node>
<node name="slG04e12" id="4" isTarget="false">
<position x="0.0478137" y="0" z="1.83105e-006" />
<rotation qx="-0" qy="-0" qz="-0" qw="-1" />
<scale x="1" y="1" z="1" />
<entity name="slG04e12" id="5" meshFile="slG04e12.mesh" castShadows="true">
<subentities>
<subentity index="0" materialName="grilland" />
<subentity index="1" materialName="grilland" />
<subentity index="2" materialName="grilland" />
</subentities>
</entity>
</node>
Code: Select all
Ogre::Vector3 size = center->nodo->_getWorldAABB().getSize();
radius = std::max(std::max(size.x, size.y), size.z) * 1.75;