isosurface< C, V, Cell > Struct Template Reference

#include <isosurface.hpp>

List of all members.

Public Types

Public Member Functions


Detailed Description

template<class C, class V = isosurface_env, class Cell = cell3d<C,V>>
struct mmx::shape::isosurface< C, V, Cell >

Definition at line 56 of file isosurface.hpp.


Member Typedef Documentation

typedef Cell::BoundingBox BoundingBox

Definition at line 63 of file isosurface.hpp.

typedef Output::Edge Edge

Definition at line 61 of file isosurface.hpp.

typedef Output::Face Face

Definition at line 62 of file isosurface.hpp.

typedef Cell Input

Definition at line 58 of file isosurface.hpp.

typedef tpl3d<C,V> Output

Definition at line 59 of file isosurface.hpp.

Definition at line 60 of file isosurface.hpp.


Constructor & Destructor Documentation

isosurface ( double  m = 0,
double  M = 1,
double  e1 = 0.1,
double  e2 = 0.01 
) [inline]

Definition at line 92 of file isosurface.hpp.

00092                                                              :
00093     m_min(m), m_max(M), m_smooth(e1), m_prec(e2)
00094 {
00095     m_output = new Output;
00096 }

~isosurface ( void   )  [inline]

Definition at line 98 of file isosurface.hpp.

00098                            {
00099     delete m_output;
00100 }


Member Function Documentation

void clear ( void   )  [inline]

Definition at line 130 of file isosurface.hpp.

00130                           {
00131     this->output()->clear();
00132 }

Input* get_input ( void   )  [inline]

Definition at line 69 of file isosurface.hpp.

00069 { return m_input; }

Output* get_output ( void   )  [inline]

Definition at line 71 of file isosurface.hpp.

Referenced by isosurface< C, V, Cell >::run().

00071 { return m_output; }

double get_precision ( void   )  [inline]

Definition at line 77 of file isosurface.hpp.

00077 { return m_prec;   }

double get_smoothness ( void   )  [inline]

Definition at line 76 of file isosurface.hpp.

00076 { return m_smooth; }

void run ( void   )  [inline]

Definition at line 102 of file isosurface.hpp.

References isosurface< C, V, Cell >::get_output().

00102                         {
00103 
00104     typedef subdivision<C,V,Cell> Subdivisor;
00105     Subdivisor* sbd = new Subdivisor(m_smooth,m_prec);
00106     sbd->set_input(this->input());
00107     sbd->run();
00108 
00109     std::cout<< ">> leaves    = "<< sbd->get_output()->m_leaves.size()<<"\n";
00110 
00111     typedef dualize<C,V,Cell> Dualize;
00112     Dualize* dl = new Dualize;
00113     dl->set_input(sbd->get_output());
00114     dl->run();
00115 
00116     std::cout<< "\nCells      = "<< sbd->get_output()->m_leaves.size()<<"\n";
00117     std::cout<< "Dual edges = "<< dl->get_output()->m_edges.size()/2<<"\n";
00118     std::cout<< "Dual faces = "<< dl->get_output()->m_faces.size()/4<<"\n";
00119     std::cout<< "Dual cells = "<< dl->get_output()->m_cells.size()/8<<"\n";
00120 
00121     typedef polygonizer<C,V,Seq<Cell*> > Polygonizer;
00122     Polygonizer* plg = new Polygonizer;
00123     plg->set_input(&dl->get_output()->m_cells);
00124     plg->set_output(this->get_output());
00125     plg->run(m_n,m_min,m_max);
00126 
00127 }

void set_input ( Cell *  cl  )  [inline]

Definition at line 68 of file isosurface.hpp.

00068 { m_input= cl; }

void set_precision ( double  e  )  [inline]

Definition at line 74 of file isosurface.hpp.

00074 { m_prec   = e; }

void set_smoothness ( double  e  )  [inline]

Definition at line 73 of file isosurface.hpp.

00073 { m_smooth = e; }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for shape by  doxygen 1.6.1