bcell3d_algebraic_curve< C, V > Struct Template Reference

#include <bcell3d_algebraic_curve.hpp>

Inheritance diagram for bcell3d_algebraic_curve< C, V >:
bcell3d< C, V > cell3d< C, V > bounding_box< C, V >

List of all members.

Classes

Public Types

Public Member Functions

Public Attributes

Protected Attributes


Detailed Description

template<class C, class V = default_env>
struct mmx::shape::bcell3d_algebraic_curve< C, V >

Definition at line 34 of file bcell3d_algebraic_curve.hpp.


Member Typedef Documentation

typedef bcell3d<C,V> bcell3d< C, V >

Definition at line 45 of file bcell3d_algebraic_curve.hpp.

Reimplemented from bcell3d< C, V >.

Definition at line 46 of file bcell3d_algebraic_curve.hpp.

typedef bcell3d<C,V> Cell

Reimplemented from bcell3d< C, V >.

Definition at line 43 of file bcell3d_algebraic_curve.hpp.

typedef cell3d<C,V> CellBase

Reimplemented from bcell3d< C, V >.

Definition at line 44 of file bcell3d_algebraic_curve.hpp.

typedef Topology::Edge Edge [inherited]

Reimplemented from cell3d< C, V >.

Reimplemented in bcell2d_voronoi_impl2d< C, V >, and bcell3d_algebraic_surface< C, V >.

Definition at line 52 of file bcell3d.hpp.

typedef vertex<C,3,V> Point

Reimplemented from bcell3d< C, V >.

Definition at line 39 of file bcell3d_algebraic_curve.hpp.

typedef polynomial< double, with<Bernstein> > Polynomial

Definition at line 41 of file bcell3d_algebraic_curve.hpp.

typedef solver_implicit<C,V> Solver

Reimplemented from bcell3d< C, V >.

Definition at line 48 of file bcell3d_algebraic_curve.hpp.

typedef topology<C,V> Topology

Reimplemented from bcell3d< C, V >.

Definition at line 37 of file bcell3d_algebraic_curve.hpp.

typedef tpl3d<C,V> Topology3d

Reimplemented from bcell3d< C, V >.

Definition at line 38 of file bcell3d_algebraic_curve.hpp.


Constructor & Destructor Documentation

bcell3d_algebraic_curve ( const bcell3d_algebraic_curve< C, V > &  c  )  [inline]

Definition at line 96 of file bcell3d_algebraic_curve.hpp.

00096                                           : 
00097   m_polynomials(c.m_polynomials), m_shape(c.m_shape), m_reg(-1)  {};

bcell3d_algebraic_curve ( const Seq< Polynomial > &  s,
const BoundingBox b 
) [inline]

Definition at line 100 of file bcell3d_algebraic_curve.hpp.

00100                                                                            : 
00101   Cell3d(b), m_polynomials(s), m_reg(-1)
00102 {
00103 
00104 }

bcell3d_algebraic_curve ( algebraic_curve< C, V > *  cv,
const BoundingBox bx 
) [inline]

Definition at line 107 of file bcell3d_algebraic_curve.hpp.

