268 {
269 typedef typename TDomain::Point
Point;
270
272 points[0] =
transform ( aInput.lowerBound() );
273 points[1] =
transform ( aInput.upperBound() );
274 points[2] =
transform (
Point ( aInput.upperBound()[0], aInput.lowerBound()[1], aInput.lowerBound()[2] ) );
275 points[3] =
transform (
Point ( aInput.lowerBound()[0], aInput.upperBound()[1], aInput.upperBound()[2] ) );
276 points[4] =
transform (
Point ( aInput.upperBound()[0], aInput.lowerBound()[1], aInput.upperBound()[2] ) );
277 points[5] =
transform (
Point ( aInput.lowerBound()[0], aInput.upperBound()[1], aInput.lowerBound()[2] ) );
278 points[6] =
transform (
Point ( aInput.lowerBound()[0], aInput.lowerBound()[1], aInput.upperBound()[2] ) );
279 points[7] =
transform (
Point ( aInput.upperBound()[0], aInput.upperBound()[1], aInput.lowerBound()[2] ) );
280
281 Point t_min ( INT_MAX, INT_MAX, INT_MAX ), t_max ( INT_MIN, INT_MIN, INT_MIN );
282 for ( int i = 0; i < 8; i++ )
283 {
284 if ( points[i][0] < t_min[0] )
285 t_min[0] = points[i][0];
286 if ( points[i][1] < t_min[1] )
287 t_min[1] = points[i][1];
288 if ( points[i][2] < t_min[2] )
289 t_min[2] = points[i][2];
290
291 if ( points[i][0] > t_max[0] )
292 t_max[0] = points[i][0];
293 if ( points[i][1] > t_max[1] )
294 t_max[1] = points[i][1];
295 if ( points[i][2] > t_max[2] )
296 t_max[2] = points[i][2];
297 }
299 bounds.first = t_min;
300 bounds.second = t_max;
301 return bounds;
302 }
std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds