#include <mesher3d_algebraic_curve.hpp>
Definition at line 71 of file mesher3d_algebraic_curve.hpp.
typedef Cell::BoundingBox BoundingBox |
Definition at line 84 of file mesher3d_algebraic_curve.hpp.
typedef bcell3d_algebraic_curve<C,V> Cell |
Definition at line 78 of file mesher3d_algebraic_curve.hpp.
Definition at line 77 of file mesher3d_algebraic_curve.hpp.
Definition at line 75 of file mesher3d_algebraic_curve.hpp.
Definition at line 76 of file mesher3d_algebraic_curve.hpp.
Definition at line 82 of file mesher3d_algebraic_curve.hpp.
Definition at line 81 of file mesher3d_algebraic_curve.hpp.
Definition at line 74 of file mesher3d_algebraic_curve.hpp.
Definition at line 79 of file mesher3d_algebraic_curve.hpp.
mesher3d_algebraic_curve | ( | const BoundingBox & | bx | ) | [inline] |
Definition at line 86 of file mesher3d_algebraic_curve.hpp.
00087 : m_maxprec(0.1), m_minprec(0.01), m_bbx(bx) 00088 { 00089 m_tree = new Kdtree; 00090 }
~mesher3d_algebraic_curve | ( | void | ) | [inline] |
Definition at line 92 of file mesher3d_algebraic_curve.hpp.
void clear | ( | void | ) | [inline, virtual] |
Remove all vertices, edges and faces from the 3D topology.
Definition at line 310 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::resize().
unsigned count | ( | void | ) | [inline] |
Definition at line 101 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::size().
Definition at line 110 of file mesher3d_algebraic_curve.hpp.
Definition at line 109 of file mesher3d_algebraic_curve.hpp.
virtual Face* faces | ( | int | i | ) | [inline, virtual] |
Definition at line 115 of file mesher3d_algebraic_curve.hpp.
Definition at line 112 of file mesher3d_algebraic_curve.hpp.
Definition at line 111 of file mesher3d_algebraic_curve.hpp.
void insert | ( | BoundingBox * | bx, | |
bool | cross = false | |||
) | [inline, virtual] |
Definition at line 160 of file mesher3d_algebraic_curve.hpp.
References mmx::shape::cross(), mesher3d_algebraic_curve< C, V >::insert(), 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().
00160 { 00161 Point 00162 *p0= new Point(bx->xmin(),bx->ymin(),bx->zmin()), 00163 *p1= new Point(bx->xmin(),bx->ymax(),bx->zmin()), 00164 *p2= new Point(bx->xmax(),bx->ymax(),bx->zmin()), 00165 *p3= new Point(bx->xmax(),bx->ymin(),bx->zmin()); 00166 00167 this->insert(p0);this->insert(p1); this->insert(new Edge(p0,p1)); 00168 this->insert(p1);this->insert(p2); this->insert(new Edge(p1,p2)); 00169 this->insert(p2);this->insert(p3); this->insert(new Edge(p2,p3)); 00170 this->insert(p3);this->insert(p0); this->insert(new Edge(p3,p0)); 00171 00172 Point 00173 *q0= new Point(bx->xmin(),bx->ymin(),bx->zmax()), 00174 *q1= new Point(bx->xmin(),bx->ymax(),bx->zmax()), 00175 *q2= new Point(bx->xmax(),bx->ymax(),bx->zmax()), 00176 *q3= new Point(bx->xmax(),bx->ymin(),bx->zmax()); 00177 00178 this->insert(q0);this->insert(q1); this->insert(new Edge(q0,q1)); 00179 this->insert(q1);this->insert(q2); this->insert(new Edge(q1,q2)); 00180 this->insert(q2);this->insert(q3); this->insert(new Edge(q2,q3)); 00181 this->insert(q3);this->insert(q0); this->insert(new Edge(q3,q0)); 00182 00183 this->insert(p0);this->insert(q0);this->insert(new Edge(p0,q0)); 00184 this->insert(p1);this->insert(q1);this->insert(new Edge(p1,q1)); 00185 this->insert(p2);this->insert(q2);this->insert(new Edge(p2,q2)); 00186 this->insert(p3);this->insert(q3);this->insert(new Edge(p3,q3)); 00187 00188 if(cross) { 00189 Point 00190 *r0= new Point(bx->xmin(),bx->ymin(),bx->zmax()), 00191 *r1= new Point(bx->xmin(),bx->ymax(),bx->zmax()), 00192 *r2= new Point(bx->xmax(),bx->ymax(),bx->zmax()), 00193 *r3= new Point(bx->xmax(),bx->ymin(),bx->zmax()); 00194 00195 this->insert(r0);this->insert(r2);this->insert(new Edge(r0,r2)); 00196 this->insert(r1);this->insert(r3);this->insert(new Edge(r1,r3)); 00197 } 00198 }
void insert | ( | Face * | f | ) | [inline, virtual] |
Definition at line 292 of file mesher3d_algebraic_curve.hpp.
void insert | ( | Edge * | e | ) | [inline, virtual] |
Definition at line 286 of file mesher3d_algebraic_curve.hpp.
void insert | ( | Point * | p | ) | [inline, virtual] |
Definition at line 281 of file mesher3d_algebraic_curve.hpp.
Referenced by mesher3d_algebraic_curve< C, V >::insert().
bool insert_regular | ( | Cell * | bcell | ) | [inline] |
Definition at line 253 of file mesher3d_algebraic_curve.hpp.
References bcell3d_algebraic_curve< C, V >::inserted_regular_in().
Referenced by mesher3d_algebraic_curve< C, V >::run().
void insert_singular | ( | BoundingBox * | bx | ) | [inline, virtual] |
Definition at line 297 of file mesher3d_algebraic_curve.hpp.
void insert_singular | ( | Point * | ) | [inline, virtual] |
Definition at line 304 of file mesher3d_algebraic_curve.hpp.
bool is_regular | ( | Cell * | bcell | ) | [inline] |
Definition at line 248 of file mesher3d_algebraic_curve.hpp.
References bcell3d_algebraic_curve< C, V >::is_regular().
Referenced by mesher3d_algebraic_curve< C, V >::run().
int nbe | ( | void | ) | const [inline] |
Definition at line 104 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::size().
int nbf | ( | ) | const [inline] |
Definition at line 105 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::size().
int nbv | ( | ) | const [inline] |
Definition at line 103 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::size().
void operator<< | ( | Shape * | s | ) | [inline] |
Definition at line 100 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::push_back().
bool post_process | ( | Cell * | bcell | ) | [inline] |
Definition at line 258 of file mesher3d_algebraic_curve.hpp.
void push_back | ( | Shape * | s | ) | [inline] |
Definition at line 99 of file mesher3d_algebraic_curve.hpp.
References Seq< C, R >::push_back().
void run | ( | void | ) | [inline] |
Definition at line 201 of file mesher3d_algebraic_curve.hpp.
References AlgebraicCurve, Seq< C, R >::begin(), Cell3dAlgebraicCurve, node< _CELL >::get_cell(), mesher3d_algebraic_curve< C, V >::insert_regular(), bcell3d_algebraic_curve< C, V >::is_active(), mesher3d_algebraic_curve< C, V >::is_regular(), kdtree< CELL >::root(), node< _CELL >::set_cell(), mesher3d_algebraic_curve< C, V >::sing_process(), bounding_box< C, V >::size(), Seq< C, R >::size(), mesher3d_algebraic_curve< C, V >::stopFlag, and mesher3d_algebraic_curve< C, V >::subdivide().
00201 { 00202 //no singularities are detected in the topology of the space algebraic curve. stopFlag is set to false(0) 00203 stopFlag=0; 00204 Node* root = m_tree->root(); 00205 00206 if(this->m_objects.size()==0) return; 00207 00208 AlgebraicCurve* ic = dynamic_cast<AlgebraicCurve *>(*(this->m_objects.begin())); 00209 Cell* cl = new Cell3dAlgebraicCurve(ic, this->m_bbx); 00210 00211 // foreach(Shape* s, m_objects) 00212 // cl->push_back(SurfaceCellFactory::instance()->create(s,m_bbx)) ; 00213 00214 root->set_cell(cl); 00215 m_nodes.push_back(root) ; 00216 00217 double maxsz = this->m_maxprec*m_tree->root()->get_cell()->size(); 00218 double minsz = this->m_minprec*m_tree->root()->get_cell()->size(); 00219 00220 while(!m_nodes.empty()) { 00221 Node* node = m_nodes.front() ; 00222 Cell* cl = node->get_cell() ; 00223 00224 if(cl->is_active()) { 00225 if(cl->size() > maxsz) 00226 { 00227 this->subdivide(cl, node) ; 00228 } 00229 else if(this->is_regular(cl)) 00230 { 00231 this->insert_regular(cl) ; 00232 } 00233 else if(cl->size() > minsz ) 00234 { 00235 this->subdivide(cl, node) ; 00236 } 00237 else { 00238 this->sing_process(cl); 00239 //singularities are detected in the topology of the space algebraic curve. stopFlag is set to true(1) 00240 stopFlag=1; 00241 } 00242 } 00243 m_nodes.pop_front() ; 00244 } 00245 }
void set_precision | ( | double | eps | ) | [inline] |
Definition at line 96 of file mesher3d_algebraic_curve.hpp.
void set_smoothness | ( | double | eps | ) | [inline] |
Definition at line 97 of file mesher3d_algebraic_curve.hpp.
typedef SHAPE_OF | ( | V | ) |
bool sing_process | ( | Cell * | bcell | ) | [inline] |
Definition at line 263 of file mesher3d_algebraic_curve.hpp.
References bcell3d_algebraic_curve< C, V >::inserted_singular_in().
Referenced by mesher3d_algebraic_curve< C, V >::run().
Definition at line 269 of file mesher3d_algebraic_curve.hpp.
References node< _CELL >::LEFT, mmx::ssi::left(), node< _CELL >::m_left, node< _CELL >::m_right, node< _CELL >::RIGHT, mmx::ssi::right(), and bcell3d_algebraic_curve< C, V >::subdivide().
Referenced by mesher3d_algebraic_curve< C, V >::run().
00269 { 00270 00271 int v = 0; 00272 Cell * left, * right; 00273 v = cl->subdivide(left, right) ; 00274 node->m_left = new Node(node, left, Node::LEFT , v) ; m_nodes << node->m_left ; 00275 node->m_right= new Node(node, right, Node::RIGHT, v) ; m_nodes << node->m_right; 00276 00277 return true ; 00278 }
const Kdtree* tree | ( | void | ) | const [inline] |
Definition at line 131 of file mesher3d_algebraic_curve.hpp.
virtual Point* vertices | ( | int | i | ) | [inline, virtual] |
Definition at line 114 of file mesher3d_algebraic_curve.hpp.
Definition at line 108 of file mesher3d_algebraic_curve.hpp.
Definition at line 107 of file mesher3d_algebraic_curve.hpp.
int stopFlag |
Definition at line 141 of file mesher3d_algebraic_curve.hpp.
Referenced by mesher3d_algebraic_curve< C, V >::run().