References mmx::assign(), solver_implicit< C, V >::back_face, solver_implicit< C, V >::east_face, solver_implicit< C, V >::face_point(), solver_implicit< C, V >::front_face, bcell3d< C, V >::m_boundary, bcell3d_algebraic_curve< C, V >::m_polynomials, solver_implicit< C, V >::north_face, solver_implicit< C, V >::south_face, solver_implicit< C, V >::west_face, point< C, N, V >::x(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), point< C, N, V >::y(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), point< C, N, V >::z(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00107                                                                      : Cell3d(b), m_reg(-1) {
00108     Seq<mmx::GMP::rational> bx;
00109     bx<<as<mmx::GMP::rational>(b.xmin());
00110     bx<<as<mmx::GMP::rational>(b.xmax());
00111     bx<<as<mmx::GMP::rational>(b.ymin());
00112     bx<<as<mmx::GMP::rational>(b.ymax());
00113     bx<<as<mmx::GMP::rational>(b.zmin());
00114     bx<<as<mmx::GMP::rational>(b.zmax());
00115     
00116     Polynomial tmp;
00117     for(int i=0;i<cv->nbequation();i++) {
00118       tensor::bernstein<mmx::GMP::rational> polq(cv->equation(i).rep(),bx);
00119       let::assign(tmp.rep(),polq);
00120       m_polynomials<<tmp;
00121     }
00122 
00123     Solver::face_point(this->m_boundary, m_polynomials, Solver::north_face, b);
00124     Solver::face_point(this->m_boundary, m_polynomials, Solver::south_face, b);
00125     Solver::face_point(this->m_boundary, m_polynomials, Solver::west_face , b);
00126     Solver::face_point(this->m_boundary, m_polynomials, Solver::east_face , b);
00127     Solver::face_point(this->m_boundary, m_polynomials, Solver::front_face, b);
00128     Solver::face_point(this->m_boundary, m_polynomials, Solver::back_face , b);
00129 
00130     foreach(Point* p, this->m_boundary) std::cout<<"n "<<p->x()<<" "<<p->y()<<" "<<p->z() <<std::endl;
00131 
00132     //    check_cluster(this->m_boundary);
00133     //     Solver::singular(m_singular, m_polynomial, b); 
00134   }


Member Function Documentation

BoundingBox boundingBox (  )  const [inline, inherited]

Reimplemented from cell3d< C, V >.

Definition at line 81 of file bcell3d.hpp.

Referenced by bcell3d< C, V >::intersections().

00081 { return (BoundingBox)*this; }

Point center ( void   )  [inline, inherited]

Reimplemented in bcell3d< C, V >.

Definition at line 75 of file cell3d.hpp.

References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00075                          { return Point((this->xmin()+this->xmax())/2, (this->ymin()+this->ymax())/2,
00076                                         (this->zmin()+this->zmax())/2); }

virtual Point center ( void   )  const [inline, virtual, inherited]

Reimplemented from cell3d< C, V >.

Reimplemented in bcell3d_algebraic_surface< C, V >.

Definition at line 74 of file bcell3d.hpp.

References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00074                                          { 
00075     // XXX ???
00076     return Point(this->xmax()-this->xmin(),
00077                  this->ymax()-this->ymin(),
00078                  this->zmax()-this->zmin()); 
00079   }

void check_insert ( Point p,
Seq< Point * > &  l,
double  eps = 0.00001 
) [inline]

Definition at line 351 of file bcell3d_algebraic_curve.hpp.

References mmx::shape::distance(), and Seq< C, R >::size().

Referenced by bcell3d_algebraic_curve< C, V >::subdivide().

00351                                                          {
00352     //    l<<p; return ;
00353     unsigned i=0;
00354     for(i=0; i<l.size() && distance(*l[i],*p)>eps; i++) ;
00355     if(i==l.size()) l<<p;
00356   }

void connect0 ( bcell3d< C, V > *  a,
bcell3d< C, V > *  b 
) [inline, inherited]

Definition at line 179 of file bcell3d.hpp.

References bcell3d< C, V >::b_neighbors, mmx::shape::check_overlap(), bcell3d< C, V >::e_neighbors, bcell3d< C, V >::f_neighbors, bcell3d< C, V >::n_neighbors, bcell3d< C, V >::s_neighbors, Seq< C, R >::search(), SELF, and bcell3d< C, V >::w_neighbors.

Referenced by bcell3d_algebraic_surface< C, V >::split().

00180 {
00181     int i;
00182     bool flag;
00183 
00184     //copy horizontally
00185     b->e_neighbors= this->e_neighbors ;
00186     foreach(SELF* cl,b->e_neighbors) {
00187       i= cl->w_neighbors.search(this);
00188       cl->w_neighbors[i]= b;
00189     }
00190 
00191     a->w_neighbors= this->w_neighbors ;
00192     foreach(SELF* cl,a->w_neighbors) {
00193       i= cl->e_neighbors.search(this);
00194       cl->e_neighbors[i]= a;
00195     }
00196 
00197     //update vertically
00198     foreach(SELF* cl,this->s_neighbors) {
00199       flag=false;
00200       if ( check_overlap(cl,a,0) //)
00201            && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) )
00202         {
00203           //assert( cl->ymax()== a->ymin() );
00204           a->s_neighbors<< cl;
00205           i= cl->n_neighbors.search(this);
00206           cl->n_neighbors[i]= a;
00207           flag=true;
00208         }
00209       if ( check_overlap(cl,b,0) //)
00210            && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) )
00211         {
00212           //assert( cl->ymax()== b->ymin() );
00213           b->s_neighbors<< cl;
00214           if (!flag)
00215             {
00216               i= cl->n_neighbors.search(this);
00217               cl->n_neighbors[i]= b;
00218             }
00219           else
00220             cl->n_neighbors << b;
00221         }
00222     }
00223     foreach(SELF* cl,this->n_neighbors) {
00224         flag=false;
00225         if ( check_overlap(cl,a,0) //)
00226              && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) 
00227         {
00228             a->n_neighbors<< cl;
00229             i= cl->s_neighbors.search(this);
00230             cl->s_neighbors[i]= a;
00231             flag=true;
00232         }
00233         if ( check_overlap(cl,b,0) //)
00234              && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) )
00235         {
00236             b->n_neighbors<< cl;
00237             if (!flag)
00238             {
00239               i= cl->s_neighbors.search(this);
00240               cl->s_neighbors[i]= b;
00241             }
00242             else
00243               cl->s_neighbors << b;
00244         }
00245     } 
00246 
00247     //update depth
00248     foreach(SELF* cl,this->f_neighbors) {
00249       flag=false;
00250       if ( check_overlap(cl,a,0) //)
00251            && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) )
00252         {
00253           //assert( cl->ymax()== a->ymin() );
00254           a->f_neighbors<< cl;
00255           i= cl->b_neighbors.search(this);
00256           cl->b_neighbors[i]= a;
00257           flag=true;
00258         }
00259       if ( check_overlap(cl,b,0) //)
00260            && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) )
00261         {
00262           //assert( cl->ymax()== b->ymin() );
00263           b->f_neighbors<< cl;
00264           if (!flag)
00265             {
00266               i= cl->b_neighbors.search(this);
00267               cl->b_neighbors[i]= b;
00268             }
00269           else
00270             cl->b_neighbors << b;
00271         }
00272     }
00273     foreach(SELF* cl,this->b_neighbors) {
00274         flag=false;
00275         if ( check_overlap(cl,a,0) //)
00276            && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) 
00277         {
00278             a->b_neighbors<< cl;
00279             i= cl->f_neighbors.search(this);
00280             cl->f_neighbors[i]= a;
00281             flag=true;
00282         }
00283         if ( check_overlap(cl,b,0) //)
00284            && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) )
00285         {
00286             b->b_neighbors<< cl;
00287             if (!flag)
00288             {
00289               i= cl->f_neighbors.search(this);
00290               cl->f_neighbors[i]= b;
00291             }
00292             else
00293               cl->f_neighbors << b;
00294         }
00295     }
00296 }

void connect1 ( bcell3d< C, V > *  a,
bcell3d< C, V > *  b 
) [inline, inherited]

Definition at line 299 of file bcell3d.hpp.

References bcell3d< C, V >::b_neighbors, mmx::shape::check_overlap(), bcell3d< C, V >::e_neighbors, bcell3d< C, V >::f_neighbors, bcell3d< C, V >::n_neighbors, bcell3d< C, V >::s_neighbors, Seq< C, R >::search(), SELF, and bcell3d< C, V >::w_neighbors.

Referenced by bcell3d_algebraic_surface< C, V >::split().

