41 #define GUI_RTREE_QUAL RTree<GUIGlObject*, GUIGlObject, float, 2, GUIVisualizationSettings>
46 inline float GUI_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) {
48 const float extent0 = a_rect->m_max[0] - a_rect->m_min[0];
49 const float extent1 = a_rect->m_max[1] - a_rect->m_min[1];
50 return .78539816f * (extent0 * extent0 + extent1 * extent1);
54 inline GUI_RTREE_QUAL::Rect GUI_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) {
55 ASSERT(a_rectA && a_rectB);
57 newRect.m_min[0] =
rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]);
58 newRect.m_max[0] =
rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]);
59 newRect.m_min[1] =
rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]);
60 newRect.m_max[1] =
rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]);