21 for(
size_t i = 0; i < points.size(); i++ )
31 bool contains_point(
const double* point,
const double tol = 0.0 )
const;
35 void update(
const double* coords );
63 double distance(
const double* from_point )
const;
83 for(
int i = 0; i < 6; i++ )
89 if( point[0] <
bMin[0] - tol || point[0] >
bMax[0] + tol || point[1] <
bMin[1] - tol || point[1] >
bMax[1] + tol ||
90 point[2] <
bMin[2] - tol || point[2] >
bMax[2] + tol )
127 bMin[0] = std::min(
bMin[0], coords[0] );
128 bMin[1] = std::min(
bMin[1], coords[1] );
129 bMin[2] = std::min(
bMin[2], coords[2] );
141 bMax[0] = std::max(
bMax[0], coords[0] );
142 bMax[1] = std::max(
bMax[1], coords[1] );
143 bMax[2] = std::max(
bMax[2], coords[2] );
160 out << ( std::string )
"Min: ";
162 out << ( std::string )
", Max: ";
169 Range tmp_range( ent, ent );
170 return update(
iface, tmp_range, spherical, radius );
175 double dist_sq = 0.0;
176 for(
int i = 0; i < 3; ++i )
178 if( from_point[i] <
bMin[i] )
179 dist_sq += (
bMin[i] - from_point[i] ) * (
bMin[i] - from_point[i] );
180 else if( from_point[i] >
bMax[i] )
181 dist_sq += (
bMax[i] - from_point[i] ) * (
bMax[i] - from_point[i] );
189 return sqrt( dist_sq );
194 if( DBL_MAX ==
bMax[0] || DBL_MAX ==
bMax[1] || DBL_MAX ==
bMax[2] || DBL_MAX ==
bMin[0] || DBL_MAX ==
bMin[1] ||
202 if( DBL_MAX ==
bMax[0] || DBL_MAX ==
bMax[1] || DBL_MAX ==
bMax[2] || DBL_MAX ==
bMin[0] || DBL_MAX ==
bMin[1] ||
205 return (
bMax -
bMin ).length_squared();