00300 {
00301     int i;
00302     bool flag;
00303 
00304     //copy vertically
00305     a->s_neighbors= this->s_neighbors ;
00306     foreach(SELF* cl,a->s_neighbors) {
00307       i= cl->n_neighbors.search(this);
00308       cl->n_neighbors[i]= a;
00309     }
00310     b->n_neighbors= this->n_neighbors ;
00311     foreach(SELF* cl,b->n_neighbors) {
00312       i= cl->s_neighbors.search(this);
00313       cl->s_neighbors[i]= b;
00314     }
00315     
00316     //update horizontally
00317     foreach(SELF* cl,this->w_neighbors) {
00318       flag=false;
00319       if ( check_overlap(cl,a,1) //) 
00320         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) 
00321         {
00322           //assert( cl->xmax()== a->xmin() );
00323           a->w_neighbors<< cl;
00324           i= cl->e_neighbors.search(this);
00325           cl->e_neighbors[i]= a;
00326           flag=true;
00327         }
00328       if ( check_overlap(cl,b,1) //)
00329         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) 
00330         {
00331           //assert( cl->xmax()== b->xmin() );
00332           b->w_neighbors<< cl;
00333           if (!flag)
00334             {
00335               i= cl->e_neighbors.search(this);
00336               cl->e_neighbors[i]= b;
00337             }
00338           else
00339             cl->e_neighbors << b;
00340         }
00341     }
00342     foreach(SELF* cl,this->e_neighbors) {
00343       flag=false;
00344       if ( check_overlap(cl,a,1) //)
00345         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) )  
00346         {
00347           a->e_neighbors<< cl;
00348           i= cl->w_neighbors.search(this);
00349           cl->w_neighbors[i]= a;
00350           flag=true;
00351         }
00352       if ( check_overlap(cl,b,1) //)
00353         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) 
00354         {
00355           b->e_neighbors<< cl;
00356           if (!flag)
00357             {
00358               i= cl->w_neighbors.search(this);
00359               cl->w_neighbors[i]= b;
00360             }
00361           else
00362             cl->w_neighbors << b;
00363         }
00364     }
00365 
00366 
00367     //update depth
00368     foreach(SELF* cl,this->f_neighbors) {
00369       flag=false;
00370       if ( check_overlap(cl,a,1) //)
00371         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) )  
00372         {
00373           //assert( cl->xmax()== a->xmin() );
00374           a->f_neighbors<< cl;
00375           i= cl->b_neighbors.search(this);
00376           cl->b_neighbors[i]= a;
00377           flag=true;
00378         }
00379       if ( check_overlap(cl,b,1) //)
00380         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) 
00381         {
00382           //assert( cl->xmax()== b->xmin() );
00383           b->f_neighbors<< cl;
00384           if (!flag)
00385             {
00386               i= cl->b_neighbors.search(this);
00387               cl->b_neighbors[i]= b;
00388             }
00389           else
00390             cl->b_neighbors << b;
00391         }
00392     }
00393     foreach(SELF* cl,this->b_neighbors) {
00394       flag=false;
00395       if ( check_overlap(cl,a,1) //)
00396         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) )  
00397         {
00398           a->b_neighbors<< cl;
00399           i= cl->f_neighbors.search(this);
00400           cl->f_neighbors[i]= a;
00401           flag=true;
00402         }
00403       if ( check_overlap(cl,b,1) //)
00404         && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) 
00405         {
00406           b->b_neighbors<< cl;
00407           if (!flag)
00408             {
00409               i= cl->f_neighbors.search(this);
00410               cl->f_neighbors[i]= b;
00411             }
00412           else
00413             cl->f_neighbors << b;
00414         }
00415     }
00416 }

void connect2 ( bcell3d< C, V > *  a,
bcell3d< C, V > *  b 
) [inline, inherited]

Definition at line 420 of file bcell3d.hpp.

References bcell3d< C, V >::b_neighbors, mmx::shape::check_overlap(), bcell3d< C, V >::e_neighbors, bcell3d< C, V >::f_neighbors, bcell3d< C, V >::n_neighbors, bcell3d< C, V >::s_neighbors, Seq< C, R >::search(), SELF, and bcell3d< C, V >::w_neighbors.

Referenced by bcell3d_algebraic_surface< C, V >::split().

