#include <polygonizer.hpp>
Definition at line 25 of file polygonizer.hpp.
typedef use<mesh3d_def,C,V>::Edge Edge |
Definition at line 31 of file polygonizer.hpp.
typedef use<mesh3d_def,C,V>::Face Face |
Definition at line 32 of file polygonizer.hpp.
typedef use<mesh3d_def,C,V>::Point Point |
Definition at line 30 of file polygonizer.hpp.
polygonizer | ( | void | ) | [inline] |
Definition at line 53 of file polygonizer.hpp.
~polygonizer | ( | void | ) | [inline] |
Definition at line 57 of file polygonizer.hpp.
void clear | ( | void | ) | [inline] |
Definition at line 119 of file polygonizer.hpp.
Input* get_input | ( | void | ) | const [inline] |
Definition at line 38 of file polygonizer.hpp.
Referenced by polygonizer< C, default_2d, Input, Output >::run(), and polygonizer< C, V, Input, Output >::run().
Output* get_output | ( | void | ) | const [inline] |
Definition at line 41 of file polygonizer.hpp.
Referenced by polygonizer< C, default_2d, Input, Output >::run(), and polygonizer< C, V, Input, Output >::run().
void run | ( | unsigned | n, | |
C | m = 0 , |
|||
C | M = 1 | |||
) | [inline] |
Definition at line 94 of file polygonizer.hpp.
References polygonizer< C, V, Input, Output >::get_input(), polygonizer< C, V, Input, Output >::get_output(), and marching_cube::polygonize().
00094 { 00095 00096 C s=(M-m)/n; 00097 Point points[8]; 00098 C values[8]; 00099 00100 Input L = *this->get_input(); 00101 00102 for(unsigned c=0; c< this->get_input()->size();c+=8){ 00103 00104 for(unsigned j=0; j<8; j++) { 00105 points[j] = L[c+j]->center(); 00106 values[j] = L[c+j]->center_value()-m; 00107 } 00108 00109 for(unsigned i=0; i<n+1; i++) { 00110 marching_cube::polygonize(*this->get_output(),points, values); 00111 for(unsigned j=0; j<8; j++) { 00112 values[j] += s; 00113 } 00114 } 00115 } 00116 00117 }
void run | ( | void | ) | [inline] |
Definition at line 61 of file polygonizer.hpp.
References polygonizer< C, V, Input, Output >::get_input(), polygonizer< C, V, Input, Output >::get_output(), and marching_cube::polygonize().
00061 { 00062 00063 Point points[8]; 00064 C values[8]; 00065 00066 Input L = *this->get_input(); 00067 00068 for(unsigned c=0; c< this->get_input()->size();c+=8){ 00069 00070 for(unsigned j=0; j<8; j++) { 00071 points[j] = L[c+j]->center(); 00072 values[j] = L[c+j]->center_value(); 00073 } 00074 00075 marching_cube::polygonize(*this->get_output(),points, values); 00076 00077 // Point* P[8]; 00078 // if (!marching_cube::polygonize(*this->get_output(),points, values)) 00079 // { 00080 // for (unsigned j=0;j<7;j++) { 00081 // P[j] = new Point(points[j]); 00082 // this->get_output()->insert(P[j]); 00083 // } 00084 // }; 00085 00086 } 00087 00088 // foreach(Cell * cl, *this->input()) { 00089 // marching_cube::polygonise(*cl, *cl); 00090 // foreach(Point* p, cl->m_points) this->output()->insert(p); 00091 // foreach(Face* f, cl->m_faces) this->output()->insert(f); 00092 // } 00093 }//--------------------------------------------------------------------
void set_input | ( | Input * | i | ) | [inline] |
Definition at line 37 of file polygonizer.hpp.
void set_output | ( | Output * | o | ) | [inline] |
Definition at line 40 of file polygonizer.hpp.