shape_doc 0.1
|
#include <cell2d.hpp>
Definition at line 56 of file cell2d.hpp.
typedef bounding_box<C, REF_OF(V) > BoundingBox |
Reimplemented from cell< C, REF_OF(V) >.
Reimplemented in cell2d_algebraic_curve< C, V >, cell2d_intersection< C, V >, cell2d_list< C, V >, cell2d_parametric_curve< C, V >, cell2d_semialgebraic_curve< C, V >, cell2d_voronoi_diagram< C, V >, and cell2d_voronoi_site2d< C, V >.
Definition at line 64 of file cell2d.hpp.
Reimplemented in cell2d_algebraic_curve< C, V >, cell2d_parametric_curve< C, V >, and cell2d_voronoi_site2d< C, V >.
Definition at line 65 of file cell2d.hpp.
Reimplemented in cell2d_algebraic_curve< C, V >, cell2d_voronoi_diagram< C, V >, and cell2d_voronoi_site2d< C, V >.
Definition at line 63 of file cell2d.hpp.
Reimplemented from cell< C, REF_OF(V) >.
Reimplemented in cell2d_algebraic_curve< C, V >, cell2d_intersection< C, V >, cell2d_list< C, V >, cell2d_parametric_curve< C, V >, cell2d_semialgebraic_curve< C, V >, cell2d_voronoi_diagram< C, V >, and cell2d_voronoi_site2d< C, V >.
Definition at line 62 of file cell2d.hpp.
Reimplemented from cell< C, REF_OF(V) >.
Reimplemented in cell2d_algebraic_curve< C, V >, cell2d_intersection< C, V >, cell2d_list< C, V >, cell2d_parametric_curve< C, V >, cell2d_voronoi_diagram< C, V >, and cell2d_voronoi_site2d< C, V >.
Definition at line 59 of file cell2d.hpp.
cell2d | ( | void | ) |
Definition at line 217 of file cell2d.hpp.
{ }
cell2d | ( | const BoundingBox & | bx | ) | [inline] |
Definition at line 68 of file cell2d.hpp.
: Cell(bx) {}
cell2d | ( | double | xmin, |
double | xmax | ||
) | [inline] |
Definition at line 69 of file cell2d.hpp.
cell2d | ( | double | xmin, |
double | xmax, | ||
double | ymin, | ||
double | ymax | ||
) | [inline] |
~cell2d | ( | void | ) | [virtual] |
Definition at line 219 of file cell2d.hpp.
{}
BoundingBox boundingBox | ( | ) | const [inline, inherited] |
Definition at line 88 of file cell.hpp.
{ return (BoundingBox)*this; }
virtual Point center | ( | void | ) | const [inline, virtual, inherited] |
Definition at line 281 of file cell2d.hpp.
References mmx::shape::check_overlap(), and SELF.
{ int i; bool flag; //copy horizontally b->e_neighbors= this->e_neighbors ; foreach(SELF* cl,b->e_neighbors) { i= cl->w_neighbors.search(this); cl->w_neighbors[i]= b; } a->w_neighbors= this->w_neighbors ; foreach(SELF* cl,a->w_neighbors) { i= cl->e_neighbors.search(this); cl->e_neighbors[i]= a; } //update vertically foreach(SELF* cl,this->s_neighbors) { flag=false; if ( check_overlap(cl,a,0)) { //assert( cl->ymax()== a->ymin() ); a->s_neighbors<< cl; i= cl->n_neighbors.search(this); cl->n_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) ) { //assert( cl->ymax()== b->ymin() ); b->s_neighbors<< cl; if (!flag) { i= cl->n_neighbors.search(this); cl->n_neighbors[i]= b; } else cl->n_neighbors << b; } } foreach(SELF* cl,this->n_neighbors) { flag=false; if ( check_overlap(cl,a,0)) { a->n_neighbors<< cl; i= cl->s_neighbors.search(this); cl->s_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) ) { b->n_neighbors<< cl; if (!flag) { i= cl->s_neighbors.search(this); cl->s_neighbors[i]= b; } else cl->s_neighbors << b; } } }
Definition at line 346 of file cell2d.hpp.
References mmx::shape::check_overlap(), and SELF.
{ int i; bool flag; //copy vertically a->s_neighbors= this->s_neighbors ; foreach(SELF* cl,a->s_neighbors) { i= cl->n_neighbors.search(this); cl->n_neighbors[i]= a; } b->n_neighbors= this->n_neighbors ; foreach(SELF* cl,b->n_neighbors) { i= cl->s_neighbors.search(this); cl->s_neighbors[i]= b; } //update horizontally foreach(SELF* cl,this->w_neighbors) { flag=false; if ( check_overlap(cl,a,1)) { //assert( cl->xmax()== a->xmin() ); a->w_neighbors<< cl; i= cl->e_neighbors.search(this); cl->e_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,1) ) { //assert( cl->xmax()== b->xmin() ); b->w_neighbors<< cl; if (!flag) { i= cl->e_neighbors.search(this); cl->e_neighbors[i]= b; } else cl->e_neighbors << b; } } foreach(SELF* cl,this->e_neighbors) { flag=false; if ( check_overlap(cl,a,1)) { a->e_neighbors<< cl; i= cl->w_neighbors.search(this); cl->w_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,1) ) { b->e_neighbors<< cl; if (!flag) { i= cl->w_neighbors.search(this); cl->w_neighbors[i]= b; } else cl->w_neighbors << b; } } }
bool contains | ( | double | x, |
bool | strict = false |
||
) | [inherited] |
bool contains | ( | double | x, |
double | y, | ||
bool | strict = false |
||
) | [inherited] |
bool contains | ( | double | x, |
double | y, | ||
double | z, | ||
bool | strict = false |
||
) | [inherited] |
void disconnect | ( | ) | [inline] |
Definition at line 422 of file cell2d.hpp.
{ this->e_neighbors.clear(); this->w_neighbors.clear(); this->n_neighbors.clear(); this->s_neighbors.clear(); }
virtual bool insert_regular | ( | Topology * | ) | [pure virtual, inherited] |
Implemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
virtual bool insert_singular | ( | Topology * | ) | [pure virtual, inherited] |
Implemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
bounding_box<C,REF_OF(V) >* intersect | ( | const bounding_box< C, REF_OF(V) > & | other | ) | [inherited] |
void intersected | ( | bounding_box< C, REF_OF(V) > * | other | ) | [inherited] |
virtual Seq<Point *> intersections | ( | ) | const [inline, virtual] |
Reimplemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
Definition at line 96 of file cell2d.hpp.
Referenced by voronoi2d< C, V >::insert_regular(), voronoi2d< C, V >::run(), semialgebraic2d< C, V >::run(), arrangement2d< C, V >::run(), and cell2d< C, REF_OF(V) >::side().
{ Seq<Point *> r; r<< this->s_intersections; r<< this->e_intersections; r<< this->n_intersections.reversed(); r<< this->w_intersections.reversed(); return ( r ); }
virtual Seq<Point *> intersections | ( | int | i | ) | const [inline, virtual] |
Reimplemented in cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
Definition at line 105 of file cell2d.hpp.
{ switch(i) { case 0: return s_intersections; case 1: return e_intersections; case 2: return n_intersections.reversed(); case 3: return w_intersections.reversed(); default: return (Seq<Point *>()); } }
bool intersects | ( | bounding_box< C, REF_OF(V) > * | other, |
bool | strict = true |
||
) | [inherited] |
bool is0D | ( | void | ) | const [inline, inherited] |
Definition at line 80 of file bounding_box.hpp.
{ return ((m_xmin == m_xmax) && (m_ymin == m_ymax) && (m_zmin == m_zmax)) ; }
bool is1D | ( | void | ) | const [inline, inherited] |
Definition at line 81 of file bounding_box.hpp.
{ return ((m_xmin != m_xmax) && (m_ymin == m_ymax) && (m_zmin == m_zmax)) ; }
bool is2D | ( | void | ) | const [inline, inherited] |
Definition at line 82 of file bounding_box.hpp.
{ return ((m_xmin != m_xmax) && (m_ymin != m_ymax) && (m_zmin == m_zmax)) ; }
bool is3d | ( | void | ) | const [inline, inherited] |
Definition at line 83 of file bounding_box.hpp.
{ return ((m_xmin != m_xmax) && (m_ymin != m_ymax) && (m_zmin != m_zmax)) ; }
virtual bool is_active | ( | void | ) | [pure virtual, inherited] |
Implemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
bool is_border | ( | void | ) | const [inline] |
Definition at line 121 of file cell2d.hpp.
Referenced by voronoi2d< C, V >::run(), topology2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
{ return ( this->s_neighbors.size()==0 || this->e_neighbors.size()==0 || this->n_neighbors.size()==0 || this->w_neighbors.size()==0 ); }
bool is_corner | ( | void | ) | const |
Definition at line 431 of file cell2d.hpp.
Referenced by voronoi2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
{ if (this->s_neighbors.size()==0 && this->e_neighbors.size()==0 ) return true; else if (this->e_neighbors.size()==0 && this->n_neighbors.size()==0 ) return true; else if (this->n_neighbors.size()==0 && this->w_neighbors.size()==0 ) return true; else if (this->w_neighbors.size()==0 && this->s_neighbors.size()==0 ) return true; return false; }
virtual bool is_intersected | ( | void | ) | [pure virtual, inherited] |
Implemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
virtual bool is_regular | ( | void | ) | [pure virtual, inherited] |
Implemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
void join0 | ( | cell2d< C, V > * | b | ) | [inline] |
Definition at line 267 of file cell2d.hpp.
{ this->e_neighbors << b; b->w_neighbors << this; }
void join1 | ( | cell2d< C, V > * | b | ) | [inline] |
Definition at line 274 of file cell2d.hpp.
{ b->s_neighbors << this; this->n_neighbors << b; }
virtual unsigned nb_intersect | ( | void | ) | const [inline, virtual] |
Reimplemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
Definition at line 89 of file cell2d.hpp.
Referenced by semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
{ return (this->n_intersections.size()+ this->s_intersections.size()+ this->e_intersections.size()+ this->w_intersections.size() ); }
Reimplemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
Definition at line 175 of file cell2d.hpp.
{ foreach( cell2d *c, this->s_neighbors ) if ( c->n_intersections.member(p) ) { return c; } foreach( cell2d *c, this->e_neighbors ) if ( c->w_intersections.member(p) ) { return c; } foreach( cell2d *c, this->n_neighbors ) if ( c->s_intersections.member(p) ) { return c; } foreach( cell2d *c, this->w_neighbors ) if ( c->e_intersections.member(p) ) { return c; } // Point p on boundary. //std::cout<<"... Point ("<<p->x()<<","<<p->y()<<") not found on neighbors of "<< this<<"("<<this->neighbors().size() <<")"<<std::endl; return NULL; }
virtual Seq<cell2d *> neighbors | ( | ) | [inline, virtual] |
Definition at line 162 of file cell2d.hpp.
Referenced by voronoi2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
{ Seq<cell2d *> r; r<< this->s_neighbors; r<< this->e_neighbors; r<< this->n_neighbors; r<< this->w_neighbors; return ( r ); }
double operator() | ( | unsigned | v, |
unsigned | s | ||
) | const [inherited] |
double& operator() | ( | unsigned | v, |
unsigned | s | ||
) | [inherited] |
bounding_box<C,REF_OF(V) >* operator* | ( | const bounding_box< C, REF_OF(V) > & | other | ) | [inline, inherited] |
Definition at line 103 of file bounding_box.hpp.
{ return intersect(other) ; }
bounding_box<C,REF_OF(V) >* operator+ | ( | const bounding_box< C, REF_OF(V) > & | other | ) | [inline, inherited] |
Definition at line 104 of file bounding_box.hpp.
{ return unite(other) ; }
Implemented in cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
void set_xmax | ( | double | x | ) | [inline, inherited] |
Definition at line 74 of file bounding_box.hpp.
{ this->m_xmax = x ; }
void set_xmin | ( | double | x | ) | [inline, inherited] |
Definition at line 73 of file bounding_box.hpp.
{ this->m_xmin = x ; }
void set_ymax | ( | double | y | ) | [inline, inherited] |
Definition at line 76 of file bounding_box.hpp.
{ this->m_ymax = y ; }
void set_ymin | ( | double | y | ) | [inline, inherited] |
Definition at line 75 of file bounding_box.hpp.
{ this->m_ymin = y ; }
void set_zmax | ( | double | z | ) | [inline, inherited] |
Definition at line 78 of file bounding_box.hpp.
{ this->m_zmax = z ; }
void set_zmin | ( | double | z | ) | [inline, inherited] |
Definition at line 77 of file bounding_box.hpp.
{ this->m_zmin = z ; }
int side | ( | Point * | p | ) | [inline] |
Definition at line 140 of file cell2d.hpp.
{ Seq<Point*> all; int s,i,a; s = s_intersections.size(); all = this->intersections(); a = all.size(); i = all.search(p); if (i==-1) return (-1); else return ( i<s ? 0 : ( i<s+(int)e_intersections.size() ? 1 : ( i<a-(int)w_intersections.size() ? 2 : 3 ))); }
double size | ( | void | ) | [inherited] |
void split_position | ( | int & | v, |
double & | t | ||
) | [virtual] |
Implements cell< C, REF_OF(V) >.
Reimplemented in cell2d_intersection< C, V >, cell2d_list< C, V >, and cell2d_voronoi_diagram< C, V >.
Definition at line 205 of file cell2d.hpp.
virtual Point* starting_point | ( | int | sgn | ) | [pure virtual] |
virtual void subdivide | ( | cell< C, REF_OF(V) > *& | left, |
cell< C, REF_OF(V) > *& | right, | ||
int | v, | ||
double | s | ||
) | [pure virtual, inherited] |
virtual int subdivide | ( | cell< C, REF_OF(V) > *& | left, |
cell< C, REF_OF(V) > *& | right | ||
) | [virtual, inherited] |
bounding_box<C,REF_OF(V) >* unite | ( | bounding_box< C, REF_OF(V) > * | other | ) | [inherited] |
void united | ( | bounding_box< C, REF_OF(V) > * | other | ) | [inherited] |
bool unites | ( | bounding_box< C, REF_OF(V) > * | other, |
bool | strict = true |
||
) | [inherited] |
double xmax | ( | void | ) | [inline, inherited] |
Definition at line 56 of file bounding_box.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary().
{ return m_xmax ; }
double xmax | ( | void | ) | const [inline, inherited] |
Definition at line 63 of file bounding_box.hpp.
{ return m_xmax ; }
double xmin | ( | void | ) | [inline, inherited] |
Definition at line 55 of file bounding_box.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary().
{ return m_xmin ; }
double xmin | ( | void | ) | const [inline, inherited] |
Definition at line 62 of file bounding_box.hpp.
{ return m_xmin ; }
double xsize | ( | void | ) | const [inline, inherited] |
Definition at line 69 of file bounding_box.hpp.
double ymax | ( | void | ) | [inline, inherited] |
Definition at line 58 of file bounding_box.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary().
{ return m_ymax ; }
double ymax | ( | void | ) | const [inline, inherited] |
Definition at line 65 of file bounding_box.hpp.
{ return m_ymax ; }
double ymin | ( | void | ) | const [inline, inherited] |
Definition at line 64 of file bounding_box.hpp.
{ return m_ymin ; }
double ymin | ( | void | ) | [inline, inherited] |
Definition at line 57 of file bounding_box.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary().
{ return m_ymin ; }
double ysize | ( | void | ) | const [inline, inherited] |
Definition at line 70 of file bounding_box.hpp.
double zmax | ( | void | ) | [inline, inherited] |
Definition at line 60 of file bounding_box.hpp.
{ return m_zmax ; }
double zmax | ( | void | ) | const [inline, inherited] |
Definition at line 67 of file bounding_box.hpp.
{ return m_zmax ; }
double zmin | ( | void | ) | [inline, inherited] |
Definition at line 59 of file bounding_box.hpp.
{ return m_zmin ; }
double zmin | ( | void | ) | const [inline, inherited] |
Definition at line 66 of file bounding_box.hpp.
{ return m_zmin ; }
double zsize | ( | void | ) | const [inline, inherited] |
Definition at line 71 of file bounding_box.hpp.
Seq<Point *> e_intersections |
Definition at line 130 of file cell2d.hpp.
Referenced by cell2d< C, REF_OF(V) >::intersections(), cell2d< C, REF_OF(V) >::nb_intersect(), cell2d< C, REF_OF(V) >::neighbor(), and cell2d< C, REF_OF(V) >::side().
Seq<cell2d *> e_neighbors |
Definition at line 171 of file cell2d.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary(), cell2d< C, REF_OF(V) >::is_border(), cell2d< C, REF_OF(V) >::neighbor(), cell2d< C, REF_OF(V) >::neighbors(), voronoi2d< C, V >::run(), topology2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
Definition at line 138 of file cell2d.hpp.
Referenced by voronoi2d< C, V >::run(), and topology2d< C, V >::run().
Seq<Point *> m_singular |
Definition at line 133 of file cell2d.hpp.
double m_xmax [protected, inherited] |
Definition at line 107 of file bounding_box.hpp.
double m_xmin [protected, inherited] |
Definition at line 107 of file bounding_box.hpp.
double m_ymax [protected, inherited] |
Definition at line 108 of file bounding_box.hpp.
double m_ymin [protected, inherited] |
Definition at line 108 of file bounding_box.hpp.
double m_zmax [protected, inherited] |
Definition at line 109 of file bounding_box.hpp.
double m_zmin [protected, inherited] |
Definition at line 109 of file bounding_box.hpp.
Seq<Point *> n_intersections |
Definition at line 131 of file cell2d.hpp.
Referenced by cell2d< C, REF_OF(V) >::intersections(), cell2d< C, REF_OF(V) >::nb_intersect(), and cell2d< C, REF_OF(V) >::neighbor().
Seq<cell2d *> n_neighbors |
Definition at line 172 of file cell2d.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary(), cell2d< C, REF_OF(V) >::is_border(), cell2d< C, REF_OF(V) >::neighbor(), cell2d< C, REF_OF(V) >::neighbors(), voronoi2d< C, V >::run(), topology2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
Seq<Point *> s_intersections |
Definition at line 129 of file cell2d.hpp.
Referenced by cell2d< C, REF_OF(V) >::intersections(), cell2d< C, REF_OF(V) >::nb_intersect(), cell2d< C, REF_OF(V) >::neighbor(), and cell2d< C, REF_OF(V) >::side().
Seq<cell2d *> s_neighbors |
Definition at line 170 of file cell2d.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary(), cell2d< C, REF_OF(V) >::is_border(), cell2d< C, REF_OF(V) >::neighbor(), cell2d< C, REF_OF(V) >::neighbors(), voronoi2d< C, V >::run(), topology2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().
Seq<Point *> w_intersections |
Definition at line 132 of file cell2d.hpp.
Referenced by cell2d< C, REF_OF(V) >::intersections(), cell2d< C, REF_OF(V) >::nb_intersect(), cell2d< C, REF_OF(V) >::neighbor(), and cell2d< C, REF_OF(V) >::side().
Seq<cell2d *> w_neighbors |
Definition at line 173 of file cell2d.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary(), cell2d< C, REF_OF(V) >::is_border(), cell2d< C, REF_OF(V) >::neighbor(), cell2d< C, REF_OF(V) >::neighbors(), voronoi2d< C, V >::run(), topology2d< C, V >::run(), semialgebraic2d< C, V >::run(), and arrangement2d< C, V >::run().