47 template < index_t DIMENSION >
73 return 0.5 * (
min() +
max() );
94 for(
auto c :
range( DIMENSION ) )
96 if(
max()[c] < B.
min()[c] )
100 if(
min()[c] > B.
max()[c] )
127 return std::make_tuple(
false,
Box() );
133 for(
auto c :
range( DIMENSION ) )
135 minimal_max[c] = std::min( this->
max()[c], B.
max()[c] );
136 maximal_min[c] = std::max( this->
min()[c], B.
min()[c] );
140 return std::make_tuple(
true, result );
145 for(
auto c :
range( DIMENSION ) )
147 if( b[c] <
min()[c] )
151 if( b[c] >
max()[c] )
GEO::vecng< DIMENSION, double > vecn
bool contains(const vecn< DIMENSION > &b) const
std::tuple< bool, Box< DIMENSION > > bbox_intersection(const Box< DIMENSION > &B) const
bool bboxes_overlap(const Box< DIMENSION > &B) const
Box< DIMENSION > bbox_union(const Box< DIMENSION > &B) const
void add_box(const Box< DIMENSION > &b)
vecn< DIMENSION > center() const
void add_point(const vecn< DIMENSION > &p)
const vecn< DIMENSION > & max() const
const vecn< DIMENSION > & min() const
vecn< DIMENSION > diagonal() const
Classes to build GeoModel from various inputs.
double distance_to_center(const vecn< DIMENSION > &p) const
double signed_distance(const vecn< DIMENSION > &p) const