13 #ifndef eli_geom_general_bounding_box_hpp
14 #define eli_geom_general_bounding_box_hpp
16 #include "eli/code_eli.hpp"
26 template<
typename data__,
unsigned short dim__,
typename tol__=eli::util::tolerance<data__> >
113 bool add(
const point_type &p)
126 for (i=0; i<dim__; ++i)
146 return (rtn1 || rtn2);
151 for (index_type i=0; i<dim__; ++i)
153 if ( (p(i)<
pmin(i)) || (p(i)>
pmax(i)) )
162 const index_type nc(1<<dim__);
186 c[3] << bb_max.x(), bb_max.y(), bb_min.z();
187 c[4] << bb_min.x(), bb_min.y(), bb_max.z();
188 c[5] << bb_max.x(), bb_min.y(), bb_max.z();
189 c[6] << bb_min.x(), bb_max.y(), bb_max.z();
193 for (index_type i=0; i<nc; ++i)
bounding_box()
Definition: bounding_box.hpp:37
bool empty
Definition: bounding_box.hpp:205
void clear()
Definition: bounding_box.hpp:106
~bounding_box()
Definition: bounding_box.hpp:40
point_type::Index index_type
Definition: bounding_box.hpp:33
Definition: bounding_box.hpp:27
bounding_box(const bounding_box< data_type, dim__ > &bb)
Definition: bounding_box.hpp:39
unsigned short dimension_type
Definition: bounding_box.hpp:31
Eigen::Matrix< data_type, 1, dim__ > point_type
Definition: bounding_box.hpp:32
point_type get_max() const
Definition: bounding_box.hpp:104
bool intersect(const bounding_box< data_type, dim__ > &bb) const
Definition: bounding_box.hpp:160
bounding_box< data_type, dim__ > & operator=(const bounding_box< data_type, dim__ > &bb)
Definition: bounding_box.hpp:42
tol__ tolerance_type
Definition: bounding_box.hpp:34
bool operator!=(const bounding_box< data_type, dim__ > &bb)
Definition: bounding_box.hpp:75
point_type pmin
Definition: bounding_box.hpp:206
bounding_box(const point_type &p)
Definition: bounding_box.hpp:38
bool add(const point_type &p)
Definition: bounding_box.hpp:113
void set_min(const point_type &pm)
Definition: bounding_box.hpp:84
bool inside(const point_type &p) const
Definition: bounding_box.hpp:149
bool empty_set() const
Definition: bounding_box.hpp:82
bool operator==(const bounding_box< data_type, dim__ > &bb)
Definition: bounding_box.hpp:54
point_type pmax
Definition: bounding_box.hpp:206
point_type get_min() const
Definition: bounding_box.hpp:93
data__ data_type
Definition: bounding_box.hpp:30
void set_max(const point_type &pm)
Definition: bounding_box.hpp:95
static dimension_type dimension()
Definition: bounding_box.hpp:80
bool add(const bounding_box< data_type, dim__ > &bb)
Definition: bounding_box.hpp:143