/** Fully rebuilds the bounding box for this set of geometry from its surfaces. */ void CWorldGeometry::BuildBoundBox() { m_boundbox.ResetBounds(); vector<CWorldGeometrySurface>::iterator itr = m_surfaces.begin(); while(itr != m_surfaces.end()) { AddToBoundBox(*itr); } }
/** Fully rebuilds the bounding box for this set of geometry from its surfaces. */ void CWorldGeometry::BuildBoundBox() { m_boundbox.ResetBounds(); vector<CWorldGeometrySurface>::iterator itr = m_surfaces.begin(); while(itr != m_surfaces.end()) { AddToBoundBox(*itr); itr++; } CVector threshold = CVector(10, 10, 10); m_boundbox.m_min -= threshold; m_boundbox.m_max += threshold; }
void CWorldGeometry::AddSurface(CWorldGeometrySurface& surface) { AddToBoundBox(surface); m_surfaces.push_back(surface); }