00421 {
00422     int i;
00423     bool flag;
00424 
00425     //copy vertically
00426     a->f_neighbors= this->f_neighbors ;
00427     foreach(SELF* cl,a->f_neighbors) {
00428       i= cl->b_neighbors.search(this);
00429       cl->b_neighbors[i]= a;
00430     }
00431     b->b_neighbors= this->b_neighbors ;
00432     foreach(SELF* cl,b->b_neighbors) {
00433       i= cl->f_neighbors.search(this);
00434       cl->f_neighbors[i]= b;
00435     }
00436     
00437     //update horizontally
00438     foreach(SELF* cl,this->w_neighbors) {
00439       flag=false;
00440       if ( check_overlap(cl,a,2) //)
00441         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00442         {
00443           //assert( cl->xmax()== a->xmin() );
00444           a->w_neighbors<< cl;
00445           i= cl->e_neighbors.search(this);
00446           cl->e_neighbors[i]= a;
00447           flag=true;
00448         }
00449       if ( check_overlap(cl,b,2) //)
00450         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00451         {
00452           //assert( cl->xmax()== b->xmin() );
00453           b->w_neighbors<< cl;
00454           if (!flag)
00455             {
00456               i= cl->e_neighbors.search(this);
00457               cl->e_neighbors[i]= b;
00458             }
00459           else
00460             cl->e_neighbors << b;
00461         }
00462     }
00463     foreach(SELF* cl,this->e_neighbors) {
00464       flag=false;
00465       if ( check_overlap(cl,a,2) //)
00466         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )   
00467         {
00468           a->e_neighbors<< cl;
00469           i= cl->w_neighbors.search(this);
00470           cl->w_neighbors[i]= a;
00471           flag=true;
00472         }
00473       if ( check_overlap(cl,b,2) //)
00474         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00475         {
00476           b->e_neighbors<< cl;
00477           if (!flag)
00478             {
00479               i= cl->w_neighbors.search(this);
00480               cl->w_neighbors[i]= b;
00481             }
00482           else
00483             cl->w_neighbors << b;
00484         }
00485     }
00486     //update vertically
00487     foreach(SELF* cl,this->s_neighbors) {
00488       flag=false;
00489       if ( check_overlap(cl,a,0) //)
00490         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00491         {
00492           //assert( cl->ymax()== a->ymin() );
00493           a->s_neighbors<< cl;
00494           i= cl->n_neighbors.search(this);
00495           cl->n_neighbors[i]= a;
00496           flag=true;
00497         }
00498       if ( check_overlap(cl,b,0) //)
00499         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00500         {
00501           //assert( cl->ymax()== b->ymin() );
00502           b->s_neighbors<< cl;
00503           if (!flag)
00504             {
00505               i= cl->n_neighbors.search(this);
00506               cl->n_neighbors[i]= b;
00507             }
00508           else
00509             cl->n_neighbors << b;
00510         }
00511     }
00512     foreach(SELF* cl,this->n_neighbors) {
00513         flag=false;
00514         if ( check_overlap(cl,a,2) //)
00515         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00516         {
00517           a->n_neighbors<< cl;
00518           i= cl->s_neighbors.search(this);
00519           cl->s_neighbors[i]= a;
00520           flag=true;
00521         }
00522         if ( check_overlap(cl,b,2) //)
00523         && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) )  
00524           {
00525             b->n_neighbors<< cl;
00526             if (!flag) {
00527               i= cl->s_neighbors.search(this);
00528               cl->s_neighbors[i]= b;
00529             }
00530             else
00531               cl->s_neighbors << b;
00532         }
00533     }
00534 }

bool contains ( double  x,
double  y,
double  z,
bool  strict = false 
) [inline, inherited]

Definition at line 226 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, bounding_box< C, V >::m_ymin, bounding_box< C, V >::m_zmax, and bounding_box< C, V >::m_zmin.

00227 {
00228     if(!strict)
00229         return (((m_xmin <= x) && (x <= m_xmax))
00230                 &&   ((m_ymin <= y) && (y <= m_ymax))
00231                 &&   ((m_zmin <= z) && (z <= m_zmax)))  ;
00232     else
00233         return (((m_xmin <  x) && (x <  m_xmax))
00234                 &&   ((m_ymin <  y) && (y <  m_ymax))
00235                 &&   ((m_zmin <  z) && (z <  m_zmax)))  ;
00236 }

bool contains ( double  x,
double  y,
bool  strict = false 
) [inline, inherited]

Definition at line 215 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, and bounding_box< C, V >::m_ymin.

00216 {
00217     if(!strict)
00218         return (((m_xmin <= x) && (x <= m_xmax))
00219                 &&   ((m_ymin <= y) && (y <= m_ymax))) ;
00220     else
00221         return (((m_xmin <  x) && (x <  m_xmax))
00222                 &&   ((m_ymin <  y) && (y <  m_ymax))) ;
00223 }

bool contains ( double  x,
bool  strict = false 
) [inline, inherited]

Definition at line 206 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, and bounding_box< C, V >::m_xmin.

00207 {
00208     if(!strict)
00209         return (((m_xmin <= x) && (x <= m_xmax))) ;
00210     else
00211         return (((m_xmin <  x) && (x <  m_xmax))) ;
00212 }

void disconnect (  )  [inline, inherited]

Definition at line 537 of file bcell3d.hpp.

References bcell3d< C, V >::b_neighbors, Seq< C, R >::clear(), bcell3d< C, V >::e_neighbors, bcell3d< C, V >::f_neighbors, bcell3d< C, V >::n_neighbors, bcell3d< C, V >::s_neighbors, and bcell3d< C, V >::w_neighbors.

00538 {
00539     this->e_neighbors.clear();  
00540     this->w_neighbors.clear();  
00541     this->n_neighbors.clear();  
00542     this->s_neighbors.clear();  
00543     this->b_neighbors.clear();  
00544     this->f_neighbors.clear();  
00545 }

Polynomial equation ( int  i = 0  )  const [inline]
bool insert_regular ( Topology t  )  [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 322 of file bcell3d_algebraic_curve.hpp.

00322                                           {
00323   return this->inserted_regular_in<Topology>(t);
00324 }

bool insert_singular ( Topology t  )  [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 336 of file bcell3d_algebraic_curve.hpp.

00336                                            { 
00337   return this->inserted_singular_in<Topology>(t);
00338 }

bool inserted_regular_in ( TOPOLOGY *  t  )  [inline]

Definition at line 287 of file bcell3d_algebraic_curve.hpp.

References Seq< C, R >::begin(), Edge, Seq< C, R >::end(), bcell3d< C, V >::m_boundary, bcell3d_algebraic_curve< C, V >::m_reg, and Seq< C, R >::size().

Referenced by mesher3d_algebraic_curve< C, V >::insert_regular().

00287                                                                           {
00288 
00289     typedef typename TOPOLOGY::Edge Edge; 
00290     if(this->m_boundary.size()==0) return true;
00291 
00292 //     if(this->m_boundary.size()==1) { 
00293 //       std::cout<<"bcell with 1 boundary point with reg "<<m_reg<<std::endl;      //      return false;
00294 //     }
00295     if(this->m_boundary.size()==2) {
00296       t->insert(this->m_boundary[0]); 
00297       t->insert(this->m_boundary[1]); 
00298       t->insert(new Edge(this->m_boundary[0],this->m_boundary[1])); 
00299     } else {
00300       //      std::cout<<"bcell with "<<this->m_boundary.size()<<" boundary points with reg "<<m_reg<<std::endl;
00301       BoundingBox bx=*this;
00302       //      std::cout<<"["<<bx.xmin()<<" "<<bx.xmax()<<" "<<bx.ymin()<<" "<<bx.ymax()<<" "<<bx.zmin()<<" "<<bx.zmax()<<"]"<<std::endl;
00303 
00304       std::sort(this->m_boundary.begin(), this->m_boundary.end(), along(m_reg) );
00305 
00306       foreach(Point* p, this->m_boundary) t->insert(p);
00307       
00308       for(unsigned i=0;i<this->m_boundary.size();i++) {
00309         unsigned j=i+1, i0=i;
00310         //      std::cout<<"i0 "<<i<<" "<<j<<std::endl;
00311         for(j=i+1; j<this->m_boundary.size() 
00312               && (this->m_boundary[i0] == this->m_boundary[j]);i++, j++) ;
00313         if(j<this->m_boundary.size())
00314           t->insert(new Edge( this->m_boundary[i0], this->m_boundary[j])); 
00315         //      std::cout<<"i0 "<<i<<" "<<j<<std::endl;
00316       }
00317     }
00318 
00319     return true; 
00320   }

bool inserted_singular_in ( TOPOLOGY *  t  )  [inline]

Definition at line 327 of file bcell3d_algebraic_curve.hpp.

References bcell3d< C, V >::m_boundary, and Seq< C, R >::size().

Referenced by mesher3d_algebraic_curve< C, V >::sing_process().

00327                                                                          { 
00328   if(this->m_boundary.size()>0) { 
00329     t->insert((BoundingBox *)this);
00330     foreach(Point* p, this->m_boundary)
00331       t->insert(p);
00332   }       
00333   return true; 
00334 } 

bounding_box< C, V > * intersect ( const bounding_box< C, V > &  other  )  [inline, inherited]

Definition at line 319 of file bounding_box.hpp.

References mmx::shape::mmxmax(), mmx::shape::mmxmin(), SELF, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

Referenced by bounding_box< double, V >::operator*().

00319                                  {
00320     SELF * bcell = new SELF ;
00321     bcell->set_xmin(mmxmax(this->xmin(), other.xmin())) ;
00322     bcell->set_xmax(mmxmin(this->xmax(), other.xmax())) ;
00323     bcell->set_ymin(mmxmax(this->ymin(), other.ymin())) ;
00324     bcell->set_ymax(mmxmin(this->ymax(), other.ymax())) ;
00325     bcell->set_zmin(mmxmax(this->zmin(), other.zmin())) ;
00326     bcell->set_zmax(mmxmin(this->zmax(), other.zmax())) ;
00327     return bcell ;
00328 }

void intersected ( bounding_box< C, V > *  other  )  [inline, inherited]
Seq< typename bcell3d< C, V >::Point * > intersections ( int  i  )  const [inline, inherited]

Definition at line 564 of file bcell3d.hpp.

References solver_implicit< C, V >::back_face, bcell3d< C, V >::boundingBox(), solver_implicit< C, V >::east_face, solver_implicit< C, V >::front_face, bcell3d< C, V >::m_boundary, solver_implicit< C, V >::north_face, solver_implicit< C, V >::south_face, and solver_implicit< C, V >::west_face.

00565       {
00566         Seq<Point *> l;
00567         switch(i) {
00568         case 0://south
00569           foreach(Point* p, this->m_boundary) 
00570             if (Solver::south_face.is_valid(*p,this->boundingBox())) 
00571               l << p ;
00572             return l;
00573           case 1://east
00574           foreach(Point* p, this->m_boundary) 
00575             if (Solver::east_face.is_valid(*p,this->boundingBox())) 
00576               l << p ;
00577             return l;
00578           case 2://north
00579           foreach(Point* p, this->m_boundary) 
00580             if (Solver::north_face.is_valid(*p,this->boundingBox())) 
00581               l << p ;
00582             return l;
00583           case 3://west
00584           foreach(Point* p, this->m_boundary) 
00585             if (Solver::west_face.is_valid(*p,this->boundingBox())) 
00586               l << p ;
00587             return l;
00588           case 4://front
00589             foreach(Point* p, this->m_boundary) 
00590               if (Solver::front_face.is_valid(*p,this->boundingBox())) 
00591                 l << p ;
00592               return l;
00593             case 5://back
00594           foreach(Point* p, this->m_boundary) 
00595             if (Solver::back_face.is_valid(*p,this->boundingBox())) 
00596               l << p ;
00597             return l;
00598           default:
00599             return (Seq<Point *>());
00600                     }
00601           }

bool intersects ( bounding_box< C, V > *  other,
bool  strict = true 
) [inline, inherited]

Definition at line 239 of file bounding_box.hpp.

References bounding_box< C, V >::is0D(), bounding_box< C, V >::is1D(), bounding_box< C, V >::is2D(), bounding_box< C, V >::is3d(), mmx::shape::mmxmax(), mmx::shape::mmxmin(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00240 {
00241     if(this->is0D())
00242         return (this->xmin() == other->xmin()) ;
00243     else if(this->is1D())
00244         if(strict)
00245             return ((mmxmax(this->xmin(), other->xmin()) <  mmxmin(this->xmax(), other->xmax()))) ;
00246         else
00247             return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax()))) ;
00248     else if(this->is2D())
00249         if(strict)
00250             return ((mmxmax(this->xmin(), other->xmin()) <  mmxmin(this->xmax(), other->xmax())) &&
00251                     (mmxmax(this->ymin(), other->ymin()) <  mmxmin(this->ymax(), other->ymax()))) ;
00252         else
00253             return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) &&
00254                     (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax()))) ;
00255     else if(this->is3d()) {
00256         if(strict)
00257             return ((mmxmax(this->xmin(), other->xmin()) <  mmxmin(this->xmax(), other->xmax())) &&
00258                     (mmxmax(this->ymin(), other->ymin()) <  mmxmin(this->ymax(), other->ymax())) &&
00259                     (mmxmax(this->zmin(), other->zmin()) <  mmxmin(this->zmax(), other->zmax()))) ;
00260         else
00261             return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) &&
00262                     (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax())) &&
00263                     (mmxmax(this->zmin(), other->zmin()) <= mmxmin(this->zmax(), other->zmax()))) ;
00264     }
00265     return false ;
00266 }

