private void GetNodeBounds_R(ref idBounds bounds, CollisionModelNode node)
{
while(true)
{
foreach(CollisionModelPolygon poly in node.Polygons)
{
bounds.AddPoint(poly.Bounds.Min);
bounds.AddPoint(poly.Bounds.Max);
}
foreach(CollisionModelBrush brush in node.Brushes)
{
bounds.AddPoint(brush.Bounds.Min);
bounds.AddPoint(brush.Bounds.Max);
}
if(node.PlaneType == -1)
{
break;
}
GetNodeBounds_R(ref bounds, node.Children[1]);
node = node.Children[0];
}
}