#include <mesher3d_dual.hpp>
Definition at line 27 of file mesher3d_dual.hpp.
typedef Output::Edge Edge |
Reimplemented from mesher3d< C, V, Cell >.
Definition at line 33 of file mesher3d_dual.hpp.
typedef Output::Face Face |
Definition at line 34 of file mesher3d_dual.hpp.
typedef Cell Input |
Reimplemented from mesher3d< C, V, Cell >.
Definition at line 30 of file mesher3d_dual.hpp.
Reimplemented from mesher3d< C, V, Cell >.
Definition at line 31 of file mesher3d_dual.hpp.
typedef Output::Point Point |
Reimplemented from mesher3d< C, V, Cell >.
Definition at line 32 of file mesher3d_dual.hpp.
typedef subdivision<C,V,Cell> Subdivisor [inherited] |
Definition at line 69 of file mesher3d.hpp.
typedef use<topology3d_def,C,V> Topology [inherited] |
Definition at line 73 of file mesher3d.hpp.
mesher3d_dual | ( | double | e1 = 0.1 , |
|
double | e2 = 0.01 | |||
) | [inline] |
Definition at line 60 of file mesher3d_dual.hpp.
~mesher3d_dual | ( | void | ) | [inline] |
Definition at line 66 of file mesher3d_dual.hpp.
void clear | ( | void | ) | [inline, inherited] |
Definition at line 309 of file mesher3d.hpp.
Input* get_input | ( | void | ) | [inline, inherited] |
Definition at line 90 of file mesher3d.hpp.
Referenced by mesher3d< C, V, Cell >::run().
Output* get_output | ( | void | ) | [inline, inherited] |
Definition at line 91 of file mesher3d.hpp.
Referenced by mesher3d< C, V, Cell >::run().
double get_precision | ( | void | ) | [inline, inherited] |
Definition at line 87 of file mesher3d.hpp.
Referenced by mesher3d_dual< C, V, Cell >::run().
double get_smoothness | ( | void | ) | [inline, inherited] |
Definition at line 86 of file mesher3d.hpp.
Referenced by mesher3d_dual< C, V, Cell >::run().
void run | ( | void | ) | [inline] |
Reimplemented from mesher3d< C, V, Cell >.
Definition at line 70 of file mesher3d_dual.hpp.
References Cell, marching_cube::centralise(), mesher3d< C, V, Cell >::get_precision(), mesher3d< C, V, Cell >::get_smoothness(), marching_cube::polygonise(), subdivision< C, V, Cell >::run(), and subdivision< C, V, Cell >::set_input().
00070 { 00071 00072 typedef subdivision<C,V,Cell> Subdivisor; 00073 Subdivisor* sbd = new Subdivisor(this->get_smoothness(),this->get_precision()); 00074 sbd->set_input(this->input()); 00075 sbd->run(); 00076 00077 std::cout<< "leaves = "<< sbd->output()->m_leaves.size()<<"\n"; 00078 00079 typedef dualize<C,V,Cell> Dualize; 00080 Dualize* dl = new Dualize; 00081 dl->set_input(sbd->output()); 00082 dl->run(); 00083 00084 //this->get_adjacency(); 00085 std::cout<< "Dual edges= "<< dl->output()->m_edges.size()/2<<"\n"; 00086 std::cout<< "Dual faces= "<< dl->output()->m_faces.size()/4<<"\n"; 00087 00088 bool ctr = false; 00089 if (ctr) foreach(Cell * cl, sbd->output()->m_leaves) { 00090 marching_cube::centralise(*cl, *cl); 00091 foreach(Point* p, cl->m_points) this->output()->insert(p); 00092 00093 //marching_cube::polygonise(*cl, *cl); 00094 } 00095 00096 if (ctr) for(unsigned i=0; i< dl->output()->m_edges.size();i+=2){ 00097 Edge* e=new Edge(dl->output()->m_edges[i]->get_cell()->m_points[0], 00098 dl->output()->m_edges[i+1]->get_cell()->m_points[0]); 00099 this->output()->insert(e); 00100 } 00101 00102 if (ctr) 00103 for(unsigned i=0; i< dl->output()->m_faces.size();i+=4){ 00104 Face* f=new Face; 00105 f->insert(dl->output()->m_faces[i]->get_cell()->m_points[0]); 00106 f->insert(dl->output()->m_faces[i+1]->get_cell()->m_points[0]); 00107 f->insert(dl->output()->m_faces[i+2]->get_cell()->m_points[0]); 00108 this->output()->insert(f); 00109 } 00110 00111 if (!ctr) 00112 foreach(Cell * cl, sbd->output()->m_leaves) { 00113 marching_cube::polygonise(*cl, *cl); 00114 foreach(Point* p, cl->m_points) this->output()->insert(p); 00115 foreach(Face* f, cl->m_faces) this->output()->insert(f); 00116 std::cout<<"MC"<<std::endl; 00117 } 00118 00119 }
void set_input | ( | Cell * | cl | ) | [inline, inherited] |
Definition at line 81 of file mesher3d.hpp.
void set_precision | ( | double | e | ) | [inline, inherited] |
Definition at line 84 of file mesher3d.hpp.
void set_smoothness | ( | double | e | ) | [inline, inherited] |
Definition at line 83 of file mesher3d.hpp.