|
shape_doc 0.1
|
#include <cell2d_intersection.hpp>
Definition at line 36 of file cell2d_intersection.hpp.
| typedef cell<C,V>::BoundingBox BoundingBox |
Reimplemented from cell2d_list< C, V >.
Definition at line 39 of file cell2d_intersection.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 cell2d_list< C, V >.
Definition at line 40 of file cell2d_intersection.hpp.
Reimplemented from cell2d_list< C, V >.
Definition at line 41 of file cell2d_intersection.hpp.
| cell2d_intersection | ( | void | ) |
Definition at line 80 of file cell2d_intersection.hpp.
{}
| cell2d_intersection | ( | double | xmin, |
| double | xmax | ||
| ) |
| cell2d_intersection | ( | double | xmin, |
| double | xmax, | ||
| double | ymin, | ||
| double | ymax | ||
| ) |
| cell2d_intersection | ( | double | xmin, |
| double | xmax, | ||
| double | ymin, | ||
| double | ymax, | ||
| bool | itr | ||
| ) |
| cell2d_intersection | ( | const BoundingBox & | bx | ) |
Definition at line 89 of file cell2d_intersection.hpp.
: cell2d_list<C,V>(bx) {};
| ~cell2d_intersection | ( | void | ) | [virtual] |
Definition at line 92 of file cell2d_intersection.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] |
| int count | ( | void | ) | [inline, inherited] |
Definition at line 85 of file cell2d_list.hpp.
References cell2d_list< C, V >::m_objects.
{ return m_objects.size() ; }
| void disconnect | ( | ) | [inline, inherited] |
Definition at line 422 of file cell2d.hpp.
{
this->e_neighbors.clear();
this->w_neighbors.clear();
this->n_neighbors.clear();
this->s_neighbors.clear();
}
| bool insert_regular | ( | Topology * | s | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 125 of file cell2d_intersection.hpp.
References cell< C, V >::insert_regular(), and topology< C, V >::insert_singular().
{
foreach(Cell* m, this->m_objects) m->insert_regular(s);
if (this->m_singular.size() > 0)
foreach(Point* p, this->m_singular) s->insert_singular(p);
return true;
}
| bool insert_singular | ( | Topology * | s | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 135 of file cell2d_intersection.hpp.
References cell< C, V >::insert_singular().
| 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 | ( | int | i | ) | const [inline, virtual, inherited] |
Reimplemented from cell2d< C, V >.
Definition at line 71 of file cell2d_list.hpp.
References Cell2dAlgebraicCurve, and cell2d_list< C, V >::m_objects.
{
Seq<Point*> l;
Cell2dAlgebraicCurve* c;
foreach(Cell*m, this->m_objects)
{
c = dynamic_cast<Cell2dAlgebraicCurve*>(m);
l<< c->intersections(i);
}
return l;
}
| Seq< typename mmx::shape::cell2d< C, V >::Point * > intersections | ( | ) | const [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 413 of file cell2d_intersection.hpp.
References Cell2d.
{
Seq<Point *> s,e,n,w,r;
Cell2d* cl;
foreach (Cell* m, this->m_objects)
{
cl = dynamic_cast<Cell2d*>(m);
s<< cl->s_intersections;
e<< cl->e_intersections;
n<< cl->n_intersections;
w<< cl->w_intersections;
}
s.sort(this->coord<0>);
e.sort(this->coord<1>);
n.sort(this->coord<0>);
w.sort(this->coord<1>);
r<<s;
r<<e;
r<<n.reversed();
r<<w.reversed();
return ( r );
}
| 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)) ; }
| bool is_active | ( | void | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 211 of file cell2d_intersection.hpp.
{
//return ( cell2d_list<C,V>::is_active() );
if ( !cell2d_list<C,V>::is_active() )
return false;
if( this->is_intersected() ) return true;
if( ! this->is_regular() ) return true;
if( this->is_touching() )//is touching the set?
return true;
else
return false;
}
| bool is_border | ( | void | ) | const [inline, inherited] |
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 [inherited] |
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;
}
| bool is_intersected | ( | void | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 110 of file cell2d_intersection.hpp.
{
if(this->m_objects.size() >1 && !this->m_intersected) {
for(unsigned i=0; i<this->m_objects.size();i++)
for(unsigned j=i+1; j<this->m_objects.size(); j++)
Intersection2dFactory::instance()->compute(this->m_singular, (Shape*)this->m_objects[i], (Shape*)this->m_objects[j], (BoundingBox)*this);
this->m_intersected = true;
}
if (this->m_singular.size() > 0) return true;
return false;
}
| bool is_regular | ( | void | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 98 of file cell2d_intersection.hpp.
{
foreach (Cell* m, this->m_objects)
if(!m-> is_regular()) return false;
if ( is_intersected() )
return ( (this->m_singular.size()<2) &&
(this->nb_intersect()<5) );
else
return (this->nb_intersect()<3) ;
}
| bool is_touching | ( | void | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 229 of file cell2d_intersection.hpp.
References Cell2dAlgebraicCurve.
{
int c0(0),c1(0),c2(0),c3(0), cnt=this->count();//cnt: number of eqs.
foreach (Cell* m, this->m_objects) {
Cell2dAlgebraicCurve* c= dynamic_cast<Cell2dAlgebraicCurve*>(m);
const int * sz = c->m_polynomial.rep().szs();
const int * st = c->m_polynomial.rep().str();
if (c->m_polynomial[0] >0) c0++;
if (c->m_polynomial[(sz[0]-1)*st[0]] >0) c1++;
if (c->m_polynomial[sz[0]*sz[1]-1]>0) c2++;
if (c->m_polynomial[(sz[1]-1)*st[1]] >0) c3++;
}
return ( (c0==cnt) || (c1==cnt) || (c2==cnt) || (c3==cnt) );
}
| void join0 | ( | cell2d< C, V > * | b | ) | [inline, inherited] |
Definition at line 267 of file cell2d.hpp.
{
this->e_neighbors << b;
b->w_neighbors << this;
}
| void join1 | ( | cell2d< C, V > * | b | ) | [inline, inherited] |
Definition at line 274 of file cell2d.hpp.
{
b->s_neighbors << this;
this->n_neighbors << b;
}
| unsigned nb_intersect | ( | void | ) | const [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 249 of file cell2d_intersection.hpp.
References Cell2d.
Reimplemented from cell2d_list< C, V >.
Definition at line 384 of file cell2d_intersection.hpp.
References Cell2d.
{
foreach( Cell2d *c, this->s_neighbors )
if ( c->intersections(2).member(p) )
{
return c;
}
foreach( Cell2d *c, this->e_neighbors )
if ( c->intersections(3).member(p) )
{
return c;
}
foreach( Cell2d *c, this->n_neighbors )
if ( c->intersections(0).member(p) )
{
return c;
}
foreach( Cell2d *c, this->w_neighbors )
if ( c->intersections(1).member(p) )
{
return c;
}
//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, inherited] |
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 | ||
| ) | [inherited] |
| double operator() | ( | unsigned | v, |
| unsigned | s | ||
| ) | const [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) ; }
| cell2d_list< C, V >::Point * pair | ( | Point * | p, |
| int & | sgn | ||
| ) | [virtual, inherited] |
Implements cell2d< C, V >.
Definition at line 300 of file cell2d_list.hpp.
References Cell2d, and Cell2dAlgebraicCurve.
{
if ( this->is_intersected() ) {
//
//std::cout<<"Reached intersection cell "<< *this<<std::endl;
// std::cout<<"p= "<< *p <<std::endl;
//foreach (Point*q, this->intersections() )
//std::cout<<"q= "<< *q <<std::endl;
Seq<Point*> l0,l1,l2,l3;
Cell2dAlgebraicCurve* c, *v(NULL);
double ev(0); int i, u(0);
foreach (Cell* m, m_objects)
{
c = dynamic_cast<Cell2dAlgebraicCurve*>(m);
int * sz = c->m_polynomial.rep().szs();
int * st = c->m_polynomial.rep().str();
l0<< c->s_intersections;
if (c->s_intersections.member(p))
{u=0; ev= (c->m_polynomial[0] >0 ? 1:-1); v=c;}
l1<< c->e_intersections;
if (c->e_intersections.member(p))
{u=1; ev= (c->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1); v=c;}
l2<< c->n_intersections;
if (c->n_intersections.member(p))
{u=2;ev=(c->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1); v=c;}
l3<< c->w_intersections;
if (c->w_intersections.member(p))
{u=3;ev=(c->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1); v=c;}
}
// std::cout<<"IN: u="<<u<<", ev="<<ev<<std::endl;
l0.sort(this->coord<0>);
l1.sort(this->coord<1>);
l2.sort(this->coord<0>);
l3.sort(this->coord<1>);
l0<<l1; l0<<l2.reversed(); l0<<l3.reversed();
foreach (Point*q, v->intersections(u) )
{
if (q==p) break;
ev*=-1;
}
i=l0.search(p);
int a=l0.size();
Point *q;
if (ev*sgn>0)
q=l0[(i!=0 ?i-1:a-1)];
else
q= l0[(i!=a-1 ?i+1:0)];
//std::cout<<"res="<< *q <<std::endl;
int ev2(444);
foreach (Cell* m, m_objects)
{
c = dynamic_cast<Cell2dAlgebraicCurve*>(m);
int * sz = c->m_polynomial.rep().szs();
int * st = c->m_polynomial.rep().str();
if (c->s_intersections.member(q))
{u=0; ev2= (c->m_polynomial[0] >0 ? 1:-1); v=c;}
if (c->e_intersections.member(q))
{u=1; ev2= (c->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1); v=c;}
if (c->n_intersections.member(q))
{u=2;ev2=(c->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1); v=c;}
if (c->w_intersections.member(q))
{u=3;ev2=(c->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1); v=c;}
}
foreach (Point*w, v->intersections(u) )
{
if (q==w) break;
ev2*=-1;
}
// std::cout<<"Entered from branch "<<sgn<<std::endl;
if (ev*sgn>0)
sgn=-ev2;
else
sgn=ev2;
// std::cout<<"exiting to "<<sgn<<std::endl;
// std::cout<<"OUT: u="<<u<<", ev2="<<ev2<<std::endl;
return q;
} else {
Cell2d* c;
foreach (Cell* m, m_objects)
{
c = dynamic_cast<Cell2d*>(m);
if ( c->intersections().member(p) )
return c->pair(p,sgn);
}
}
std::cout<<"... Cell list pair trouble"<<std::endl;
return NULL;
}
| cell2d_intersection< C, V >::Point * pair | ( | Point * | p, |
| int | sgn | ||
| ) | [virtual] |
Definition at line 263 of file cell2d_intersection.hpp.
References Cell2d, and Cell2dAlgebraicCurve.
{
if ( this->is_intersected() ) {
//
// std::cout<<"Reached intersection cell "<<this<<std::endl;
// std::cout<<"p= "<< p->x()<<","<<p->y()<<std::endl;
// foreach (Point*q, this->intersections() )
// std::cout<<"q= "<< q->x()<<","<<q->y()<<std::endl;
Seq<Point*> l0,l1,l2,l3;
Cell2dAlgebraicCurve* c, *v(NULL);
double ev(0); int i, u(0);
foreach (Cell* m, this->m_objects)
{
c = dynamic_cast<Cell2dAlgebraicCurve*>(m);
int * sz = c->m_polynomial.rep().szs();
int * st = c->m_polynomial.rep().str();
l0<< c->s_intersections;
if (c->s_intersections.member(p))
{u=0; ev= (c->m_polynomial[0] >0 ? 1:-1); v=c;}
l1<< c->e_intersections;
if (c->e_intersections.member(p))
{u=1; ev= (c->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1); v=c;}
l2<< c->n_intersections;
if (c->n_intersections.member(p))
{u=2;ev=(c->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1); v=c;}
l3<< c->w_intersections;
if (c->w_intersections.member(p))
{u=3;ev=(c->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1); v=c;}
}
// std::cout<<"IN: u="<<u<<", ev="<<ev<<std::endl;
l0.sort(this->coord<0>);
l1.sort(this->coord<1>);
l2.sort(this->coord<0>);
l3.sort(this->coord<1>);
l0<<l1; l0<<l2.reversed(); l0<<l3.reversed();
foreach (Point*q, v->intersections(u) )
{
if (q==p) break;
ev*=-1;
}
i=l0.search(p);
int a=l0.size();
Point *q;
if (ev*sgn>0)
q=l0[(i!=0 ?i-1:a-1)];
else
q= l0[(i!=a-1 ?i+1:0)];
// std::cout<<"res="<<q->x()<<","<<q->y()<<std::endl;
int ev2(444);
foreach (Cell* m, this->m_objects)
{
c = dynamic_cast<Cell2dAlgebraicCurve*>(m);
int * sz = c->m_polynomial.rep().szs();
int * st = c->m_polynomial.rep().str();
if (c->s_intersections.member(q))
{u=0; ev2= (c->m_polynomial[0] >0 ? 1:-1); v=c;}
if (c->e_intersections.member(q))
{u=1; ev2= (c->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1); v=c;}
if (c->n_intersections.member(q))
{u=2;ev2=(c->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1); v=c;}
if (c->w_intersections.member(q))
{u=3;ev2=(c->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1); v=c;}
}
foreach (Point*w, v->intersections(u) )
{
if (q==w) break;
ev2*=-1;
}
// std::cout<<"Entered from branch "<<sgn<<std::endl;
if (ev*sgn>0)
sgn=-ev2;
else
sgn=ev2;
// std::cout<<"exiting to "<<sgn<<std::endl;
// std::cout<<"OUT: u="<<u<<", ev2="<<ev2<<std::endl;
return q;
} else {
Cell2d* c;
foreach (Cell* m, this->m_objects)
{
c = dynamic_cast<Cell2d*>(m);
if ( c->intersections().member(p) )
return c->pair(p,sgn);
}
}
std::cout<<"... Cell list pair trouble"<<std::endl;
return NULL;
}
| void push_back | ( | cell< C, V > * | cv | ) | [inline, inherited] |
Definition at line 84 of file cell2d_list.hpp.
References cell2d_list< C, V >::m_objects.
{ m_objects.push_back(cv); };
| 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, inherited] |
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] |
| cell2d_intersection< C, V >::Point * starting_point | ( | int | sgn | ) | [virtual] |
Reimplemented from cell2d_list< C, V >.
Definition at line 369 of file cell2d_intersection.hpp.
References Cell2d, and cell< C, V >::is_active().
Reimplemented from cell2d_list< C, V >.
Definition at line 156 of file cell2d_intersection.hpp.
References Cell2dInter, mmx::shape_ssi::left(), mmx::shape_ssi::right(), cell< C, V >::subdivide(), point< C, V, N >::x(), and point< C, V, N >::y().
{
typedef Cell2dInter Cell_t;
if(v==1) {
left =(Cell*)new Cell_t(this->xmin(), this->xmax(), this->ymin(), c, this->m_intersected) ;
right=(Cell*)new Cell_t(this->xmin(), this->xmax(), c, this->ymax(), this->m_intersected) ;
foreach(Point * p, this->m_singular) {
if(p->y() <= c)
((Cell_t*) left)->m_singular << p ;
else
((Cell_t*)right)->m_singular << p ;
}
/* Update neighbors */
this->connect1( (Cell_t*)left, (Cell_t*)right);
((Cell_t*)left)->join1((Cell_t*)right);
} else {
left = (Cell*)new Cell_t(this->xmin(), c, this->ymin(), this->ymax(), this->m_intersected) ;
right= (Cell*)new Cell_t(c, this->xmax(), this->ymin(), this->ymax(), this->m_intersected) ;
foreach(Point * p, this->m_singular) {
if(p->x() <= c )
((Cell_t*)left)->m_singular << p ;
else
((Cell_t*)right)->m_singular << p ;
}
/* Update neighbors */
this->connect0((Cell_t*)left, (Cell_t*)right);
((Cell_t*)left)->join0((Cell_t*)right);
}
/* disconnect parent */
this->disconnect( );
//Note: for a semi-alg. set, we keep all the
//equations in the cell, even if inactive.
Cell * cv_left, * cv_right;
foreach(Cell* cv, this->m_objects) {
cv->subdivide( cv_left, cv_right);
// if(cv_left->is_active())
((Cell_t*)left)->m_objects<<cv_left;
// if(cv_right->is_active())
((Cell_t*)right)->m_objects<<cv_right;
}
}
| virtual int subdivide | ( | cell< C, REF_OF(V) > *& | left, |
| cell< C, REF_OF(V) > *& | right | ||
| ) | [virtual, inherited] |
| virtual void subdivide | ( | cell< C, REF_OF(V) > *& | left, |
| cell< C, REF_OF(V) > *& | right, | ||
| int | v, | ||
| double | s | ||
| ) | [pure 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 | ) | const [inline, inherited] |
Definition at line 63 of file bounding_box.hpp.
{ return m_xmax ; }
| 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 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 | ) | [inline, inherited] |
Definition at line 57 of file bounding_box.hpp.
Referenced by cell2d_voronoi_diagram< C, V >::compute_boundary().
{ return m_ymin ; }
| double ymin | ( | void | ) | const [inline, inherited] |
Definition at line 64 of file bounding_box.hpp.
{ return m_ymin ; }
| double ysize | ( | void | ) | const [inline, inherited] |
Definition at line 70 of file bounding_box.hpp.
| double zmax | ( | void | ) | const [inline, inherited] |
Definition at line 67 of file bounding_box.hpp.
{ return m_zmax ; }
| double zmax | ( | void | ) | [inline, inherited] |
Definition at line 60 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 [inherited] |
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 [inherited] |
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().
bool m_intersected [protected, inherited] |
Definition at line 91 of file cell2d_list.hpp.
Definition at line 88 of file cell2d_list.hpp.
Referenced by cell2d_list< C, V >::count(), cell2d_list< C, V >::intersections(), and cell2d_list< C, V >::push_back().
Seq<Point *> m_singular [inherited] |
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 [inherited] |
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 [inherited] |
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 [inherited] |
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 [inherited] |
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 [inherited] |
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 [inherited] |
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().