bool is0D ( void   )  const [inline, inherited]

Definition at line 80 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00080 { 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.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00081 { 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.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00082 { 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.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00083 { return ((m_xmin != m_xmax) && (m_ymin != m_ymax) && (m_zmin != m_zmax)) ; }

bool is_active ( void   )  const [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 137 of file bcell3d_algebraic_curve.hpp.

References mmx::has_sign_variation(), and bcell3d_algebraic_curve< C, V >::m_polynomials.

Referenced by mesher3d_algebraic_curve< C, V >::run().

00137                         {
00138     //    std::cout<<"Is active "<<m_polynomials[0].rep()<<std::endl;
00139 
00140     if(!has_sign_variation(m_polynomials[0])) 
00141       return false;
00142 
00143     //    std::cout<<"Is active "<<m_polynomials[1]<<std::endl;
00144 
00145     if(!has_sign_variation(m_polynomials[1]))
00146       //m_polynomials[1].begin(),m_polynomials[1].end())) 
00147       return false;
00148 
00149        //    std::cout<<"Is active end"<<std::endl;
00150     
00151     return true; 
00152   }

bool is_adjacent ( cell3d< C, V > *  c  )  [inline, virtual, inherited]

Definition at line 114 of file cell3d.hpp.

References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00114                               {
00115   if(this->xmax()<c2->xmin() || c2->xmax()<this->xmin())
00116     return false;
00117   if(this->ymax()<c2->ymin() || c2->ymax()<this->ymin())
00118     return false;
00119   if(this->zmax()<c2->zmin() || c2->zmax()<this->zmin())
00120     return false;
00121   if((this->xmax()==c2->xmin() || c2->xmax()==this->xmin())) {
00122     if((this->ymax()==c2->ymin() || c2->ymax()==this->ymin()) ||
00123        (this->zmax()==c2->zmin() || c2->zmax()==this->zmin()) )
00124       return false;
00125   } else if((this->ymax()==c2->ymin() || c2->ymax()==this->ymin()) &&
00126             (this->zmax()==c2->zmin() || c2->zmax()==this->zmin()) )
00127     return false;
00128   return true;
00129 }

virtual bool is_intersected ( void   )  [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 57 of file bcell3d_algebraic_curve.hpp.

00057 {return true;}

bool is_regular ( void   )  [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 155 of file bcell3d_algebraic_curve.hpp.

References mmx::diff(), bcell3d_algebraic_curve< C, V >::equation(), mmx::has_sign_variation(), bcell3d_algebraic_curve< C, V >::m_reg, bcell3d< C, V >::m_singular, and Seq< C, R >::size().

Referenced by mesher3d_algebraic_curve< C, V >::is_regular().

00155                    {
00156     if(this->m_singular.size()>1) return false;
00157 
00158     Polynomial 
00159       tx=diff(equation(0),1)*diff(equation(1),2)-diff(equation(1),1)*diff(equation(0),2);
00160     if(!has_sign_variation(tx)) 
00161       { m_reg=0; return true; }
00162     
00163     Polynomial 
00164         ty=diff(equation(0),0)*diff(equation(1),2)-diff(equation(1),0)*diff(equation(0),2);
00165     if(!has_sign_variation(ty)) 
00166       { m_reg=1; return true; }
00167     
00168     Polynomial 
00169       tz=diff(equation(0),0)*diff(equation(1),1)-diff(equation(1),0)*diff(equation(0),1);
00170     if(!has_sign_variation(tz)) 
00171       { m_reg=2; return true; }
00172 
00173     //    int n=this->m_boundary.size();
00174     //    if(n > 2) 
00175     return false;
00176     //    else {
00177     //      return true;
00178     //    }
00179   }

void join0 ( bcell3d< C, V > *  b  )  [inline, inherited]

Definition at line 158 of file bcell3d.hpp.

References bcell3d< C, V >::e_neighbors.

00159 {
00160     this->e_neighbors << b; 
00161     b->w_neighbors << this; 
00162 }

void join1 ( bcell3d< C, V > *  b  )  [inline, inherited]

Definition at line 165 of file bcell3d.hpp.

References bcell3d< C, V >::n_neighbors.

00166 {
00167     b->s_neighbors << this;
00168     this->n_neighbors << b;
00169 }

void join2 ( bcell3d< C, V > *  b  )  [inline, inherited]

Definition at line 172 of file bcell3d.hpp.

References bcell3d< C, V >::b_neighbors.

00173 {
00174     b->f_neighbors << this;
00175     this->b_neighbors << b;
00176 }

int nbeq (  )  const [inline]
Seq<bcell3d *> neighbors (  )  [inline, inherited]

Definition at line 103 of file bcell3d.hpp.

References bcell3d< C, V >::b_neighbors, bcell3d< C, V >::e_neighbors, bcell3d< C, V >::f_neighbors, bcell3d< C, V >::n_neighbors, bcell3d< C, V >::s_neighbors, and bcell3d< C, V >::w_neighbors.

00103                              { 
00104     Seq<bcell3d *> t;
00105     t<< s_neighbors ;
00106     t<< e_neighbors ;
00107     t<< n_neighbors ;
00108     t<< b_neighbors ;
00109     t<< w_neighbors ;
00110     t<< f_neighbors ;
00111     return t;     } ;

double & operator() ( unsigned  v,
unsigned  s 
) [inline, inherited]

Definition at line 356 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, bounding_box< C, V >::m_ymin, bounding_box< C, V >::m_zmax, and bounding_box< C, V >::m_zmin.

00356                                        {
00357     switch(v) {
00358     case 0:
00359         if(s==0) return m_xmin; else return m_xmax;
00360     case 1:
00361         if(s==0) return m_ymin; else return m_ymax;
00362     default:
00363         if(s==0) return m_zmin; else return m_zmax;
00364     }
00365 
00366 }

double operator() ( unsigned  v,
unsigned  s 
) const [inline, inherited]

Definition at line 343 of file bounding_box.hpp.

References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00343                                              {
00344     switch(v) {
00345     case 0:
00346         if(s==0) return xmin(); else return xmax();
00347     case 1:
00348         if(s==0) return ymin(); else return ymax();
00349     default:
00350         if(s==0) return zmin(); else return zmax();
00351     }
00352 
00353 }

bounding_box<C,V>* operator* ( const bounding_box< C, V > &  other  )  [inline, inherited]

Definition at line 103 of file bounding_box.hpp.

00103 { return intersect(other) ; }

bounding_box<C,V>* operator+ ( const bounding_box< C, V > &  other  )  [inline, inherited]

Definition at line 104 of file bounding_box.hpp.

00104 { return     unite(other) ; }

virtual void polygonise ( Topology3d  )  [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 68 of file bcell3d_algebraic_curve.hpp.

00068 {};

void set_xmax ( double  x  )  [inline, inherited]

Definition at line 74 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00074 { this->m_xmax = x ; }

void set_xmin ( double  x  )  [inline, inherited]

Definition at line 73 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00073 { this->m_xmin = x ; }

void set_ymax ( double  y  )  [inline, inherited]

Definition at line 76 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00076 { this->m_ymax = y ; }

void set_ymin ( double  y  )  [inline, inherited]

Definition at line 75 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00075 { this->m_ymin = y ; }

void set_zmax ( double  z  )  [inline, inherited]
void set_zmin ( double  z  )  [inline, inherited]
double size ( void   )  [inline, inherited]

Definition at line 199 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, bounding_box< C, V >::m_ymin, bounding_box< C, V >::m_zmax, bounding_box< C, V >::m_zmin, and mmx::max().

Referenced by voronoi2dimpl< C, V >::run(), voronoi2d< C, V >::run(), mesher3d_shape< C, V >::run(), mesher3d_algebraic_curve< C, V >::run(), and mesher2d< C, V >::run().

00200 {
00201     //std::cout<<"Size "<<m_xmax<< " "<< m_xmin<<" "<< m_ymax<<" "<< m_ymin<<" "<< m_zmax<< " "<<m_zmin<<std::endl;
00202     return std::max(m_xmax-m_xmin, std::max(m_ymax-m_ymin, m_zmax-m_zmin)) ;
00203 }

void split_position ( int &  v,
double &  s 
) [inline, virtual, inherited]

Reimplemented from cell3d< C, V >.

Reimplemented in bcell3d_list< C, V >.

Definition at line 134 of file bcell3d.hpp.

References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

Referenced by bcell3d_algebraic_curve< C, V >::subdivide().

00134                                       {
00135   double sx = (this->xmax()-this->xmin());
00136   double sy = (this->ymax()-this->ymin());
00137   double sz = (this->zmax()-this->zmin());
00138   
00139   if(sx<sy)
00140       if(sy<sz) {
00141         v=2;
00142         s=(this->zmax()+this->zmin())/2;
00143       } else {
00144         v=1;
00145         s=(this->ymax()+this->ymin())/2;
00146       }
00147     else
00148       if(sx<sz) {
00149         v=2;
00150         s=(this->zmax()+this->zmin())/2;
00151       } else {
00152         v=0;
00153         s=(this->xmax()+this->xmin())/2;
00154       }
00155 }

virtual void subdivide ( cell3d< C, V > *&  left,
cell3d< C, V > *&  right,
int  v,
double  s 
) [pure virtual, inherited]

Implemented in bcell3d_list< C, V >.

void subdivide ( CellBase *&  left,
CellBase *&  right,
int  v,
double  s 
) [inline, virtual]

Definition at line 190 of file bcell3d_algebraic_curve.hpp.

References solver_implicit< C, V >::back_face, bcell3d_algebraic_curve< C, V >::check_insert(), solver_implicit< C, V >::east_face, solver_implicit< C, V >::face_point(), solver_implicit< C, V >::front_face, mmx::ssi::left(), bcell3d< C, V >::m_boundary, bcell3d_algebraic_curve< C, V >::m_polynomials, bcell3d_algebraic_curve< C, V >::nbeq(), solver_implicit< C, V >::north_face, mmx::ssi::right(), SELF, solver_implicit< C, V >::south_face, mmx::split(), solver_implicit< C, V >::west_face, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00190                                                                     {
00191 
00192     SELF * left, * right;
00193    //  if (this->m_boundary.size()>2){
00194 //       std::cout<<"             split bcell with "<<this->m_boundary.size()<<" points"<<std::endl;
00195 //       foreach(Point* p, this->m_boundary)
00196 //      std::cout<<" "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl;
00197 //     }
00198     if(v==0){
00199       c=(this->xmin()+this->xmax())/2;
00200       left = new SELF(m_polynomials, BoundingBox(this->xmin(),c, this->ymin(),this->ymax(), this->zmin(),this->zmax()));
00201       right= new SELF(m_polynomials, BoundingBox(c,this->xmax(), this->ymin(),this->ymax(), this->zmin(),this->zmax()));
00202     } else if(v==1) {
00203       c=(this->ymin()+this->ymax())/2;
00204       left = new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), this->ymin(),c, this->zmin(),this->zmax()));
00205       right= new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), c,this->ymax(), this->zmin(),this->zmax()));
00206     } else {
00207       c=(this->zmin()+this->zmax())/2;
00208       left = new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), this->ymin(),this->ymax(), this->zmin(),c));
00209       right= new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), this->ymin(),this->ymax(), c,this->zmax()));
00210     }
00211 
00212     for(int i=0;i<nbeq();i++) {
00213       tensor::split(left->m_polynomials[i], right->m_polynomials[i], v);
00214     }
00215 
00216     if(v==0) {
00217       foreach(Point* p, this->m_boundary) {
00218         if (Solver::east_face.is_valid(*p,left->boundingBox())) 
00219           left->m_boundary << p ;
00220         if (Solver::west_face.is_valid(*p,right->boundingBox())) 
00221           right->m_boundary << p ;
00222       }
00223     } else if (v==1) {
00224       foreach(Point* p, this->m_boundary) {
00225         if (Solver::north_face.is_valid(*p,left->boundingBox())) 
00226           left->m_boundary << p ;
00227         if (Solver::south_face.is_valid(*p,right->boundingBox())) 
00228           right->m_boundary << p ;
00229       }
00230     } else {
00231       foreach(Point* p, this->m_boundary) {
00232         if (Solver::front_face.is_valid(*p,left->boundingBox())) 
00233           left->m_boundary << p ;
00234         if (Solver::back_face.is_valid(*p,right->boundingBox())) 
00235           right->m_boundary << p ;
00236       }
00237     }
00238 
00239  
00240 
00241     Seq<Point*> tmp;
00242     // Points on vertical faces of back subbcells
00243     if(v==0){
00244       Solver::face_point(tmp, left->m_polynomials, Solver::east_face, left->boundingBox());   
00245       foreach(Point *p, tmp){
00246         check_insert(p, left->m_boundary);
00247         check_insert(p, right->m_boundary);
00248       }
00249     } else if(v==1) {
00250       Solver::face_point(tmp, left->m_polynomials, Solver::north_face, left->boundingBox());   
00251       foreach(Point *p, tmp){
00252         check_insert(p, left->m_boundary);
00253         check_insert(p, right->m_boundary);
00254       }
00255     } else {
00256       Solver::face_point(tmp, left->m_polynomials, Solver::front_face, left->boundingBox());   
00257       foreach(Point *p, tmp){
00258         check_insert(p, left->m_boundary);
00259         check_insert(p, right->m_boundary);
00260       }
00261     }
00262 //  if (tmp.size()>0){
00263 //       std::cout<<"      insert  "<<tmp.size()<<" points"<<std::endl;
00264 //       foreach(Point* p, tmp)
00265 //      std::cout<<"            "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl;
00266 //     }
00267 //     if (left->m_boundary.size()>2){
00268 //       std::cout<<"["<<left->xmin()<<" "<<left->xmax()<<" "<<left->ymin()<<" "<<left->ymax()<<" "<<left->zmin()<<" "<<left->zmax()<<"]"<<std::endl;
00269 //       std::cout<<"      left bcell with "<<left->m_boundary.size()<<" points"<<std::endl;
00270 //       foreach(Point* p, left->m_boundary)
00271 //      std::cout<<"            "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl;
00272 //     }
00273 //     if (right->m_boundary.size()>2){
00274 //       std::cout<<"      right bcell with "<<right->m_boundary.size()<<" points"<<std::endl;
00275 //       std::cout<<"["<<right->xmin()<<" "<<right->xmax()<<" "<<right->ymin()<<" "<<right->ymax()<<" "<<right->zmin()<<" "<<right->zmax()<<"]"<<std::endl;
00276 //       foreach(Point* p, right->m_boundary)
00277 //      std::cout<<"            "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl;
00278 //     }
00279     //    left ->m_boundary<<tmp;
00280     //    right->m_boundary<<tmp;
00281 
00282    
00283     Left=left; Right=right;
00284   }

