#include <mesher3d_shape.hpp>
Definition at line 29 of file mesher3d_shape.hpp.
Definition at line 44 of file mesher3d_shape.hpp.
typedef Cell::BoundingBox BoundingBox |
Reimplemented from subdivision< C, with_tpl3d< V >, bcell3d< C, V > >.
Definition at line 46 of file mesher3d_shape.hpp.
Definition at line 43 of file mesher3d_shape.hpp.
typedef bcell3d_factory<C,V> Cell3dFactory |
Definition at line 37 of file mesher3d_shape.hpp.
typedef Topology::Edge Edge |
Definition at line 40 of file mesher3d_shape.hpp.
typedef Topology::Face Face |
Definition at line 41 of file mesher3d_shape.hpp.
Definition at line 103 of file subdivision.hpp.
Definition at line 49 of file mesher3d_shape.hpp.
Reimplemented from subdivision< C, with_tpl3d< V >, bcell3d< C, V > >.
Definition at line 48 of file mesher3d_shape.hpp.
typedef kdtree_cell<bcell3d< C, V > > Output [inherited] |
Definition at line 104 of file subdivision.hpp.
typedef Topology::Point Point |
Definition at line 39 of file mesher3d_shape.hpp.
typedef C Scalar [inherited] |
Definition at line 99 of file subdivision.hpp.
typedef subdivision<C, with_tpl3d<V>, bcell3d<C,V> > Subdivision |
Definition at line 33 of file mesher3d_shape.hpp.
Definition at line 45 of file mesher3d_shape.hpp.
Definition at line 32 of file mesher3d_shape.hpp.
typedef use<subdivision_def,V> VRT |
Definition at line 34 of file mesher3d_shape.hpp.
mesher3d_shape | ( | double | e1 = 0.1 , |
|
double | e2 = 0.01 | |||
) | [inline] |
Definition at line 69 of file mesher3d_shape.hpp.
00069 : Subdivision(e1, e2) { 00070 }
mesher3d_shape | ( | Shape * | s, | |
const BoundingBox & | bx, | |||
double | e1 = 0.1 , |
|||
double | e2 = 0.01 | |||
) | [inline] |
Definition at line 72 of file mesher3d_shape.hpp.
References bcell3d_factory< C, V >::instance(), and mesher3d_shape< C, V >::set_input().
00073 : Subdivision(e1, e2) { 00074 this->set_input(Cell3dFactory::instance()->create(s0,bx0)); 00075 }
~mesher3d_shape | ( | void | ) | [inline] |
Definition at line 77 of file mesher3d_shape.hpp.
void clear | ( | void | ) | [inline, virtual] |
Reimplemented from subdivision< C, with_tpl3d< V >, bcell3d< C, V > >.
Definition at line 159 of file mesher3d_shape.hpp.
Input* get_input | ( | void | ) | [inline, inherited] |
Definition at line 113 of file subdivision.hpp.
Output* get_output | ( | void | ) | [inline, inherited] |
Definition at line 115 of file subdivision.hpp.
double get_precision | ( | void | ) | const [inline, inherited] |
Definition at line 120 of file subdivision.hpp.
References subdivision< C, V, Cell >::m_minprec.
Referenced by mesher3d_shape< C, V >::run().
00120 { return m_minprec ; }
double get_smoothness | ( | void | ) | const [inline, inherited] |
Definition at line 121 of file subdivision.hpp.
References subdivision< C, V, Cell >::m_maxprec.
Referenced by mesher3d_shape< C, V >::run().
00121 { return m_maxprec ; }
bool insert_regular | ( | Cell * | bcell | ) | [inline] |
Definition at line 97 of file mesher3d_shape.hpp.
References bcell3d< C, V >::insert_regular().
Referenced by mesher3d_shape< C, V >::run().
bool is_regular | ( | Cell * | bcell | ) | [inline] |
Definition at line 92 of file mesher3d_shape.hpp.
References bcell3d< C, V >::is_regular().
typedef REF_OF | ( | V | ) |
void run | ( | void | ) | [inline] |
Reimplemented from subdivision< C, with_tpl3d< V >, bcell3d< C, V > >.
Definition at line 117 of file mesher3d_shape.hpp.
References Cell3d, node< _CELL >::get_cell(), subdivision< C, with_tpl3d< V >, bcell3d< C, V > >::get_precision(), subdivision< C, with_tpl3d< V >, bcell3d< C, V > >::get_smoothness(), mesher3d_shape< C, V >::insert_regular(), bcell3d< C, V >::is_active(), bcell3d< C, V >::is_regular(), bounding_box< C, V >::size(), and mesher3d_shape< C, V >::subdivide().
00117 { 00118 //this->Subdivision::run(); 00119 double maxsz = this->get_smoothness()*this->output()->root()->get_cell()->size(); 00120 double minsz = this->get_precision()*this->output()->root()->get_cell()->size(); 00121 00122 std::cout<<maxsz<<" "<<minsz<<std::endl; 00123 while(!this->output()->m_nodes.empty()) { 00124 Node* node = this->output()->m_nodes.front() ; 00125 Cell* cl = node->get_cell() ; 00126 00127 if(cl->is_active()) { 00128 if(cl->size() > maxsz) 00129 { 00130 this->subdivide(cl, node) ; 00131 } 00132 else if(cl->is_regular()) 00133 { 00134 this->insert_regular(cl) ; 00135 } 00136 else if(cl->size() > minsz ) 00137 { 00138 // std::cout<<"subdivide not regular"<<std::endl; 00139 this->subdivide(cl, node) ; 00140 } 00141 else { 00142 // std::cout<<"insert singular"<<std::endl; 00143 //this->sing_process(cl); 00144 } 00145 } 00146 this->output()->m_nodes.pop_front() ; 00147 } 00148 00149 foreach(Cell * cl, this->output()->m_leaves) { 00150 dynamic_cast<Cell3d*>(cl)->topology_regular(this); 00151 //foreach(Point* p, cl->m_points) this->insert(p); 00152 //foreach(Face* f, cl->m_faces) this->insert(f); 00153 } 00154 00155 std::cout<< "leaves="<< this->output()->m_leaves.size()<<"\n"; 00156 00157 }
void set_input | ( | bcell3d< C, V > * | bx | ) | [inherited] |
void set_input | ( | Shape * | s, | |
const BoundingBox & | bx | |||
) | [inline] |
Definition at line 86 of file mesher3d_shape.hpp.
References bcell3d_factory< C, V >::instance(), and mesher3d_shape< C, V >::set_input().
00087 { 00088 this->set_input(Cell3dFactory::instance()->create(s0,bx0)); 00089 }
void set_input | ( | Cell * | cl | ) | [inline] |
Definition at line 81 of file mesher3d_shape.hpp.
Referenced by mesher3d_shape< C, V >::mesher3d_shape(), and mesher3d_shape< C, V >::set_input().
00082 { 00083 this->set_input(cl); 00084 }
void set_precision | ( | double | ) | [inherited] |
void set_smoothness | ( | double | ) | [inherited] |
typedef SHAPE_OF | ( | V | ) |
bool sing_process | ( | Cell * | bcell | ) | [inline] |
Definition at line 104 of file mesher3d_shape.hpp.
References bcell3d< C, V >::insert_singular().
Definition at line 109 of file mesher3d_shape.hpp.
References node< _CELL >::LEFT, mmx::ssi::left(), node< _CELL >::m_left, node< _CELL >::m_right, node< _CELL >::RIGHT, mmx::ssi::right(), and cell3d< C, V >::subdivide().
Referenced by mesher3d_shape< C, V >::run().
00109 { 00110 Cell * left, * right; 00111 int v = cl->subdivide(left, right) ; 00112 node->m_left = new Node(node, left, Node::LEFT , v) ; this->output()->m_nodes << node->m_left ; 00113 node->m_right= new Node(node, right, Node::RIGHT, v) ; this->output()->m_nodes << node->m_right; 00114 return true ; 00115 }
double m_maxprec [inherited] |
Definition at line 129 of file subdivision.hpp.
double m_minprec [inherited] |
Definition at line 130 of file subdivision.hpp.