May be useful to others, GroupNodes don't update their bounds (which is sensible) so I made a quick change to have them determine their bounds when it's asked for through the API.
In egMain.cpp
Code:
DLLEXP void h3dGetNodeAABB( NodeHandle node, float *minX, float *minY, float *minZ,
float *maxX, float *maxY, float *maxZ )
{
SceneNode *sn = Modules::sceneMan().resolveNodeHandle( node );
VALIDATE_NODE( sn, "h3dGetNodeAABB", EMPTY );
Modules::sceneMan().updateNodes();
if (sn->getType() == SceneNodeTypes::Group)
((GroupNode*)sn)->calculateBBox();
if( minX != 0x0 ) *minX = sn->getBBox().min.x;
if( minY != 0x0 ) *minY = sn->getBBox().min.y;
if( minZ != 0x0 ) *minZ = sn->getBBox().min.z;
if( maxX != 0x0 ) *maxX = sn->getBBox().max.x;
if( maxY != 0x0 ) *maxY = sn->getBBox().max.y;
if( maxZ != 0x0 ) *maxZ = sn->getBBox().max.z;
if (sn->getType() == SceneNodeTypes::Group) //a little gross, but it's grosser if we don't clear it
((GroupNode*)sn)->clearBBox();
}
In egScene.h - GroupNode class declaration
Code:
void calculateBBox();
In egScene.cpp
Code:
void GroupNode::calculateBBox()
{
for (std::vector<SceneNode*>::iterator it = _children.begin(); it != _children.end(); ++it) {
if (*it) {
if ((*it)->getType() == SceneNodeTypes::Group)
((GroupNode*)*it)->calculateBBox();
_bBox.makeUnion((*it)->getBBox());
if ((*it)->getType() == SceneNodeTypes::Group) //gross
((GroupNode*)*it)->clearBBox();
}
}
}