// Sample the whole grid and polygonize void bloomenthal_polygonizer::polygonize_whole_grid() { for(Location x = m_MinCorner; x <= m_MaxCorner; x = x.Right()) for(Location y = x; y <= m_MaxCorner; y = y.Top()) for(Location z = y; z <= m_MaxCorner; z = z.Far()) { Corner* corner = get_cached_corner(z); if(corner->value < m_Threshold) continue; Location surface_location = z; if(SurfaceLocation(surface_location)) PolygonizeSurface(surface_location); } }