int subdivide ( bcell3d_algebraic_curve< C, V > *&  left,
bcell3d_algebraic_curve< C, V > *&  right 
) [inline, virtual]

Reimplemented from cell3d< C, V >.

Definition at line 182 of file bcell3d_algebraic_curve.hpp.

References bcell3d< C, V >::split_position().

Referenced by mesher3d_algebraic_curve< C, V >::subdivide().

00182                                            {
00183     int v; double s;
00184     this->split_position(v,s);
00185     this->subdivide((CellBase*&)Left,(CellBase*&)Right,v,s);
00186     return v;
00187   }

bool topology_regular ( Topology  )  [inline, virtual]

Implements bcell3d< C, V >.

Definition at line 84 of file bcell3d_algebraic_curve.hpp.

00084 { return true;}

bounding_box< C, V > * unite ( bounding_box< C, V > *  other  )  [inline, inherited]

Definition at line 331 of file bounding_box.hpp.

References mmx::shape::mmxmax(), mmx::shape::mmxmin(), SELF, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

Referenced by bounding_box< double, V >::operator+().

00331                         {
00332     SELF * bcell = new SELF ;
00333     bcell->set_xmin(mmxmin(this->xmin(), other->xmin())) ;
00334     bcell->set_xmax(mmxmax(this->xmax(), other->xmax())) ;
00335     bcell->set_ymin(mmxmin(this->ymin(), other->ymin())) ;
00336     bcell->set_ymax(mmxmax(this->ymax(), other->ymax())) ;
00337     bcell->set_zmin(mmxmin(this->zmin(), other->zmin())) ;
00338     bcell->set_zmax(mmxmax(this->zmax(), other->zmax())) ;
00339     return bcell ;
00340 }

