graphic<C,V>* mmx::shape::as_graphic | ( | const tpl3d< C, V > & | tp | ) | [inline] |
Definition at line 219 of file tpl3d.hpp.
References Edge, Face, and Point.
00219 { 00220 00221 typedef graphic<C,V> Graphic; 00222 typedef typename SELF::Point Point; 00223 typedef typename SELF::Edge Edge; 00224 typedef typename SELF::Face Face; 00225 00226 //int nbi=0; 00227 00228 Graphic* res = new Graphic (tp.nbv(), tp.nbe(), tp.nbf()); 00229 00230 int c=0; 00231 00232 foreach(Point* p, tp.vertices()) { 00233 res->vertices[c] =p->x(); 00234 res->vertices[c+1]=p->y(); 00235 res->vertices[c+2]=p->z(); 00236 c+=3; 00237 } 00238 00239 if( tp.nbe()>0){ 00240 //nbi=2*tp.nbe(); 00241 int c=0; 00242 foreach(Edge* e, tp.edges()) { 00243 res->edges[c] = e->source()->index(); 00244 res->edges[c+1] = e->destination()->index(); 00245 c+=2; 00246 } 00247 } 00248 00249 if( tp.nbf()>0){ 00250 int c=0; 00251 foreach(Face* f, tp.faces()) { 00252 res->faces[c] = f->points(0)->index(); 00253 res->faces[c+1] = f->points(1)->index(); 00254 res->faces[c+2] = f->points(2)->index(); 00255 c+=3; 00256 } 00257 } 00258 return res; 00259 00260 }
void mmx::shape::as_graphic | ( | MESH * | mesh, | |
const rational_surface< C, N, V > & | surf, | |||
unsigned | m = 50 , |
|||
unsigned | n = 50 | |||
) | [inline] |
Definition at line 210 of file rational_surface.hpp.
References Point, Polynomial, Scalar, mmx::ssi::umax(), and mmx::ssi::umin().
00210 { 00211 00212 typedef typename SELF::Scalar Scalar; 00213 typedef typename SELF::Point Point; 00214 typedef typename SELF::Polynomial Polynomial; 00215 typedef typename MESH::Point MPoint; 00216 std::cout<<"domain: "<<surf.domain()<<std::endl; 00217 std::cout<<"numer: "<<surf.numerator(0)<<" "<<surf.numerator(1)<<" "<<surf.numerator(2)<<std::endl; 00218 std::cout<<"denom: "<<surf.denominator()<<std::endl; 00219 if (surf.domain().size() != 0 && surf.domain().size() != 3 && surf.domain().size() != 4) return; 00220 00221 int c=0; 00222 00223 // If there is no domain specified, the user wants to work on IRxIR 00224 Point A1, dA1, 00225 U, B0, B1, dB0, P(0,0,0); 00226 if (surf.domain().size() == 0) { 00227 if (m == 0 || n == 0) { 00228 std::cerr << "Error in as_graphic: division by 0"; 00229 return; 00230 } 00231 double umin = -1.0+10e-6, umax = -umin; 00232 00233 double ds = (umax - umin) / (double)m; 00234 double dt = (umax - umin) / (double)n; 00235 00236 for (double s = umin; s <= umax; s += ds) { 00237 for (double t = umin; t <= umax; t += dt) { 00238 surf.eval(P,s/(1-s*s), t/(1-t*t)); 00239 //MPoint* p= new MPoint(P.x(),P.y(),P.z()); 00240 mesh->push_back_vertex(P.x(),P.y(),P.z()); 00241 if (s > umin) { 00242 if (t > umin) { 00243 mesh->push_back_face(c-n-1, c-1, c); 00244 } 00245 if (t < umax) { 00246 mesh->push_back_face(c-n, c-n-1, c); 00247 } 00248 } 00249 c++; 00250 } 00251 } 00252 } else { 00253 Point A0 = surf.domain(0), dA0 = (surf.domain(1)-A0)/m; 00254 00255 if (surf.domain().size()==3) { 00256 A1 = surf.domain(2); 00257 dA1 = dA0; 00258 B0=A0; B1=A1; 00259 for (int i=0;i<=(int)m;i++) { 00260 U=B0; 00261 Point dB0= (B1-B0)/m; 00262 for (int j=0;j<=(int)m-i;j++) { 00263 surf.eval(P,U.x(),U.y()); 00264 00265 //MPoint* p= new MPoint(P.x(),P.y(),P.z()); 00266 mesh->push_back_vertex(P.x(),P.y(),P.z()); 00267 if (i> 0) { 00268 if (j>0) mesh->push_back_face(c-m+i-2, c-1, c); 00269 // if (j<(int)m-i) 00270 mesh->push_back_face(c-m+i-1, c-m+i-2, c); 00271 } 00272 c++; 00273 U=U+dB0; 00274 } 00275 B0 = B0 + dA0; 00276 B1 = B1 + dA0; 00277 } 00278 } else if (surf.domain().size()==4) { 00279 A1 = surf.domain(3); 00280 dA1 = (surf.domain(2)-A1)/m; 00281 B0=A0; B1=A1; 00282 for (unsigned i=0;i<=m;i++) { 00283 U=B0; 00284 Point dB0= (B1-B0)/n; 00285 for (unsigned j=0;j<=n;j++) { 00286 surf.eval(P,U.x(),U.y()); 00287 //MPoint* p= new MPoint(P.x(),P.y(),P.z()); 00288 mesh->push_back_vertex(P.x(),P.y(),P.z()); 00289 if (i> 0) { 00290 if (j>0) mesh->push_back_face(c-n-1, c-1, c); 00291 if (j<n) mesh->push_back_face(c-n, c-n-1, c); 00292 } 00293 c++; 00294 U=U+dB0; 00295 } 00296 B0 = B0 + dA0; 00297 B1 = B1 + dA1; 00298 } 00299 } 00300 } 00301 std::cout<< mesh->normal_count()<< std::endl; 00302 }
graphic<C,V>* mmx::shape::as_graphic | ( | const rational_curve< C, V > & | c, | |
unsigned | N = 100 | |||
) | [inline] |
Definition at line 187 of file rational_curve.hpp.
References Edge, GRAPHIC, N, Point, and Scalar.
00187 { 00188 typedef typename curve_pl<C,V>::Point Point; 00189 typedef typename curve_pl<C,V>::Edge Edge; 00190 typedef C Scalar; 00191 00192 00193 GRAPHIC* r = new GRAPHIC(N+1, 2*N,0); 00194 00195 Scalar t=c.tmin(),dt=(c.tmax()-c.tmin())/N; 00196 for(unsigned i=0;i<=N;i++) { 00197 Scalar w=c.denominator()(t); 00198 for(unsigned j=0;j<3;j++) 00199 r->vertices[3*i+j]=c.numerator(j)(t)/w; 00200 t+=dt; 00201 } 00202 00203 for(unsigned i=0;i<N;i++) { 00204 r->edges[2*i]=i; 00205 r->edges[2*i+1]=i+1; 00206 } 00207 return r; 00208 }
use<tpl3d_def,V>::Graphic* mmx::shape::as_graphic | ( | const mesher3d_shape< C, V > & | tp | ) | [inline] |
Definition at line 172 of file mesher3d_shape.hpp.
References as_graphic().
00172 { 00173 return use<tpl3d_def,V>::as_graphic(tp); 00174 }
graphic<C,V>* mmx::shape::as_graphic | ( | const mesher3d_algebraic_curve< C, V > & | tp | ) | [inline] |
Definition at line 318 of file mesher3d_algebraic_curve.hpp.
00318 { 00319 00320 typedef typename SELF::Point Point; 00321 typedef typename SELF::Edge Edge; 00322 typedef graphic<C,V> Graphic; 00323 00324 Graphic* res = new Graphic (tp.nbv(), tp.nbe(), 0); 00325 00326 int c=0; 00327 foreach(Point* p, tp.vertices()) { 00328 res->vertices[3*c] =p->x(); 00329 res->vertices[3*c+1]=p->y(); 00330 res->vertices[3*c+2]=p->z(); 00331 c++; 00332 } 00333 00334 if( tp.nbe()>0){ 00335 int c=0; 00336 foreach(Edge* e, tp.edges()) { 00337 if(e->source()->index()<0) std::cerr<<"Pb in as_graphic"<<std::endl; 00338 res->edges[2*c] = e->source()->index(); 00339 if(e->destination()->index()<0) std::cerr<<"Pb in as_graphic"<<std::endl; 00340 res->edges[2*c+1] = e->destination()->index(); 00341 c++; 00342 } 00343 return res; 00344 } 00345 return NULL; 00346 }
use<graphic_def, algebraic_surface<C,V> ,V>::Output* mmx::shape::as_graphic | ( | const algebraic_surface< C, V > & | s, | |
const BBOX & | bx, | |||
double | e_sm = 0.05 , |
|||
double | e_pr = 0.025 | |||
) | [inline] |
Definition at line 36 of file algebraic_surface_axl.hpp.
References Cell3dAlgebraicSurface.
Referenced by as_graphic().
00037 { 00038 00039 00040 typedef typename use<graphic_def,AlgebraicSurface,V>::Mesher Mesher; 00041 00042 Cell3dAlgebraicSurface* c= new Cell3dAlgebraicSurface(s,bx); 00043 00044 Mesher* msh = new Mesher; 00045 msh->set_smoothness(e_sm); 00046 msh->set_precision(e_pr); 00047 msh->set_input(c); 00048 msh->run(); 00049 00050 return msh->get_output(); 00051 00052 // foreach(Point* p, mesher.output()->vertices()) { 00053 // Point* pt=new Point(p->x(),p->y(),p->z()); 00054 // mesh->push_back_vertex(pt); 00055 // } 00056 00057 // foreach(Mesher::Edge* e, mesher.output()->edges()) { 00058 // mesh->push_back_edge(e->source()->index(), e->destination()->index()); 00059 // } 00060 00061 }
T at | ( | list< T > | l, | |
int | p | |||
) | [inline] |
Definition at line 41 of file list.hpp.
00042 { 00043 typename list<T>::iterator it = l.begin() ; 00044 for(int i = 0 ; i < p ; it++, i++) ; 00045 return *it ; 00046 }
void mmx::shape::bcell3d_split | ( | CELL * | left, | |
CELL * | right, | |||
CELL * | cl, | |||
int | v, | |||
double | s | |||
) | [inline] |
Definition at line 605 of file bcell3d.hpp.
00605 { 00606 if(v==0) { 00607 left = new CELL(*cl); 00608 right = new CELL(*cl); 00609 left->set_xmax(s); 00610 right->set_xmin(s); 00611 cl->connect0(left,right); 00612 left->join0(right); 00613 } else if (v==1) { 00614 left = new CELL(*cl); 00615 right = new CELL(*cl); 00616 left->set_ymax(s); 00617 right->set_ymin(s); 00618 cl->connect1(left,right); 00619 left->join2(right); 00620 } else if (v==2) { 00621 left = new CELL(*cl); 00622 right = new CELL(*cl); 00623 left->set_zmax(s); 00624 right->set_zmin(s); 00625 cl->connect2(left,right); 00626 left->join2(right); 00627 } 00628 }
bool mmx::shape::check_overlap | ( | bcell3d< C, V > * | a, | |
bcell3d< C, V > * | b, | |||
int | v | |||
) | [inline] |
Definition at line 548 of file bcell3d.hpp.
00549 {// check if a,b overlap wrt v-th coordinate 00550 if (v==0) //direction v=0 00551 return !( a->xmax()<= b->xmin() || 00552 b->xmax()<= a->xmin() ); 00553 if (v==1) //direction v=1 00554 return !( a->ymax()<= b->ymin() || 00555 b->ymax()<= a->ymin() ); 00556 if (v==2) //direction v=2 00557 return !( a->zmax()<= b->zmin() || 00558 b->zmax()<= a->zmin() ); 00559 return false; 00560 }
bool mmx::shape::check_overlap | ( | bcell2d< C, V > * | a, | |
bcell2d< C, V > * | b, | |||
int | v | |||
) | [inline] |
Definition at line 403 of file bcell2d.hpp.
Referenced by bcell3d< C, V >::connect0(), bcell2d< C, V >::connect0(), bcell3d< C, V >::connect1(), bcell2d< C, V >::connect1(), and bcell3d< C, V >::connect2().
Definition at line 261 of file point.hpp.
Referenced by crossprod(), topology< C, V >::insert(), and mesher3d_algebraic_curve< C, V >::insert().
mmx::shape::DECLARE_REF_OF | ( | with_color< V > | , | |
with_color< REF_OF(V)> | ||||
) | [inline] |
mmx::shape::DECLARE_REF_OF | ( | floating<> | , | |
MGXK | ||||
) | [inline] |
mmx::shape::DECLARE_REF_OF | ( | rational | , | |
MGXK | ||||
) | [inline] |
mmx::shape::DECLARE_REF_OF | ( | integer | , | |
MGXK | ||||
) | [inline] |
mmx::shape::DECLARE_REF_OF | ( | MGXK | , | |
MGXK | ||||
) | [inline] |
mmx::shape::DECLARE_REF_OF | ( | AXEL | , | |
AXEL | ||||
) | [inline] |
point<C,N,V>::Scalar mmx::shape::distance | ( | const point< C, N, V > & | p1, | |
const point< C, N, V > & | p2 | |||
) | [inline] |
Definition at line 295 of file point.hpp.
References Scalar, and mmx::sqrt().
Referenced by bcell3d_algebraic_curve< C, V >::check_insert().
00295 { 00296 typename SELF::Scalar d=0; 00297 d += (p1.x()-p2.x())*(p1.x()-p2.x()); 00298 d += (p1.y()-p2.y())*(p1.y()-p2.y()); 00299 d += (p1.z()-p2.z())*(p1.z()-p2.z()); 00300 return std::sqrt(d); 00301 }
point<C,N,V>::Scalar mmx::shape::dot | ( | const point< C, N, V > | v1, | |
const point< C, N, V > | v2 | |||
) | [inline] |
Definition at line 280 of file point.hpp.
Referenced by support_function< K >::eval(), Rsc_curve< K >::eval(), support_function< K >::eval_diff(), normal_vector< K >::eval_unit(), normal_vector< K >::middle(), fsvector< K, n >::operator*(), Piecewise_Qsc_curve< K >::Piecewise_Qsc_curve(), Rsc_curve< K >::sample(), Qsc_curve< K >::sample(), Rsc_curve< K >::ssample(), Qsc_curve< K >::ssample(), Rsc_curve< K >::support_size(), and Qsc_curve< K >::support_size().
bool mmx::shape::eq | ( | const shape::ImplicitCurve & | v1, | |
const shape::ImplicitCurve & | v2 | |||
) | [inline] |
Definition at line 30 of file glue_implicit_curve.hpp.
bool mmx::shape::exact_eq | ( | const shape::rational_curve< rational, shape::MGXK > & | v1, | |
const shape::rational_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 39 of file rational_curve_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::point_set< C, 3, shape::with_color< V > > & | v1, | |
const shape::point_set< C, 3, shape::with_color< V > > & | v2 | |||
) | [inline] |
Definition at line 23 of file point_set_with_color_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::point< C > & | v1, | |
const shape::point< C > & | v2 | |||
) | [inline] |
Definition at line 28 of file point_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::color< shape::MGXK > & | v1, | |
const shape::color< shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 25 of file color_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::bounding_box< double, shape::MGXK > & | v1, | |
const shape::bounding_box< double, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 26 of file bounding_box_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::viewer< shape::axel, K > & | v1, | |
const shape::viewer< shape::axel, K > & | v2 | |||
) | [inline] |
Definition at line 21 of file axel_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::algebraic_surface< rational, shape::MGXK > & | v1, | |
const shape::algebraic_surface< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 33 of file algebraic_surface_glue.hpp.
bool mmx::shape::exact_eq | ( | const shape::algebraic_curve< rational, shape::MGXK > & | v1, | |
const shape::algebraic_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 31 of file algebraic_curve_glue.hpp.
unsigned mmx::shape::exact_hash | ( | const shape::rational_curve< rational, shape::MGXK > & | m | ) | [inline] |
unsigned mmx::shape::exact_hash | ( | const shape::point_set< C, 3, shape::with_color< V > > & | m | ) | [inline] |
Definition at line 32 of file point_set_with_color_glue.hpp.
References hash().
00032 {return hash(m);}
unsigned mmx::shape::exact_hash | ( | const shape::point< C > & | m | ) | [inline] |
unsigned mmx::shape::exact_hash | ( | const shape::color< shape::MGXK > & | m | ) | [inline] |
unsigned mmx::shape::exact_hash | ( | const shape::bounding_box< double, shape::MGXK > & | m | ) | [inline] |
unsigned mmx::shape::exact_hash | ( | const shape::viewer< shape::axel, K > & | m | ) | [inline] |
unsigned mmx::shape::exact_hash | ( | const shape::algebraic_surface< rational, shape::MGXK > & | m | ) | [inline] |
Definition at line 42 of file algebraic_surface_glue.hpp.
References hash().
00042 {return hash(m);}
unsigned mmx::shape::exact_hash | ( | const shape::algebraic_curve< rational, shape::MGXK > & | m | ) | [inline] |
bool mmx::shape::exact_neq | ( | const shape::rational_curve< rational, shape::MGXK > & | v1, | |
const shape::rational_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 40 of file rational_curve_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::point_set< C, 3, shape::with_color< V > > & | v1, | |
const shape::point_set< C, 3, shape::with_color< V > > & | v2 | |||
) | [inline] |
Definition at line 24 of file point_set_with_color_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::point< C > & | v1, | |
const shape::point< C > & | v2 | |||
) | [inline] |
Definition at line 29 of file point_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::color< shape::MGXK > & | v1, | |
const shape::color< shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 26 of file color_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::bounding_box< double, shape::MGXK > & | v1, | |
const shape::bounding_box< double, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 27 of file bounding_box_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::viewer< shape::axel, K > & | v1, | |
const shape::viewer< shape::axel, K > & | v2 | |||
) | [inline] |
Definition at line 22 of file axel_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::algebraic_surface< rational, shape::MGXK > & | v1, | |
const shape::algebraic_surface< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 34 of file algebraic_surface_glue.hpp.
bool mmx::shape::exact_neq | ( | const shape::algebraic_curve< rational, shape::MGXK > & | v1, | |
const shape::algebraic_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 32 of file algebraic_curve_glue.hpp.
Seq<typename topology<C,V>::Point *> mmx::shape::extremal | ( | const algebraic_curve< C, V > & | c, | |
const bounding_box< C, V > & | b | |||
) | [inline] |
Definition at line 32 of file algebraic_curve_fcts.hpp.
References solver_implicit< C, V >::extremal(), and Point.
00032 { 00033 typedef typename topology<C,V>::Point Point; 00034 Seq<Point*> res; 00035 solver_implicit<C,V>::extremal(res,c.equation(),b); 00036 return res; 00037 }
void mmx::shape::face_refine | ( | face< C, V, POINT > * | f0, | |
face< C, V, POINT > * | f1, | |||
double | s, | |||
int | v | |||
) | [inline] |
Definition at line 235 of file face.hpp.
References Point.
00235 { 00236 00237 typedef typename SELF::Point Point; 00238 Seq<Point*> l1; 00239 for(unsigned j=0;j<3;j++) 00240 if ( ((*f1->points(j))[v]==s) ) 00241 for(unsigned i=0;i<3;i++) { 00242 if ( ((*f0->points(i))[v]==s) && 00243 (i+1<f0->size()) && 00244 ((*f0->points(i+1))[v]==s) ) { 00245 l1<<(f1->points(j)); 00246 } 00247 if ( (i==(f0->size()-1)) && 00248 ((*f0->points(i))[v]==s) && 00249 ((*f0->points(0))[v]==s) ){ 00250 l1<<(f1->points(j)); 00251 } 00252 } 00253 // std::cout<<"Add "<<l1.size()<<" point(s) to face of size "<<f0->size()<<std::endl; 00254 foreach(Point* p1,l1) f0->insert(p1); 00255 }
syntactic mmx::shape::flatten | ( | const shape::ImplicitCurve & | s | ) |
Definition at line 41 of file glue_implicit_curve.hpp.
References mmx::flatten(), and flatten().
00042 { 00043 using namespace shape; 00044 00045 syntactic res = "ImplicitCurve"; 00046 00047 vector<syntactic> box; 00048 box<<mmx::flatten(s.boundingBox()->xmin()); 00049 box<<mmx::flatten(s.boundingBox()->xmax()); 00050 box<<mmx::flatten(s.boundingBox()->ymin()); 00051 box<<mmx::flatten(s.boundingBox()->ymax()); 00052 00053 return apply(res, mmx::flatten(s.equation()), mmx::flatten(box)); 00054 00055 }
syntactic mmx::shape::flatten | ( | const shape::rational_curve< rational, shape::MGXK > & | s | ) | [inline] |
Definition at line 51 of file rational_curve_glue.hpp.
References mmx::flatten().
00052 { 00053 using namespace shape; 00054 00055 syntactic res = "RationalCurve"; 00056 return res; 00057 00058 if(s.dimension()>1) 00059 return apply(res, mmx::flatten(s.numerator(0)), mmx::flatten(s.numerator(1)), mmx::flatten(s.denominator())); 00060 else 00061 return apply(res, mmx::flatten(s.numerator(0)), mmx::flatten(s.denominator())); 00062 }
syntactic mmx::shape::flatten | ( | const shape::point_set< C, 3, shape::with_color< V > > & | axl | ) | [inline] |
Definition at line 35 of file point_set_with_color_glue.hpp.
syntactic mmx::shape::flatten | ( | const shape::point< C > & | p | ) | [inline] |
Definition at line 40 of file point_glue.hpp.
References flatten().
00040 { 00041 vector<syntactic> v; 00042 v<<mmx::flatten(p[0]); 00043 v<<mmx::flatten(p[1]); 00044 v<<mmx::flatten(p[2]); 00045 00046 return mmx::flatten(v); 00047 }
syntactic mmx::shape::flatten | ( | const shape::color< shape::MGXK > & | s | ) | [inline] |
Definition at line 37 of file color_glue.hpp.
References mmx::flatten().
00037 { 00038 syntactic res = "Color"; 00039 return apply(res, 00040 mmx::flatten(s.r), mmx::flatten(s.g), mmx::flatten(s.b)); 00041 00042 }
syntactic mmx::shape::flatten | ( | const shape::bounding_box< double, shape::MGXK > & | s | ) | [inline] |
Definition at line 38 of file bounding_box_glue.hpp.
References flatten().
00039 { 00040 vector<syntactic> box; 00041 box<<mmx::flatten(s.xmin()); 00042 box<<mmx::flatten(s.xmax()); 00043 box<<mmx::flatten(s.ymin()); 00044 box<<mmx::flatten(s.ymax()); 00045 box<<mmx::flatten(s.zmin()); 00046 box<<mmx::flatten(s.zmax()); 00047 00048 return mmx::flatten(box); 00049 }
syntactic mmx::shape::flatten | ( | const shape::viewer< shape::axel, shape::MGXK > & | axl | ) | [inline] |
Definition at line 34 of file axel_glue.hpp.
syntactic mmx::shape::flatten | ( | const shape::algebraic_surface< rational, shape::MGXK > & | s | ) |
Definition at line 45 of file algebraic_surface_glue.hpp.
References mmx::flatten().
00046 { 00047 using namespace shape; 00048 00049 syntactic res = "AlgebraicSurface"; 00050 00051 return apply(res, mmx::flatten(s.equation())); 00052 00053 }
syntactic mmx::shape::flatten | ( | const shape::algebraic_curve< rational, shape::MGXK > & | s | ) | [inline] |
Definition at line 43 of file algebraic_curve_glue.hpp.
References mmx::flatten().
Referenced by flatten().
00044 { 00045 using namespace shape; 00046 00047 syntactic res = "AlgebraicCurve"; 00048 if(s.nbequation()>1) 00049 return apply(res, mmx::flatten(s.equation(0)), mmx::flatten(s.equation(1))); 00050 else 00051 return apply(res, mmx::flatten(s.equation(0))); 00052 }
unsigned mmx::shape::hash | ( | const shape::ImplicitCurve & | v | ) | [inline] |
Definition at line 33 of file glue_implicit_curve.hpp.
unsigned mmx::shape::hash | ( | const shape::rational_curve< rational, shape::MGXK > & | v | ) | [inline] |
Definition at line 42 of file rational_curve_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::point_set< C, 3, shape::with_color< V > > & | v | ) | [inline] |
Definition at line 26 of file point_set_with_color_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::point< C > & | v | ) | [inline] |
Definition at line 31 of file point_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::color< shape::MGXK > & | v | ) | [inline] |
Definition at line 28 of file color_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::bounding_box< double, shape::MGXK > & | v | ) | [inline] |
Definition at line 29 of file bounding_box_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::viewer< shape::axel, K > & | v | ) | [inline] |
Definition at line 24 of file axel_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::algebraic_surface< rational, shape::MGXK > & | v | ) | [inline] |
Definition at line 36 of file algebraic_surface_glue.hpp.
unsigned mmx::shape::hash | ( | const shape::algebraic_curve< rational, shape::MGXK > & | v | ) | [inline] |
Definition at line 34 of file algebraic_curve_glue.hpp.
Referenced by exact_hash(), and soft_hash().
int mmx::shape::indexof | ( | list< T > | l, | |
T | t | |||
) | [inline] |
Definition at line 33 of file list.hpp.
Referenced by remove().
00034 { 00035 typename list<T>::iterator it = l.begin() ; 00036 for(int i = 0 ; it != l.end() ; it++, i++) 00037 if(*it == t) return i ; 00038 return -1 ; 00039 }
void insert | ( | list< T > & | l, | |
int | p, | |||
T | t | |||
) | [inline] |
Definition at line 48 of file list.hpp.
00049 { 00050 typename list<T>::iterator it = l.begin() ; 00051 for(int i = 1 ; i < p ; i++, it++) ; 00052 l.insert(it, t) ; 00053 }
void mmx::shape::insert_bbx | ( | T * | t, | |
bounding_box< C, V > * | bx, | |||
int | v, | |||
int | s | |||
) | [inline] |
Definition at line 431 of file bounding_box.hpp.
00431 { 00432 typedef typename T::Point Point; 00433 typedef typename T::Edge Edge; 00434 00435 Point 00436 *p0= new Point(bx->xmin(),bx->ymin(),bx->zmin()), 00437 *p1= new Point(bx->xmin(),bx->ymax(),bx->zmin()), 00438 *p2= new Point(bx->xmax(),bx->ymax(),bx->zmin()), 00439 *p3= new Point(bx->xmax(),bx->ymin(),bx->zmin()); 00440 Point 00441 *q0= new Point(bx->xmin(),bx->ymin(),bx->zmax()), 00442 *q1= new Point(bx->xmin(),bx->ymax(),bx->zmax()), 00443 *q2= new Point(bx->xmax(),bx->ymax(),bx->zmax()), 00444 *q3= new Point(bx->xmax(),bx->ymin(),bx->zmax()); 00445 00446 if(v==2) { 00447 if(s==0) { 00448 t->insert(p0);t->insert(p1); t->insert(new Edge(p0,p1)); 00449 t->insert(p1);t->insert(p2); t->insert(new Edge(p1,p2)); 00450 t->insert(p2);t->insert(p3); t->insert(new Edge(p2,p3)); 00451 t->insert(p3);t->insert(p0); t->insert(new Edge(p3,p0)); 00452 } else { 00453 t->insert(q0);t->insert(q1); t->insert(new Edge(q0,q1)); 00454 t->insert(q1);t->insert(q2); t->insert(new Edge(q1,q2)); 00455 t->insert(q2);t->insert(q3); t->insert(new Edge(q2,q3)); 00456 t->insert(q3);t->insert(q0); t->insert(new Edge(q3,q0)); 00457 } 00458 } else if(v==1) { 00459 if(s==0) { 00460 t->insert(p0);t->insert(q0);t->insert(new Edge(p0,q0)); 00461 t->insert(q0);t->insert(q3);t->insert(new Edge(q0,q3)); 00462 t->insert(q3);t->insert(p3);t->insert(new Edge(q3,p3)); 00463 t->insert(p3);t->insert(p0);t->insert(new Edge(p3,p0)); 00464 } else { 00465 t->insert(p1);t->insert(q1);t->insert(new Edge(p1,q1)); 00466 t->insert(q1);t->insert(q2);t->insert(new Edge(q1,q2)); 00467 t->insert(q2);t->insert(p2);t->insert(new Edge(q2,p2)); 00468 t->insert(p2);t->insert(p1);t->insert(new Edge(p2,p1)); 00469 } 00470 } else if (v==0) { 00471 if(s==0) { 00472 t->insert(p0);t->insert(q0);t->insert(new Edge(p0,q0)); 00473 t->insert(q0);t->insert(q1);t->insert(new Edge(q0,q1)); 00474 t->insert(q1);t->insert(p1);t->insert(new Edge(p1,q1)); 00475 t->insert(p1);t->insert(p0);t->insert(new Edge(p1,p0)); 00476 } else { 00477 t->insert(p2);t->insert(q2);t->insert(new Edge(p2,q2)); 00478 t->insert(q2);t->insert(q3);t->insert(new Edge(q2,q3)); 00479 t->insert(q3);t->insert(p3);t->insert(new Edge(p3,q3)); 00480 t->insert(p3);t->insert(p2);t->insert(new Edge(p3,p2)); 00481 } 00482 } 00483 }
void mmx::shape::insert_bbx | ( | T * | t, | |
bounding_box< C, V > * | bx | |||
) | [inline] |
Definition at line 399 of file bounding_box.hpp.
00399 { 00400 typedef typename T::Point Point; 00401 typedef typename T::Edge Edge; 00402 Point 00403 *p0= new Point(bx->xmin(),bx->ymin(),bx->zmin()), 00404 *p1= new Point(bx->xmin(),bx->ymax(),bx->zmin()), 00405 *p2= new Point(bx->xmax(),bx->ymax(),bx->zmin()), 00406 *p3= new Point(bx->xmax(),bx->ymin(),bx->zmin()); 00407 t->insert(p0);t->insert(p1); t->insert(new Edge(p0,p1)); 00408 t->insert(p1);t->insert(p2); t->insert(new Edge(p1,p2)); 00409 t->insert(p2);t->insert(p3); t->insert(new Edge(p2,p3)); 00410 t->insert(p3);t->insert(p0); t->insert(new Edge(p3,p0)); 00411 00412 Point 00413 *q0= new Point(bx->xmin(),bx->ymin(),bx->zmax()), 00414 *q1= new Point(bx->xmin(),bx->ymax(),bx->zmax()), 00415 *q2= new Point(bx->xmax(),bx->ymax(),bx->zmax()), 00416 *q3= new Point(bx->xmax(),bx->ymin(),bx->zmax()); 00417 t->insert(q0);t->insert(q1); t->insert(new Edge(q0,q1)); 00418 t->insert(q1);t->insert(q2); t->insert(new Edge(q1,q2)); 00419 t->insert(q2);t->insert(q3); t->insert(new Edge(q2,q3)); 00420 t->insert(q3);t->insert(q0); t->insert(new Edge(q3,q0)); 00421 00422 t->insert(p0);t->insert(q0);t->insert(new Edge(p0,q0)); 00423 t->insert(p1);t->insert(q1);t->insert(new Edge(p1,q1)); 00424 t->insert(p2);t->insert(q2);t->insert(new Edge(p2,q2)); 00425 t->insert(p3);t->insert(q3);t->insert(new Edge(p3,q3)); 00426 }
shape::edge_set<K>* mmx::shape::intersection | ( | shape::parametric_surface< K > * | srfa, | |
shape::parametric_surface< K > * | srfb | |||
) | [inline] |
Definition at line 17 of file ssi_surface_parametric.hpp.
References Edge, EdgeSet, Point, and ssiqtsl< C, V >::spcs.
Referenced by intersection2d_factory< C, V >::compute().
00018 { 00019 typedef typename EdgeSet::Point Point; 00020 typedef typename EdgeSet::Edge Edge; 00021 typedef typename EdgeSet::PointIterator PointIterator; 00022 00023 ssiqtsl<double> ssi( srfa, srfb, 100 ); 00024 00025 int nbv =ssi.spcs.size(); 00026 00027 EdgeSet * result = new EdgeSet(nbv); 00028 // IntersectionResult * result = new IntersectionResult(IGLGood::E_LINE,ssi.spcs.size(),ssi.spcs.size()); 00029 00030 //std::copy(ssi.spcs.begin(),ssi.spcs.end(),(fxv<double,3>*)(result->glg->vertices)); 00031 PointIterator p=result->begin(); 00032 for ( int i = 0; i < nbv; i ++, p++ ) { 00033 p->setx(ssi.spcs[i][0]); 00034 p->sety(ssi.spcs[i][1]); 00035 p->setz(ssi.spcs[i][2]); 00036 } 00037 00038 Point * p1, * p2; 00039 for ( int i = 0; i < nbv; i+=2) { 00040 p1= &result->vertex(i); 00041 p2= &result->vertex(i+1); 00042 result->push_edge(new Edge(p1,p2)); 00043 } 00044 // result->glg->indexes[i] = i; 00045 00046 return result; 00047 };
bool mmx::shape::is_adjacent | ( | node< CELL > * | n1, | |
node< CELL > * | n2 | |||
) | [inline] |
Definition at line 173 of file node.hpp.
Referenced by use< dualize_def, C, default_env >::dual_face(), use< dualize_def, C, default_2d >::dual_face(), dualize< C, V, Cell >::get_dual_cell(), dualize< C, V, Cell >::get_dual_edge(), and dualize< C, V, Cell >::get_dual_face().
bool mmx::shape::is_adjacent_cell3d | ( | CELL * | c1, | |
CELL * | c2 | |||
) | [inline] |
Definition at line 631 of file bcell3d.hpp.
00631 { 00632 if(c1->xmax()<c2->xmin() || c2->xmax()<c1->xmin()) 00633 return false; 00634 if(c1->ymax()<c2->ymin() || c2->ymax()<c1->ymin()) 00635 return false; 00636 if(c1->zmax()<c2->zmin() || c2->zmax()<c1->zmin()) 00637 return false; 00638 if((c1->xmax()==c2->xmin() || c2->xmax()==c1->xmin())) { 00639 if((c1->ymax()==c2->ymin() || c2->ymax()==c1->ymin()) || 00640 (c1->zmax()==c2->zmin() || c2->zmax()==c1->zmin()) ) 00641 return false; 00642 } else if((c1->ymax()==c2->ymin() || c2->ymax()==c1->ymin()) && 00643 (c1->zmax()==c2->zmin() || c2->zmax()==c1->zmin()) ) 00644 return false; 00645 return true; 00646 }
bool mmx::shape::is_adjacentpl3d | ( | CELL * | c1, | |
CELL * | c2, | |||
CELL * | c3 | |||
) | [inline] |
Definition at line 158 of file cell3d.hpp.
References xMAX, xMIN, yMAX, yMIN, zMAX, and zMIN.
00158 { 00159 00160 if(c1->xmax()< xMIN || xMAX <c1->xmin()) 00161 return false; 00162 if(c1->ymax()<yMIN || yMAX<c1->ymin()) 00163 return false; 00164 if(c1->zmax()<zMIN || zMAX<c1->zmin()) 00165 return false; 00166 00167 if((c1->xmax()==xMIN || xMAX==c1->xmin())) { 00168 if((c1->ymax()==yMIN || yMAX==c1->ymin()) || 00169 (c1->zmax()==zMIN || zMAX==c1->zmin()) ) 00170 return false; 00171 } else if((c1->ymax()==yMIN || yMAX==c1->ymin()) && 00172 (c1->zmax()==zMIN || zMAX==c1->zmin()) ) 00173 return false; 00174 return true; 00175 }
bool mmx::shape::is_adjacentpl3d | ( | CELL * | c1, | |
CELL * | c2 | |||
) | [inline] |
Definition at line 133 of file cell3d.hpp.
00133 { 00134 if(c1->xmax()<c2->xmin() || c2->xmax()<c1->xmin()) 00135 return false; 00136 if(c1->ymax()<c2->ymin() || c2->ymax()<c1->ymin()) 00137 return false; 00138 if(c1->zmax()<c2->zmin() || c2->zmax()<c1->zmin()) 00139 return false; 00140 if((c1->xmax()==c2->xmin() || c2->xmax()==c1->xmin())) { 00141 if((c1->ymax()==c2->ymin() || c2->ymax()==c1->ymin()) || 00142 (c1->zmax()==c2->zmin() || c2->zmax()==c1->zmin()) ) 00143 return false; 00144 } else if((c1->ymax()==c2->ymin() || c2->ymax()==c1->ymin()) && 00145 (c1->zmax()==c2->zmin() || c2->zmax()==c1->zmin()) ) 00146 return false; 00147 return true; 00148 }
double mmx::shape::lower | ( | double | x | ) | [inline] |
Definition at line 32 of file solver_implicit.hpp.
double mmx::shape::lower | ( | const bounding_box< C, V > & | bx, | |
int | v | |||
) | [inline] |
Definition at line 113 of file bounding_box.hpp.
Referenced by solver_implicit< C, V >::common_edge_point(), solver_implicit< C, V >::edge_point(), plot(), and point_on_edge().
void mmx::shape::mc_interpolate | ( | POINT & | p, | |
const POINT & | p1, | |||
const POINT & | p2, | |||
C | valp1, | |||
const C & | valp2, | |||
const C & | iso = 0 | |||
) | [inline] |
Definition at line 17 of file marching_cube.hpp.
References mmx::abs().
Referenced by marching_cube::edge_points(), and marching_square::polygonize().
00018 { 00019 if (abs(iso-valp1) < 0.00001) p=p1; 00020 if (abs(iso-valp2) < 0.00001) p=p2; 00021 if (abs(valp1-valp2) < 0.00001) p=p1; 00022 00023 C mu = (iso - valp1) / (valp2 - valp1); 00024 00025 p.x() = p1.x() + mu * (p2.x() - p1.x()); 00026 p.y() = p1.y() + mu * (p2.y() - p1.y()); 00027 p.z() = p1.z() + mu * (p2.z() - p1.z()); 00028 }
curve_pl<C, REF_OF(V) >* mmx::shape::mesh | ( | parametric_curve< C, V > * | pc | ) | [inline] |
Definition at line 93 of file parametric_curve.hpp.
00093 { 00094 typedef typename PLCurve::Edge Edge; 00095 int n = 500; 00096 PLCurve* res = new PLCurve;//n,n-1,0,0,false); 00097 pc->sample(res->begin(), n); 00098 for ( int i = 0; i < n-1; i ++ ) { 00099 res->push_edge(new Edge(&res->vertex(i),&res->vertex(i+1))); 00100 } 00101 return res; 00102 }
double mmx::shape::mmxmax | ( | double | a, | |
double | b | |||
) | [inline] |
Definition at line 142 of file bounding_box.hpp.
Referenced by bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), bounding_box< C, V >::intersects(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), and bounding_box< C, V >::unites().
double mmx::shape::mmxmin | ( | double | a, | |
double | b | |||
) | [inline] |
Definition at line 137 of file bounding_box.hpp.
Referenced by bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), bounding_box< C, V >::intersects(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), and bounding_box< C, V >::unites().
point<K> mmx::shape::myeval | ( | const polynomial< point< K >, with< MonomialTensor > > & | P, | |
const K & | t | |||
) | [inline] |
Definition at line 50 of file qsc_approximation_fcts.hpp.
References mmx::degree(), and VECT.
Referenced by normal_vector< K >::eval_unit().
bool mmx::shape::neq | ( | const shape::ImplicitCurve & | v1, | |
const shape::ImplicitCurve & | v2 | |||
) | [inline] |
Definition at line 31 of file glue_implicit_curve.hpp.
bool mmx::shape::operator!= | ( | const shape::ImplicitCurve & | v1, | |
const shape::ImplicitCurve & | v2 | |||
) | [inline] |
Definition at line 29 of file glue_implicit_curve.hpp.
bool mmx::shape::operator!= | ( | const shape::rational_curve< rational, shape::MGXK > & | v1, | |
const shape::rational_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 38 of file rational_curve_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::point_set< C, 3, shape::with_color< V > > & | v1, | |
const shape::point_set< C, 3, shape::with_color< V > > & | v2 | |||
) | [inline] |
Definition at line 21 of file point_set_with_color_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::point< C > & | v1, | |
const shape::point< C > & | v2 | |||
) | [inline] |
Definition at line 27 of file point_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::color< shape::MGXK > & | v1, | |
const shape::color< shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 24 of file color_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::bounding_box< double, shape::MGXK > & | v1, | |
const shape::bounding_box< double, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 25 of file bounding_box_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::viewer< shape::axel, K > & | v1, | |
const shape::viewer< shape::axel, K > & | v2 | |||
) | [inline] |
Definition at line 19 of file axel_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::algebraic_surface< rational, shape::MGXK > & | v1, | |
const shape::algebraic_surface< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 32 of file algebraic_surface_glue.hpp.
bool mmx::shape::operator!= | ( | const shape::algebraic_curve< rational, shape::MGXK > & | v1, | |
const shape::algebraic_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 30 of file algebraic_curve_glue.hpp.
std::ostream& mmx::shape::operator<< | ( | std::ostream & | os, | |
const Width & | c | |||
) | [inline] |
viewer<V>& mmx::shape::operator<< | ( | viewer< V > & | out, | |
const voronoi2dimpl< C, V > & | tp | |||
) | [inline] |
Definition at line 683 of file voronoi2dimpl.hpp.
References VoronoiSite2d.
00683 { 00684 00685 foreach(Shape* vs, tp.m_objects) 00686 { 00687 out<<" <point color=\"255 127 0\"> "<< 00688 ((VoronoiSite2d *)vs)->x() << " "<< 00689 ((VoronoiSite2d *)vs)->y() << " "<< 00690 ((VoronoiSite2d *)vs)->z() << "</point>\n"; 00691 } 00692 00693 return out; 00694 }
viewer<V>& mmx::shape::operator<< | ( | viewer< V > & | out, | |
const voronoi2d< C, V > & | tp | |||
) | [inline] |
Definition at line 675 of file voronoi2d.hpp.
References VoronoiSite2d.
00675 { 00676 00677 foreach(Shape* vs, tp.m_objects) 00678 { 00679 out<<" <point color=\"255 127 0\"> "<< 00680 ((VoronoiSite2d *)vs)->x() << " "<< 00681 ((VoronoiSite2d *)vs)->y() << " "<< 00682 ((VoronoiSite2d *)vs)->z() << "</point>\n"; 00683 } 00684 00685 return out; 00686 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const graphic< C, W > & | s | |||
) | [inline] |
Definition at line 220 of file viewer_axel.hpp.
00221 { 00222 os <<"<mesh type=\"off\">\n"; 00223 os <<s.nbv() << " " << s.nbe() << " " << s.nbf() <<"\n"; 00224 00225 for(unsigned i =0;i<s.nbv();i++) 00226 os<<s.vertex_coord(3*i)<<" "<<s.vertex_coord(3*i+1)<<" "<<s.vertex_coord(3*i+2)<<"\n"; 00227 00228 for(unsigned i=0;i<s.nbe() ;i++) 00229 os << s.edge_index(2*i) <<" " << s.edge_index(2*i+1) << "\n"; 00230 00231 for(unsigned i=0;i<s.nbf();i++) 00232 os <<"3 "<< s.face_index(3*i) <<" "<< s.face_index(3*i+1) <<" "<< s.face_index(3*i+2) <<"\n"; 00233 os <<"</mesh>\n"; 00234 00235 return os; 00236 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const polynomial< C, VARIANT > & | mp | |||
) | [inline] |
Definition at line 214 of file viewer_axel.hpp.
References print().
00214 { 00215 print(os.vw, mp.rep(), polynomial<C, VARIANT>::Ring::vars()); return os; 00216 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const typename viewer< axel, V >::Color & | c | |||
) | [inline] |
Definition at line 206 of file viewer_axel.hpp.
References viewer< axel, V >::color.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const bounding_box< double, V > & | bx | |||
) | [inline] |
Definition at line 198 of file viewer_axel.hpp.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
double | s | |||
) | [inline] |
Definition at line 192 of file viewer_axel.hpp.
References viewer< axel, V >::vw.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
int | s | |||
) | [inline] |
Definition at line 187 of file viewer_axel.hpp.
References viewer< axel, V >::vw.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
unsigned | s | |||
) | [inline] |
Definition at line 182 of file viewer_axel.hpp.
References viewer< axel, V >::vw.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const std::string & | s | |||
) | [inline] |
Definition at line 177 of file viewer_axel.hpp.
References viewer< axel, V >::vw.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const char * | s | |||
) | [inline] |
Definition at line 172 of file viewer_axel.hpp.
References viewer< axel, V >::vw.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
char | s | |||
) | [inline] |
Definition at line 167 of file viewer_axel.hpp.
References viewer< axel, V >::vw.
std::ostream& mmx::shape::operator<< | ( | std::ostream & | os, | |
const viewer< axel, V > & | g | |||
) | [inline] |
Definition at line 162 of file viewer_axel.hpp.
References viewer< axel, V >::file.
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | out, | |
tpl3d< C, V > * | tp | |||
) | [inline] |
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | out, | |
const tpl3d< C, V > & | tp | |||
) | [inline] |
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const rational_curve< C, V > & | c | |||
) | [inline] |
Definition at line 171 of file rational_curve.hpp.
References print().
00171 { 00172 os<<"\n <curve type=\"rational\" color=\""<<(int)(255*os.color.r)<<" "<<(int)(255*os.color.g)<<" "<<(int)(255*os.color.b)<<"\">\n"; 00173 os<<" <domain>"<< c.tmin()<<" "<<c.tmax()<<"</domain>\n"; 00174 for(int i=0; i<c.dimension();i++){ 00175 os<<" <polynomial>"; 00176 print(os,c.numerator(i),variables("t")); 00177 os<<"</polynomial>\n"; 00178 } 00179 os<<" <polynomial>"; 00180 print(os,c.denominator(),variables("t")); 00181 os<<"</polynomial>\n"; 00182 os<<" </curve>\n"; 00183 return os; 00184 }
viewer<axel, default_env>& mmx::shape::operator<< | ( | viewer< axel, default_env > & | axl, | |
Qsc_curve< K > | Q | |||
) | [inline] |
Definition at line 600 of file qsc_approximation_fcts.hpp.
References POL.
00600 { 00601 00602 axl<<"<curve type=\"rational\" name=\""<< "QSC" <<"\">\n"; 00603 axl<<"<domain>"<< -20<< " "<< 20 <<"</domain>\n"; 00604 00605 POL x("t^6",variables("t") ); 00606 x[0] = Q.h[0]+Q.h[3]; 00607 x[2] = 5*Q.h[0]+3*Q.h[3]-4*Q.h[1]; 00608 x[3] = 8*Q.h[2]; 00609 x[4] = -5*Q.h[0]+4*Q.h[1]+3*Q.h[3] ; 00610 x[6] = -Q.h[0]+Q.h[3] ; 00611 axl<<"<polynomial variables=\"x0\">"<<x <<"</polynomial>\n"; 00612 x[0] = Q.h[4]+Q.h[2]; 00613 x[1] = -2*Q.h[0]+4*Q.h[1]; 00614 x[2] = 3*Q.h[4]-3*Q.h[2]; 00615 x[3] = 4*Q.h[0]; 00616 x[4] = 3*Q.h[2]+3*Q.h[4]; 00617 x[5] =-2*Q.h[0]+4*Q.h[1] ; 00618 x[6] = -Q.h[2]+Q.h[4] ; 00619 axl<<"<polynomial variables=\"x0\">"<<x<<"</polynomial>\n"; 00620 /* 00621 axl<<"<polynomial variables=\"t\">"<< 00622 -Q.h[0]+Q.h[3] << "*t^6+" << 00623 -5*Q.h[0]+4*Q.h[1]+3*Q.h[3]<< "*t^4+" << 00624 8*Q.h[2]<< "*t^3+" << 00625 5*Q.h[0]+3*Q.h[3]-4*Q.h[1]<< "*t^2+" << 00626 Q.h[0]+Q.h[3]<<"</polynomial>\n"; 00627 axl<<"<polynomial variables=\"t\">"<< 00628 -Q.h[2]+Q.h[4]<< "*t^6+" << 00629 -2*Q.h[0]+4*Q.h[1]<< "*t^5+" << 00630 3*Q.h[2]+3*Q.h[4]<< "*t^4+" << 00631 4*Q.h[0]<< "*t^3+" << 00632 3*Q.h[4]-3*Q.h[2]<< "*t^2+" << 00633 -2*Q.h[0]+4*Q.h[1]<< "*t+" << 00634 Q.h[4]+Q.h[2]<<"</polynomial>\n"; 00635 */ 00636 axl<<"<polynomial variables=\"x0\">0</polynomial>\n";//3rd coordinate 00637 axl<<"<polynomial variables=\"x0\">1+3*x0^2+3*x0^4+x0^6</polynomial>\n"; 00638 axl<< "</curve>\n"; 00639 00640 return axl; 00641 }
viewer<axel, default_env>& mmx::shape::operator<< | ( | viewer< axel, default_env > & | axl, | |
Bezier_curve< K > | Q | |||
) | [inline] |
Definition at line 207 of file qsc_approximation_fcts.hpp.
00207 { 00208 int n=Q.degree(); 00209 00210 axl<<"<curve type=\"bspline\" name=\""<< "Bezier" <<"\">\n"; 00211 axl<<"<dimension>2</dimension>\n"; 00212 axl<<"<number>"<< n+1 <<"</number>\n"; 00213 axl<<"<order>"<< n+1 <<"</order>\n"; 00214 axl<<"<knots>"; 00215 for (int i=0; i!=n+1; i++ ) 00216 axl<< 0 << " "; 00217 for (int i=0; i!=n+1; i++ ) 00218 axl<< 1 << " "; 00219 axl<<"</knots>\n"; 00220 axl<<"<points>\n"; 00221 for (int i=0; i!=n+1; i++ ) 00222 axl<< Q[i].x() << " "<< Q[i].y() <<" "<< Q[i].z() << "\n"; 00223 axl<<"</points>\n"; 00224 axl<< "</curve>\n"; 00225 00226 return axl; 00227 }
std::ostream& mmx::shape::operator<< | ( | std::ostream & | os, | |
Bezier_curve< K > | Q | |||
) | [inline] |
Definition at line 196 of file qsc_approximation_fcts.hpp.
shape::point_set<C,3,shape::with_color<V> >& mmx::shape::operator<< | ( | shape::point_set< C, 3, shape::with_color< V > > & | s, | |
const vector< generic > & | v | |||
) | [inline] |
Definition at line 41 of file point_set_with_color_glue.hpp.
References Point.
00041 { 00042 typedef typename SELF::Point Point; 00043 typedef mmx::shape::color<V> Color; 00044 shape::point<floating<>, 3, shape::MGXK> P= as< shape::point<floating<>, 3, shape::MGXK> >(v[0]); 00045 Point p(as<double>(P[0]),as<double>(P[1]),as<double>(P[2]),as<Color>(v[1])) ; 00046 s.push(p); 00047 return s; 00048 }
viewer<axel,W>& mmx::shape::operator<< | ( | viewer< axel, W > & | out, | |
const point_set< C, N, V > & | ps | |||
) | [inline] |
Definition at line 93 of file point_set.hpp.
References Point.
00093 { 00094 using namespace shape; 00095 00096 typedef typename SELF::Point Point; 00097 typedef typename SELF::PointConstIterator PointIterator; 00098 00099 if(ps.nbv()>0) { 00100 out<<"<pointset size=\""<<ps.nbv()<<"\" color=\"rgb\">\n"; 00101 for(PointIterator p= ps.begin(); p != ps.end(); p++) { 00102 use<point_def,C,V>::print_with_color(out, *p); 00103 out <<"\n"; 00104 } 00105 out<<" </pointset>\n "; 00106 } 00107 return out; 00108 }
viewer<axel,W>& mmx::shape::operator<< | ( | viewer< axel, W > & | os, | |
const point< C, N, V > & | p | |||
) | [inline] |
std::ostream& mmx::shape::operator<< | ( | std::ostream & | os, | |
const point< C, N, V > & | p | |||
) | [inline] |
viewer<V>& mmx::shape::operator<< | ( | viewer< V > & | out, | |
const mesher3d_shape< C, V > & | tp | |||
) | [inline] |
Definition at line 166 of file mesher3d_shape.hpp.
void operator<< | ( | list< T > & | l, | |
T | t | |||
) | [inline] |
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | out, | |
const Graph< T > & | g | |||
) | [inline] |
Definition at line 767 of file graph.hpp.
References Seq< C, R >::size().
00767 { 00768 00769 00770 //Seq<T> vertices; 00771 00772 if (g.nbe()==0) return out; 00773 00774 Seq<T> edges; 00775 g.edge_list(edges); 00776 00777 out<<" <curve type=\"mesh\">\n<vect>\nVECT\n"; 00778 out<<g.nbe()<<" " 00779 //<<g.nbv()<<" " 00780 <<2*g.nbe()<<" " 00781 <<g.nbe()<<"\n"; 00782 00783 for(unsigned i=0; i<g.nbe();i+=2) out<<"2 ";// 00784 out<<"\n"; 00785 00786 // for(unsigned i=0; i<g.nbv();i++) out<<"1 "; 00787 // out<<"\n"; 00788 for(unsigned i=0; i<g.nbe();i+=2) out<<"1 ";// 00789 out<<"\n"; 00790 00791 //g.dfs( vertices ); 00792 //print edges 00793 // unsigned i; 00794 // for (i=1;i<vertices.size(); i++) 00795 // { 00796 // out <<vertices[i-1]->x()<<" "<<vertices[i-1]->y() <<" 0 " 00797 // <<vertices[i]->x() <<" "<<vertices[i]->y()<<" 0 " 00798 // <<"\n"; 00799 // } 00800 // out <<vertices[i-1]->x()<<" "<<vertices[i-1]->y() <<" 0 " 00801 // <<vertices[0]->x() <<" "<<vertices[0]->y()<<" 0 " 00802 // <<"\n"; 00803 00804 00805 //print edges 00806 for (unsigned i=0;i<edges.size(); i+=2) 00807 { 00808 out <<edges[i]->x() <<" "<<edges[i]->y() <<" 0 " 00809 <<edges[i+1]->x()<<" "<<edges[i+1]->y()<<" 0 " 00810 <<"\n"; 00811 } 00812 00813 00814 for(unsigned i=0; i<g.nbe();i++) 00815 out<< "0.314 0.979 1 1\n"; 00816 00817 out<<" </vect>\n </curve>\n"; 00818 00819 return out; 00820 }
viewer<axel,I>& mmx::shape::operator<< | ( | viewer< axel, I > & | out, | |
face< C, V, POINT > * | p | |||
) | [inline] |
Definition at line 210 of file face.hpp.
References viewer< axel, V >::color.
00210 { 00211 using namespace shape; 00212 00213 out<<"<domain type=\"mesh\" name=\"face_" 00214 << p->get_index()<<"\"color=\"" 00215 << out.color.r <<" " 00216 << out.color.g <<" " 00217 << out.color.r <<"\">\n"; 00218 00219 out<<"<off>\n"; 00220 out<<p->size()<<" "<<1<<" "<<0<<"\n"; 00221 //foreach(Point* pt, *p) 00222 for (unsigned i=0;i<p->size();i++) 00223 { 00224 out<<(*p)[i]->x()<<" "<<(*p)[i]->y()<<" "<<(*p)[i]->z()<<"\n"; 00225 } 00226 out<<p->size(); 00227 for (unsigned i=0;i<p->size();i++) 00228 out<<" "<<i; 00229 out<<"\n</off>\n"; 00230 out<<"</domain>\n"; 00231 return out; 00232 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | out, | |
const edge_set< C, V > & | s | |||
) | [inline] |
Definition at line 147 of file edge_set.hpp.
References Edge.
00147 { 00148 typedef typename SELF::Edge Edge; 00149 out<<" <curve type=\"mesh\">\n<vect>\nVECT\n"; 00150 out<<s.nbe()<<" " 00151 <<2*s.nbe()<<" " 00152 <<s.nbe()<<"\n"; 00153 for(unsigned i=0; i<s.nbe();i++) out<<"2 "; 00154 out<<"\n"; 00155 for(unsigned i=0; i<2*s.nbe();i++) out<<"1 "; 00156 out<<"\n"; 00157 foreach(Edge* e, s.edges()) { 00158 out <<e->source()->x()<<" " 00159 <<e->source()->y()<<" " 00160 <<e->source()->z()<<" " 00161 <<e->destination()->x()<<" " 00162 <<e->destination()->y()<<" " 00163 <<e->destination()->z()<<"\n"; 00164 } 00165 for(unsigned i=0; i<s.nbe();i++) 00166 out<< "0.98 0.05 0.05 1\n"; 00167 out<<" </vect>\n </curve>\n"; 00168 return out; 00169 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | out, | |
const curve_pl< C, V > * | s | |||
) | [inline] |
Definition at line 125 of file curve_pl.hpp.
References Edge.
00125 { 00126 typedef typename SELF::Edge Edge; 00127 out<<" <curve type=\"mesh\">\n<vect>\nVECT\n"; 00128 out<<s->nbe()<<" " 00129 <<s->nbv()<<" " 00130 <<s->nbe()<<"\n"; 00131 for(unsigned i=0; i<s->nbe();i++) out<<"2 "; 00132 out<<"\n"; 00133 for(unsigned i=0; i<s->nbv();i++) out<<"1 "; 00134 out<<"\n"; 00135 foreach(Edge* e, s->edges()) { 00136 out <<e->source()->x()<<" " 00137 <<e->source()->y()<<" " 00138 <<e->source()->z()<<" " 00139 <<e->destination()->x()<<" " 00140 <<e->destination()->y()<<" " 00141 <<e->destination()->z()<<"\n"; 00142 } 00143 for(unsigned i=0; i<s->nbe();i++) 00144 out<< "0.314 0.979 1 1\n"; 00145 out<<" </vect>\n </curve>\n"; 00146 return out; 00147 }
curve_pl<C,V>& mmx::shape::operator<< | ( | curve_pl< C, V > & | c, | |
const typename curve_pl< C, V >::Edge & | e | |||
) | [inline] |
Definition at line 118 of file curve_pl.hpp.
std::ostream& mmx::shape::operator<< | ( | std::ostream & | os, | |
const color< K > & | c | |||
) | [inline] |
std::ostream& mmx::shape::operator<< | ( | std::ostream & | stream, | |
const bounding_box< C, V > & | c | |||
) | [inline] |
Definition at line 369 of file bounding_box.hpp.
References bounding_box< C, V >::xmin().
00369 { 00370 if(c.is0D()) 00371 return stream << "[]" ; 00372 else if(c.is1D()) 00373 return stream << "[" << c.xmin() << ", " << c.xmax() << "]" ; 00374 else if(c.is2D()) 00375 return stream << "[" << c.xmin() << ", " << c.xmax() << "] x [" << c.ymin() << ", " << c.ymax() << "]" ; 00376 else if(c.is3d()) 00377 return stream << "[" << c.xmin() << ", " << c.xmax() << "] x [" << c.ymin() << ", " << c.ymax() << "] x [" << c.zmin() << ", " << c.zmax() << "]" ; 00378 else 00379 return stream << "???" ; 00380 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const algebraic_surface< C, V > & | s | |||
) | [inline] |
Definition at line 81 of file algebraic_surface.hpp.
References mmx::print_as_double().
00081 { 00082 os<<"<surface type=\"implicit\" color=\"" 00083 <<int(os.color.r*255)<<" " 00084 <<int(os.color.g*255)<<" " 00085 <<int(os.color.b*255)<<"\">\n"; 00086 os<<" <domain>" 00087 <<os(0,0)<<" "<<os(0,1)<<" " 00088 <<os(1,0)<<" "<<os(1,1)<<" " 00089 <<os(2,0)<<" "<<os(2,1) 00090 <<"</domain>\n"; 00091 os<<" <polynomial>"; 00092 print_as_double(os,s.equation().rep(),variables("x y z")); 00093 os<<"</polynomial>\n"; 00094 os<<"</surface>\n"; 00095 return os; 00096 }
viewer<axel,V>& mmx::shape::operator<< | ( | viewer< axel, V > & | os, | |
const algebraic_curve< C, V > & | c | |||
) | [inline] |
Definition at line 64 of file algebraic_curve_axl.hpp.
References mmx::denominator(), mmx::lcm(), Polynomial, print(), and Scalar.
00064 { 00065 typedef typename AlgebraicCurve::Polynomial Polynomial; 00066 os<<"<curve type=\"algebraic\" color=\""<<(int)(255*os.color.r)<<" "<<(int)(255*os.color.g)<<" "<<(int)(255*os.color.b)<<"\">\n"; 00067 os<<" <domain>" 00068 <<os(0,0)<<" "<<os(0,1)<<" " 00069 <<os(1,0)<<" "<<os(1,1)<<" " 00070 <<os(2,0)<<" "<<os(2,1) 00071 <<"</domain>\n"; 00072 for(unsigned i=0; i<c.equations().size();i++) 00073 { 00074 typename use<numeric_def,V>::Integer m=1; 00075 Polynomial p=c.equation(i); 00076 for(typename Polynomial::const_iterator it=p.begin();it!=p.end();it++){ 00077 m = lcm(denominator(it->coeff()), m); 00078 } 00079 p*=(typename Polynomial::Scalar)m; 00080 os<<(char*)" <polynomial>"; 00081 print(os,p,variables("x y z")); 00082 os<<(char*)"</polynomial>\n"; 00083 } 00084 os<<"</curve>\n"; 00085 return os; 00086 }
bool mmx::shape::operator== | ( | const shape::ImplicitCurve & | v1, | |
const shape::ImplicitCurve & | v2 | |||
) | [inline] |
Definition at line 28 of file glue_implicit_curve.hpp.
bool mmx::shape::operator== | ( | const shape::rational_curve< rational, shape::MGXK > & | v1, | |
const shape::rational_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 37 of file rational_curve_glue.hpp.
bool mmx::shape::operator== | ( | const shape::point_set< C, 3, shape::with_color< V > > & | v1, | |
const shape::point_set< C, 3, shape::with_color< V > > & | v2 | |||
) | [inline] |
Definition at line 20 of file point_set_with_color_glue.hpp.
bool mmx::shape::operator== | ( | const shape::point< C > & | v1, | |
const shape::point< C > & | v2 | |||
) | [inline] |
Definition at line 26 of file point_glue.hpp.
bool mmx::shape::operator== | ( | const shape::color< shape::MGXK > & | v1, | |
const shape::color< shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 23 of file color_glue.hpp.
bool mmx::shape::operator== | ( | const shape::bounding_box< double, shape::MGXK > & | v1, | |
const shape::bounding_box< double, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 24 of file bounding_box_glue.hpp.
bool mmx::shape::operator== | ( | const shape::viewer< shape::axel, K > & | v1, | |
const shape::viewer< shape::axel, K > & | v2 | |||
) | [inline] |
Definition at line 18 of file axel_glue.hpp.
bool mmx::shape::operator== | ( | const shape::algebraic_surface< rational, shape::MGXK > & | v1, | |
const shape::algebraic_surface< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 31 of file algebraic_surface_glue.hpp.
bool mmx::shape::operator== | ( | const shape::algebraic_curve< rational, shape::MGXK > & | v1, | |
const shape::algebraic_curve< rational, shape::MGXK > & | v2 | |||
) | [inline] |
Definition at line 29 of file algebraic_curve_glue.hpp.
point<K> mmx::shape::orth_vect | ( | const point< K > & | a | ) | [inline] |
Definition at line 44 of file qsc_approximation_fcts.hpp.
References VECT.
Referenced by support_function< K >::eval_diff(), normal_vector< K >::middle(), Bezier_curve< K >::normal(), and normal_vector< K >::normal_vector().
00045 { 00046 return VECT(a[1],-a[0]); // for a CCW curve, this is the outer normal. 00047 }
point_set<C,3,V> mmx::shape::plot | ( | const algebraic_curve< C, V > & | c, | |
const bounding_box< C, V > & | bx, | |||
int | N = 500 | |||
) | [inline] |
Definition at line 40 of file algebraic_curve_fcts.hpp.
References mmx::coefficients(), lower(), N, Point, PointSet, Polynomial, Scalar, Seq< C, R >::size(), mmx::solve(), Solver, and upper().
00040 { 00041 00042 typedef double Scalar; 00043 typedef typename PointSet::Point Point; 00044 typedef typename SELF::Polynomial Polynomial; 00045 typedef typename Polynomial::Scalar Rational; 00046 typedef solver<Rational, ContFrac<Approximate> > Solver; 00047 00048 Point pt(0,0,0); 00049 PointSet pts; 00050 00051 Rational a0(bx.xmin()), a1(bx.xmax()), b0(bx.ymin()), b1(bx.ymax()); 00052 Rational dx= (a1-a0)/N; 00053 Seq<Polynomial> sy = coefficients(c.equation(),1); 00054 int d = sy.size()-1; 00055 polynomial<Rational, with<MonomialTensor> > P(0,d); 00056 00057 for (int i=0; i<N;i++,a0+=dx) { 00058 pt[0] = as<Scalar>(a0); 00059 for (int u=0;u<=d;u++) P[u] = sy[u](a0); 00060 typename Solver::Solutions sol; Solver::solve(sol,P,b0,b1); 00061 for(unsigned u=0;u<sol.size();u++) { 00062 pt[1] = as<Scalar>((lower(sol[u])+upper(sol[u]))/2); 00063 pts<<pt; 00064 } 00065 } 00066 Rational dy= (b1-b0)/N; 00067 a0= Rational(bx.xmin()); 00068 Seq<Polynomial> sx = coefficients(c.equation(),0); 00069 d = sx.size()-1; 00070 polynomial<Rational, with<MonomialTensor> > Q(0,d); 00071 for (int i=0; i<N;i++,b0+=dy) { 00072 pt[1] = as<Scalar>(b0); 00073 for (int u=0;u<=d;u++) Q[u] = sx[u]((Rational)0,b0); 00074 typename Solver::Solutions sol; Solver::solve(sol,Q,a0,a1); 00075 for(unsigned u=0;u<sol.size();u++) { 00076 pt[0] = as<Scalar>((lower(sol[u])+upper(sol[u]))/2); 00077 pts<<pt; 00078 } 00079 } 00080 00081 return pts; 00082 }
point<double>* mmx::shape::point_on_edge | ( | const bounding_box< double > & | bx, | |
double | u, | |||
const S1 & | s1, | |||
const S2 & | s2 | |||
) | [inline] |
Definition at line 36 of file solver_implicit.hpp.
References mmx::eval(), lower(), Point, and upper().
void mmx::shape::print | ( | std::ostream & | os, | |
const point< C, N, V > & | p | |||
) | [inline] |
void mmx::shape::print | ( | cell2d_algebraic_curve< C, V > * | cv | ) | [inline] |
Definition at line 132 of file cell2d_algebraic_curve.hpp.
References Point.
00132 { 00133 typedef typename SELF::Point Point; 00134 std::cout <<"\nBox : ["<<cv->xmin()<<","<<cv->xmax()<<"] *" 00135 <<" ["<<cv->ymin()<<","<<cv->ymax()<<"]"; 00136 std::cout <<"\npoint(s) s: "; 00137 foreach(Point* p, cv->s_intersections) 00138 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00139 std::cout << "\npoint(s) e: "; 00140 foreach(Point* p, cv->e_intersections) 00141 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00142 std::cout << "\npoint(s) n: "; 00143 foreach(Point* p, cv->n_intersections) 00144 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00145 std::cout << "\npoint(s) w: "; 00146 foreach(Point* p, cv->w_intersections) 00147 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00148 00149 std::cout<<std::endl; 00150 00151 std::cout << "Point(s) sing: "; 00152 foreach(Point* p, cv->m_special) 00153 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00154 std::cout<<std::endl; 00155 }
void mmx::shape::print | ( | bcell2d_voronoi_site2d< C, V > * | cv | ) | [inline] |
Definition at line 163 of file bcell2d_voronoi_site2d.hpp.
References Point.
00163 { 00164 typedef typename SELF::Point Point; 00165 std::cout << "point(s) b: "; 00166 foreach(Point* p, cv->n_intersections) 00167 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00168 foreach(Point* p, cv->s_intersections) 00169 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00170 foreach(Point* p, cv->w_intersections) 00171 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00172 foreach(Point* p, cv->e_intersections) 00173 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00174 std::cout<<std::endl; 00175 00176 std::cout << "Point(s) s: "; 00177 foreach(Point* p, cv->m_singular) 00178 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00179 std::cout<<std::endl; 00180 }
void mmx::shape::print | ( | bcell2d_voronoi_impl2d< C, V > * | cv | ) | [inline] |
Definition at line 184 of file bcell2d_voronoi_impl2d.hpp.
References Point.
00184 { 00185 typedef typename SELF::Point Point; 00186 std::cout << "point(s) b: "; 00187 foreach(Point* p, cv->n_intersections) 00188 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00189 foreach(Point* p, cv->s_intersections) 00190 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00191 foreach(Point* p, cv->w_intersections) 00192 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00193 foreach(Point* p, cv->e_intersections) 00194 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00195 std::cout<<std::endl; 00196 00197 std::cout << "Point(s) s: "; 00198 foreach(Point* p, cv->m_singular) 00199 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00200 std::cout<<std::endl; 00201 }
void mmx::shape::print | ( | bcell2d_algebraic_curve< C, V > * | cv | ) | [inline] |
Definition at line 224 of file bcell2d_algebraic_curve.hpp.
References Point.
Referenced by bcell2d_voronoi_diagram< C, V >::insert_regular(), bcell2d_algebraic_curve< C, V >::insert_regular(), and operator<<().
00224 { 00225 typedef typename SELF::Point Point; 00226 std::cout <<"\nBox : ["<<cv->xmin()<<","<<cv->xmax()<<"] *" 00227 <<" ["<<cv->ymin()<<","<<cv->ymax()<<"]"; 00228 std::cout <<"\npoint(s) s: "; 00229 foreach(Point* p, cv->s_intersections) 00230 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00231 std::cout << "\npoint(s) e: "; 00232 foreach(Point* p, cv->e_intersections) 00233 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00234 std::cout << "\npoint(s) n: "; 00235 foreach(Point* p, cv->n_intersections) 00236 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00237 std::cout << "\npoint(s) w: "; 00238 foreach(Point* p, cv->w_intersections) 00239 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00240 00241 std::cout<<std::endl; 00242 00243 std::cout << "Point(s) sing: "; 00244 foreach(Point* p, cv->m_singular) 00245 std::cout <<" ["<<p->x()<<" "<<p->y()<<"]"; 00246 std::cout<<std::endl; 00247 }
VIEWER& mmx::shape::print_as_axl | ( | VIEWER & | out, | |
const mesh3d< C, V > & | tp, | |||
unsigned | d = 0 | |||
) | [inline] |
Definition at line 149 of file mesh3d.hpp.
References Edge, Face, and Point.
00149 { 00150 00151 typedef typename SELF::Point Point; 00152 typedef typename SELF::Edge Edge; 00153 typedef typename SELF::Face Face; 00154 00155 if (d<1 && tp.nbv()>0){ 00156 out<<"<pointset color=\"rgb\">\n"; 00157 out<<"<numberofpoints>"<<tp.nbv()<<"</numberofpoints>\n"; 00158 out<<"<points>\n"; 00159 foreach(Point* p, tp.vertices()) { 00160 out <<" "<<p->x()<<" "<<p->y()<<" "<<p->z()<<" 75 75 255\n"; 00161 } 00162 out<<"</points>\n"; 00163 out<<" </pointset>\n "; 00164 } 00165 00166 00167 if (d<2 && tp.nbe()>0){ 00168 out<<" <curve type=\"mesh\">\n<vect>\nVECT\n"; 00169 out<<tp.nbe()<<" " 00170 <<2*tp.nbe()<<" " 00171 <<tp.nbe()<<"\n"; 00172 00173 for(unsigned i=0; i<tp.nbe();i++) out<<"2 "; 00174 out<<"\n"; 00175 for(unsigned i=0; i<tp.nbe();i++) out<<"1 "; 00176 out<<"\n"; 00177 foreach(Edge* e, tp.edges()) { 00178 out <<e->source()->x()<<" "<<e->source()->y()<<" "<<e->source()->z()<<" " 00179 <<e->destination()->x()<<" "<<e->destination()->y()<<" "<<e->destination()->z() 00180 <<"\n"; 00181 } 00182 for(unsigned i=0; i<tp.edges().size();i++) 00183 out<< "0.814 0.279 0.2 1\n"; 00184 out<<" </vect>\n </curve>\n"; 00185 } 00186 00187 if(tp.nbf()>0) { 00188 std::map<Point*,int> index; 00189 int c=0; 00190 foreach(Point* p, tp.vertices()) { 00191 index[p]=c;c++; 00192 } 00193 00194 out<<"<mesh type=\"off\" color=\"255 10 0\">\n"; 00195 out<<c<<" "<<tp.nbf()<<" 0\n"; 00196 foreach(Point* p, tp.vertices()) { 00197 out <<p->x()<<" "<<p->y()<<" "<<p->z()<<" \n"; 00198 } 00199 00200 foreach(Face* f, tp.faces()) { 00201 // out<<"3 "; 00202 out<<f->size()<<" "; 00203 int n=0; 00204 foreach(Point* p, f->points()) 00205 // if (n<3) 00206 { 00207 out <<index[p]<<" "; 00208 n++; 00209 } 00210 out <<"\n"; 00211 } 00212 out<<"</mesh>\n"; 00213 } 00214 00215 return out; 00216 }
viewer<axel,K>& mmx::shape::print_boxes | ( | viewer< axel, K > & | out, | |
Graph< T > | g | |||
) | [inline] |
Definition at line 35 of file semialgebraic_domain2d_axel.hpp.
References CHECK, Graph< T >::dfs(), and Seq< C, R >::size().
00035 { 00036 00037 00038 //Seq<T> vertices; 00039 double xmin,xmax,ymin,ymax; 00040 Seq<T> v; 00041 00042 g.dfs(v); 00043 //g.dfs(& shape::write_ok); 00044 //g.vertex_list(v); 00045 00046 unsigned n=0; 00047 00048 00049 for (unsigned i=0; i<v.size(); i++) 00050 { 00051 CHECK; 00052 n+=4; 00053 } 00054 00055 out<<" <curve type=\"mesh\" color=\"255 255 0\" >\n<vect>\nVECT\n"; 00056 out<<n <<" " 00057 <<2*n <<" " 00058 <<n <<"\n"; 00059 00060 for(unsigned i=0; i<n; i++) out<<"2 ";// 00061 out<<"\n"; 00062 00063 for(unsigned i=0; i<n; i++) out<<"1 ";// 00064 out<<"\n"; 00065 00066 //print edges 00067 for (unsigned i=0; i<v.size(); i++) 00068 { 00069 CHECK; 00070 00071 xmin= v[i]->boundingBox().xmin(); 00072 xmax= v[i]->boundingBox().xmax(); 00073 ymin= v[i]->boundingBox().ymin(); 00074 ymax= v[i]->boundingBox().ymax(); 00075 00076 //std::cout <<xmin <<" "<<xmax <<" "<<ymin <<" "<<ymax <<"\n"; 00077 00078 out <<xmin <<" "<<ymin <<" 0 " 00079 <<xmax <<" "<<ymin <<" 0 " 00080 <<"\n"; 00081 00082 out <<xmax <<" "<<ymin <<" 0 " 00083 <<xmax <<" "<<ymax <<" 0 " 00084 <<"\n"; 00085 00086 out <<xmax <<" "<<ymax <<" 0 " 00087 <<xmin <<" "<<ymax <<" 0 " 00088 <<"\n"; 00089 00090 out <<xmin <<" "<<ymax <<" 0 " 00091 <<xmin <<" "<<ymin <<" 0 " 00092 <<"\n"; 00093 } 00094 00095 00096 for(unsigned i=0; i<n; i++) 00097 out<< "0.314 0.979 1 1\n"; 00098 00099 out<<" </vect>\n </curve>\n"; 00100 00101 return out; 00102 }
void mmx::shape::print_intersections | ( | bcell2d< C, V > * | a | ) | [inline] |
Definition at line 461 of file bcell2d.hpp.
References Point.
00462 { 00463 typedef typename topology<C,V>::Point Point; 00464 std::cout<< "Cell : " << a <<std::endl; 00465 std::cout<< "EAST, " <<a->e_intersections.size() << std::endl; 00466 foreach(Point* cl,a->e_intersections) 00467 std::cout<< cl->x()<<" "<<cl->y() << std::endl; 00468 std::cout<< "WEST, " <<a->w_intersections.size() << std::endl; 00469 foreach(Point* cl,a->w_intersections) 00470 std::cout<< cl->x()<<" "<<cl->y() << std::endl; 00471 std::cout<< "NORTH, " <<a->n_intersections.size() << std::endl; 00472 foreach(Point* cl,a->n_intersections) 00473 std::cout<< cl->x()<<" "<<cl->y() << std::endl; 00474 std::cout<< "SOUTH, " <<a->s_intersections.size() <<std::endl; 00475 foreach(Point* cl,a->s_intersections) 00476 std::cout<< cl->x()<<" "<<cl->y() << std::endl; 00477 }
void mmx::shape::print_neighbors | ( | bcell2d< C, V > * | a | ) | [inline] |
Definition at line 443 of file bcell2d.hpp.
References SELF.
00444 { 00445 std::cout<< "Cell : " << a <<std::endl; 00446 std::cout<< "EAST, " <<a->e_neighbors.size() << std::endl; 00447 foreach(SELF* cl,a->e_neighbors) 00448 std::cout<< cl << std::endl; 00449 std::cout<< "WEST, " <<a->w_neighbors.size() << std::endl; 00450 foreach(SELF* cl,a->w_neighbors) 00451 std::cout<< cl << std::endl; 00452 std::cout<< "NORTH, " <<a->n_neighbors.size() << std::endl; 00453 foreach(SELF* cl,a->n_neighbors) 00454 std::cout<< cl << std::endl; 00455 std::cout<< "SOUTH, " <<a->s_neighbors.size() <<std::endl; 00456 foreach(SELF* cl,a->s_neighbors) 00457 std::cout<< cl << std::endl; 00458 }
Definition at line 137 of file vertex.hpp.
point<C,N,with_idx<V> >::Scalar mmx::shape::read | ( | const point< C, N, with_idx< V > > & | v, | |
unsigned | i | |||
) | [inline] |
Definition at line 126 of file point_with_idx.hpp.
point<C,N, with_color<V> >::Scalar mmx::shape::read | ( | const point< C, N, with_color< V > > & | v, | |
unsigned | i | |||
) | [inline] |
Definition at line 110 of file point_with_color.hpp.
void remove | ( | list< T > & | l, | |
T | t | |||
) | [inline] |
void remove | ( | list< T > & | l, | |
int | p | |||
) | [inline] |
Definition at line 62 of file list.hpp.
00063 { 00064 typename list<T>::iterator it = l.begin() ; 00065 for(int i = 1 ; i < p ; i++, it++) ; 00066 l.erase(it) ; 00067 }
void replace | ( | list< T > & | l, | |
int | p, | |||
T | t | |||
) | [inline] |
Definition at line 55 of file list.hpp.
00056 { 00057 typename list<T>::iterator it = l.begin() ; 00058 for(int i = 1 ; i < p ; i++, it++) ; 00059 *it = t ; 00060 }
shape::edge_set<K>* mmx::shape::selfintersection | ( | const shape::parametric_surface< K > * | surf | ) | [inline] |
Definition at line 50 of file ssi_surface_parametric.hpp.
References Edge, EdgeSet, dsearch< C, V >::lefts, dsearch< C, V >::nbcurves, Point, and dsearch< C, V >::sizes.
00051 { 00052 typedef typename EdgeSet::Point Point; 00053 typedef typename EdgeSet::Edge Edge; 00054 typedef typename EdgeSet::PointIterator PointIterator; 00055 ssi::dsearch<double,K> ds(surf,200,200) ; 00056 00057 int nbv, nbi, a, c, s ; 00058 00059 for(nbv = 0, nbi = 0, c = 0 ; c < (int)ds.nbcurves ; c++) 00060 { 00061 s = ds.sizes[c]; 00062 nbv += s; 00063 nbi += (s-2)*2+2; 00064 } 00065 00066 EdgeSet * result = new EdgeSet(nbv); 00067 // SelfIntersectionResult * result = new SelfIntersectionResult(IGLGood::E_LINE, nbv, nbi, (int)ds.nbcurves); 00068 00069 fxv<double,2> * prms = new fxv<double,2>[nbv]; 00070 00071 a = 0; 00072 for(c = 0 ; c < (int)ds.nbcurves ; c++) { 00073 // result->lprm->params[c].size = (int)ds.sizes[c] ; 00074 // result->rprm->params[c].size = (int)ds.sizes[c] ; 00075 // result->lprm->params[c].prms = new fxv<double, 2>[(int)ds.sizes[c]] ; 00076 // result->rprm->params[c].prms = new fxv<double, 2>[(int)ds.sizes[c]] ; 00077 for(int i = 0 ; i < (int)ds.sizes[c] ; i++, a++) { 00078 prms[a] = ds.lefts[c][i] ; 00079 // result->lprm->params[c].prms[i] = ds.lefts[c][i] ; 00080 // result->rprm->params[c].prms[i] = ds.rights[c][i] ; 00081 } 00082 } 00083 00084 PointIterator p=result->begin(); 00085 for(int i=0; i< nbv; i++,p++) 00086 surf->eval(*p,prms[i][0],prms[i][1]) ; 00087 00088 // int ci = 0 ; 00089 a = 0 ; 00090 Point * p1, * p2; 00091 for(c = 0 ; c < (int)ds.nbcurves ; c++) { 00092 for(int i = 0 ; i < (int)ds.sizes[c]-1 ; i++, a++) { 00093 // result->glg->indexes[ci] = a; 00094 // result->glg->indexes[ci+1] = a+1; 00095 // ci += 2; 00096 p1= &result->vertex(a); 00097 p2= &result->vertex(a+1); 00098 result->push_edge(new Edge(p1,p2)); 00099 } 00100 a++; 00101 } 00102 return result; 00103 }
unsigned mmx::shape::soft_hash | ( | const shape::ImplicitCurve & | m | ) | [inline] |
unsigned mmx::shape::soft_hash | ( | const shape::rational_curve< rational, shape::MGXK > & | m | ) | [inline] |
unsigned mmx::shape::soft_hash | ( | const shape::point_set< C, 3, shape::with_color< V > > & | m | ) | [inline] |
Definition at line 33 of file point_set_with_color_glue.hpp.
References hash().
00033 {return hash(m);}
unsigned mmx::shape::soft_hash | ( | const shape::point< C > & | m | ) | [inline] |
unsigned mmx::shape::soft_hash | ( | const shape::color< shape::MGXK > & | m | ) | [inline] |
unsigned mmx::shape::soft_hash | ( | const shape::bounding_box< double, shape::MGXK > & | m | ) | [inline] |
unsigned mmx::shape::soft_hash | ( | const shape::viewer< shape::axel, K > & | m | ) | [inline] |
unsigned mmx::shape::soft_hash | ( | const shape::algebraic_surface< rational, shape::MGXK > & | m | ) | [inline] |
Definition at line 43 of file algebraic_surface_glue.hpp.
References hash().
00043 {return hash(m);}
unsigned mmx::shape::soft_hash | ( | const shape::algebraic_curve< rational, shape::MGXK > & | m | ) | [inline] |
double mmx::shape::upper | ( | double | x | ) | [inline] |
Definition at line 33 of file solver_implicit.hpp.
double mmx::shape::upper | ( | const bounding_box< C, V > & | bx, | |
int | v | |||
) | [inline] |
Definition at line 125 of file bounding_box.hpp.
Referenced by solver_implicit< C, V >::common_edge_point(), solver_implicit< C, V >::edge_point(), plot(), point_on_edge(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), and bcell2d_voronoi_diagram< C, V >::subdivide().
void mmx::shape::write_edge | ( | gNode< T > * | v | ) | [inline] |
void mmx::shape::write_ok | ( | gNode< T > * | v | ) | [inline] |
Definition at line 25 of file semialgebraic_domain2d_axel.hpp.
{ 0x0 , 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00, 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90, 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30, 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0, 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60, 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0, 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950, 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0, 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0, 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650, 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0, 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460, 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0, 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230, 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190, 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x0}
Definition at line 6 of file marching_cube.cpp.
Referenced by marching_cube::centralise(), use< mesher3d_def, C, V >::edge_points(), marching_cube::edge_points(), and marching_cube::polygonise().
Definition at line 40 of file marching_cube.cpp.
Referenced by marching_cube::centralise(), marching_cube::polygonise(), and marching_cube::polygonize().
int N |
Definition at line 48 of file point_with_color.hpp.
Referenced by as_graphic(), plot(), and quad_supp_func< K >::quad_supp_func().