shape_doc 0.1
|
#include <bounding_box.hpp>
Definition at line 45 of file bounding_box.hpp.
bounding_box | ( | void | ) |
bounding_box | ( | double | xmin, |
double | xmax | ||
) |
bounding_box | ( | double | xmin, |
double | xmax, | ||
double | ymin, | ||
double | ymax | ||
) |
bounding_box | ( | double | xmin, |
double | xmax, | ||
double | ymin, | ||
double | ymax, | ||
double | zmin, | ||
double | zmax | ||
) |
bounding_box | ( | const bounding_box< C, V > & | bx | ) |
~bounding_box | ( | void | ) | [inline] |
Definition at line 53 of file bounding_box.hpp.
{};
bool contains | ( | double | x, |
bool | strict = false |
||
) |
bool contains | ( | double | x, |
double | y, | ||
bool | strict = false |
||
) |
bool contains | ( | double | x, |
double | y, | ||
double | z, | ||
bool | strict = false |
||
) |
bounding_box< C, V > * intersect | ( | const bounding_box< C, V > & | other | ) |
Definition at line 318 of file bounding_box.hpp.
References mmx::shape::mmxmax(), mmx::shape::mmxmin(), and SELF.
Referenced by bounding_box< double, V >::operator*().
{ SELF * cell = new SELF ; cell->set_xmin(mmxmax(this->xmin(), other.xmin())) ; cell->set_xmax(mmxmin(this->xmax(), other.xmax())) ; cell->set_ymin(mmxmax(this->ymin(), other.ymin())) ; cell->set_ymax(mmxmin(this->ymax(), other.ymax())) ; cell->set_zmin(mmxmax(this->zmin(), other.zmin())) ; cell->set_zmax(mmxmin(this->zmax(), other.zmax())) ; return cell ; }
void intersected | ( | bounding_box< C, V > * | other | ) |
Definition at line 298 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
bool intersects | ( | bounding_box< C, V > * | other, |
bool | strict = true |
||
) |
Definition at line 238 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
{ if(this->is0D()) return (this->xmin() == other->xmin()) ; else if(this->is1D()) if(strict) return ((mmxmax(this->xmin(), other->xmin()) < mmxmin(this->xmax(), other->xmax()))) ; else return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax()))) ; else if(this->is2D()) if(strict) return ((mmxmax(this->xmin(), other->xmin()) < mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) < mmxmin(this->ymax(), other->ymax()))) ; else return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax()))) ; else if(this->is3d()) { if(strict) return ((mmxmax(this->xmin(), other->xmin()) < mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) < mmxmin(this->ymax(), other->ymax())) && (mmxmax(this->zmin(), other->zmin()) < mmxmin(this->zmax(), other->zmax()))) ; else return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax())) && (mmxmax(this->zmin(), other->zmin()) <= mmxmin(this->zmax(), other->zmax()))) ; } return false ; }
bool is0D | ( | void | ) | const [inline] |
bool is1D | ( | void | ) | const [inline] |
bool is2D | ( | void | ) | const [inline] |
bool is3d | ( | void | ) | const [inline] |
double operator() | ( | unsigned | v, |
unsigned | s | ||
) | const |
double & operator() | ( | unsigned | v, |
unsigned | s | ||
) |
bounding_box<C,V>* operator* | ( | const bounding_box< C, V > & | other | ) | [inline] |
Definition at line 103 of file bounding_box.hpp.
{ return intersect(other) ; }
bounding_box<C,V>* operator+ | ( | const bounding_box< C, V > & | other | ) | [inline] |
Definition at line 104 of file bounding_box.hpp.
{ return unite(other) ; }
void set_xmax | ( | double | x | ) | [inline] |
Definition at line 74 of file bounding_box.hpp.
{ this->m_xmax = x ; }
void set_xmin | ( | double | x | ) | [inline] |
Definition at line 73 of file bounding_box.hpp.
{ this->m_xmin = x ; }
void set_ymax | ( | double | y | ) | [inline] |
Definition at line 76 of file bounding_box.hpp.
{ this->m_ymax = y ; }
void set_ymin | ( | double | y | ) | [inline] |
Definition at line 75 of file bounding_box.hpp.
{ this->m_ymin = y ; }
void set_zmax | ( | double | z | ) | [inline] |
Definition at line 78 of file bounding_box.hpp.
{ this->m_zmax = z ; }
void set_zmin | ( | double | z | ) | [inline] |
Definition at line 77 of file bounding_box.hpp.
{ this->m_zmin = z ; }
double size | ( | void | ) |
Definition at line 199 of file bounding_box.hpp.
References mmx::max().
Referenced by voronoi2d< C, V >::run(), topology2d< C, V >::run(), mesher3d_shape< C, V >::run(), and mesher3d_curve_algebraic< C, V >::run().
bounding_box< C, V > * unite | ( | bounding_box< C, V > * | other | ) |
Definition at line 330 of file bounding_box.hpp.
References mmx::shape::mmxmax(), mmx::shape::mmxmin(), and SELF.
Referenced by bounding_box< double, V >::operator+().
{ SELF * cell = new SELF ; cell->set_xmin(mmxmin(this->xmin(), other->xmin())) ; cell->set_xmax(mmxmax(this->xmax(), other->xmax())) ; cell->set_ymin(mmxmin(this->ymin(), other->ymin())) ; cell->set_ymax(mmxmax(this->ymax(), other->ymax())) ; cell->set_zmin(mmxmin(this->zmin(), other->zmin())) ; cell->set_zmax(mmxmax(this->zmax(), other->zmax())) ; return cell ; }
void united | ( | bounding_box< C, V > * | other | ) |
Definition at line 308 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
bool unites | ( | bounding_box< C, V > * | other, |
bool | strict = true |
||
) |
Definition at line 268 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
{ if(this->is0D()) return (this->xmin() == other->xmin()) ; else if(this->is1D()) { if(strict) return ((mmxmin(this->xmin(), other->xmin()) < mmxmax(this->xmax(), other->xmax()))) ; else return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax()))) ; } else if(this->is2D()) { if(strict) return ((mmxmin(this->xmin(), other->xmin()) < mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) < mmxmax(this->ymax(), other->ymax()))) ; else return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax()))) ; } else if(this->is3d()) { if(strict) return ((mmxmin(this->xmin(), other->xmin()) < mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) < mmxmax(this->ymax(), other->ymax())) && (mmxmin(this->zmin(), other->zmin()) < mmxmax(this->zmax(), other->zmax()))) ; else return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax())) && (mmxmin(this->zmin(), other->zmin()) <= mmxmax(this->zmax(), other->zmax()))) ; } return false ; }
double xmax | ( | void | ) | const [inline] |
Definition at line 63 of file bounding_box.hpp.
{ return m_xmax ; }
double xmax | ( | void | ) | [inline] |
Definition at line 56 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_xmax ; }
double xmin | ( | void | ) | const [inline] |
Definition at line 62 of file bounding_box.hpp.
{ return m_xmin ; }
double xmin | ( | void | ) | [inline] |
Definition at line 55 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), mmx::shape::operator<<(), mmx::operator<<(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_xmin ; }
double xsize | ( | void | ) | const [inline] |
Definition at line 69 of file bounding_box.hpp.
double ymax | ( | void | ) | const [inline] |
Definition at line 65 of file bounding_box.hpp.
{ return m_ymax ; }
double ymax | ( | void | ) | [inline] |
Definition at line 58 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_ymax ; }
double ymin | ( | void | ) | const [inline] |
Definition at line 64 of file bounding_box.hpp.
{ return m_ymin ; }
double ymin | ( | void | ) | [inline] |
Definition at line 57 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_ymin ; }
double ysize | ( | void | ) | const [inline] |
Definition at line 70 of file bounding_box.hpp.
double zmax | ( | void | ) | const [inline] |
Definition at line 67 of file bounding_box.hpp.
{ return m_zmax ; }
double zmax | ( | void | ) | [inline] |
Definition at line 60 of file bounding_box.hpp.
Referenced by cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_zmax ; }
double zmin | ( | void | ) | [inline] |
Definition at line 59 of file bounding_box.hpp.
Referenced by cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_zmin ; }
double zmin | ( | void | ) | const [inline] |
Definition at line 66 of file bounding_box.hpp.
{ return m_zmin ; }
double zsize | ( | void | ) | const [inline] |
Definition at line 71 of file bounding_box.hpp.
double m_xmax [protected] |
Definition at line 107 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_xmax(), bounding_box< double, V >::xmax(), and bounding_box< double, V >::xsize().
double m_xmin [protected] |
Definition at line 107 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_xmin(), bounding_box< double, V >::xmin(), and bounding_box< double, V >::xsize().
double m_ymax [protected] |
Definition at line 108 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_ymax(), bounding_box< double, V >::ymax(), and bounding_box< double, V >::ysize().
double m_ymin [protected] |
Definition at line 108 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_ymin(), bounding_box< double, V >::ymin(), and bounding_box< double, V >::ysize().
double m_zmax [protected] |
Definition at line 109 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_zmax(), bounding_box< double, V >::zmax(), and bounding_box< double, V >::zsize().
double m_zmin [protected] |
Definition at line 109 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_zmin(), bounding_box< double, V >::zmin(), and bounding_box< double, V >::zsize().