void united ( bounding_box< C, V > *  other  )  [inline, inherited]
bool unites ( bounding_box< C, V > *  other,
bool  strict = true 
) [inline, inherited]

Definition at line 269 of file bounding_box.hpp.

References bounding_box< C, V >::is0D(), bounding_box< C, V >::is1D(), bounding_box< C, V >::is2D(), bounding_box< C, V >::is3d(), mmx::shape::mmxmax(), mmx::shape::mmxmin(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00270 {
00271     if(this->is0D())
00272         return (this->xmin() == other->xmin()) ;
00273     else if(this->is1D()) {
00274         if(strict)
00275             return ((mmxmin(this->xmin(), other->xmin()) <  mmxmax(this->xmax(), other->xmax()))) ;
00276         else
00277             return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax()))) ;
00278     } else if(this->is2D()) {
00279         if(strict)
00280             return ((mmxmin(this->xmin(), other->xmin()) <  mmxmax(this->xmax(), other->xmax())) &&
00281                     (mmxmin(this->ymin(), other->ymin()) <  mmxmax(this->ymax(), other->ymax()))) ;
00282         else
00283             return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) &&
00284                     (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax()))) ;
00285     } else if(this->is3d()) {
00286         if(strict)
00287             return ((mmxmin(this->xmin(), other->xmin()) <  mmxmax(this->xmax(), other->xmax())) &&
00288                     (mmxmin(this->ymin(), other->ymin()) <  mmxmax(this->ymax(), other->ymax())) &&
00289                     (mmxmin(this->zmin(), other->zmin()) <  mmxmax(this->zmax(), other->zmax()))) ;
00290         else
00291             return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) &&
00292                     (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax())) &&
00293                     (mmxmin(this->zmin(), other->zmin()) <= mmxmax(this->zmax(), other->zmax()))) ;
00294     }
00295     return false ;
00296 }

double xmax ( void   )  const [inline, inherited]

Definition at line 63 of file bounding_box.hpp.

00063 { return m_xmax ; }

double xmax ( void   )  [inline, inherited]

Definition at line 56 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00056 { return m_xmax ; }

double xmin ( void   )  const [inline, inherited]

Definition at line 62 of file bounding_box.hpp.

00062 { return m_xmin ; }

double xmin ( void   )  [inline, inherited]

Definition at line 55 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), mmx::shape::operator<<(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00055 { return m_xmin ; }

double xsize ( void   )  const [inline, inherited]

Definition at line 69 of file bounding_box.hpp.

00069 { return m_xmax-m_xmin ; }

double ymax ( void   )  const [inline, inherited]

Definition at line 65 of file bounding_box.hpp.

00065 { return m_ymax ; }

double ymax ( void   )  [inline, inherited]

Definition at line 58 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00058 { return m_ymax ; }

double ymin ( void   )  const [inline, inherited]

Definition at line 64 of file bounding_box.hpp.

00064 { return m_ymin ; }

double ymin ( void   )  [inline, inherited]

Definition at line 57 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00057 { return m_ymin ; }

double ysize ( void   )  const [inline, inherited]

Definition at line 70 of file bounding_box.hpp.

00070 { return m_ymax-m_ymin ; }

double zmax ( void   )  const [inline, inherited]

Definition at line 67 of file bounding_box.hpp.

00067 { return m_zmax ; }

double zmax ( void   )  [inline, inherited]
double zmin ( void   )  const [inline, inherited]

Definition at line 66 of file bounding_box.hpp.

00066 { return m_zmin ; }

double zmin ( void   )  [inline, inherited]
double zsize ( void   )  const [inline, inherited]

Definition at line 71 of file bounding_box.hpp.

00071 { return m_zmax-m_zmin ; }


Member Data Documentation

Seq<bcell3d *> b_neighbors [inherited]
Seq<bcell3d *> e_neighbors [inherited]
Seq<bcell3d *> f_neighbors [inherited]
Seq<Point *> m_boundary [inherited]
gNode<bcell3d*>* m_gnode [inherited]

Definition at line 100 of file bcell3d.hpp.

int m_reg

Definition at line 90 of file bcell3d_algebraic_curve.hpp.

Seq<Point *> m_singular [inherited]

Definition at line 96 of file bcell3d.hpp.

Referenced by bcell3d_algebraic_curve< C, V >::is_regular().

int m_type [inherited]

Definition at line 97 of file bcell3d.hpp.

double m_xmax [protected, inherited]
double m_xmin [protected, inherited]
double m_ymax [protected, inherited]
double m_ymin [protected, inherited]
double m_zmax [protected, inherited]
double m_zmin [protected, inherited]
Seq<bcell3d *> n_neighbors [inherited]
Seq<bcell3d *> s_neighbors [inherited]
Seq<bcell3d *> w_neighbors [inherited]

The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for shape by  doxygen 1.6.1