vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE > Class Template Reference
[Trimesh]

This class implements the Extended Marching Cubes algorithm. More...

#include <extended_marching_cubes.h>

List of all members.

Classes

struct  LightEdge

Public Types

typedef vcg::tri::Allocator
< TRIMESH_TYPE > 
AllocatorType
typedef TRIMESH_TYPE::CoordType * CoordPointer
typedef TRIMESH_TYPE::CoordType CoordType
typedef TRIMESH_TYPE::FaceIterator FaceIterator
typedef TRIMESH_TYPE::FacePointer FacePointer
typedef TRIMESH_TYPE::FaceType FaceType
typedef TRIMESH_TYPE::ScalarType ScalarType
typedef _W64 unsigned int size_t
typedef
TRIMESH_TYPE::VertexIterator 
VertexIterator
typedef TRIMESH_TYPE::VertexPointer VertexPointer
typedef TRIMESH_TYPE::VertexType VertexType

Public Member Functions

 ExtendedMarchingCubes (TRIMESH_TYPE &mesh, WALKER_TYPE &walker, ScalarType angle=30)
void Finalize ()
void Initialize ()
void ProcessCell (const vcg::Point3i &min, const vcg::Point3i &max)

Private Member Functions

VertexPointer FindFeature (const std::vector< size_t > &vertices_idx)
void FlipEdges ()

Private Attributes

vcg::Point3i _corners [8]
ScalarType _featureAngle
int _featureFlag
ScalarType _field [8]
bool _finalized
bool _initialized
TRIMESH_TYPE * _mesh
WALKER_TYPE * _walker

Detailed Description

template<class TRIMESH_TYPE, class WALKER_TYPE>
class vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >

This class implements the Extended Marching Cubes algorithm.

The implementation is enough generic: this class works only on one volume cell for each call to ProcessCell. Using the field value at the cell corners, it adds to the mesh the triangles set approximating the surface that cross that cell.

Parameters:
TRIMESH_TYPE (Template parameter) the mesh type that will be constructed
WALKER_TYPE (Template parameter) the class that implements the traversal ordering of the volume.

Definition at line 70 of file extended_marching_cubes.h.


Member Typedef Documentation

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef vcg::tri::Allocator< TRIMESH_TYPE > vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::AllocatorType

Definition at line 82 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::CoordType* vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::CoordPointer

Definition at line 91 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::CoordType vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::CoordType

Definition at line 90 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::FaceIterator vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::FaceIterator

Definition at line 89 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::FacePointer vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::FacePointer

Definition at line 88 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::FaceType vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::FaceType

Definition at line 87 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::ScalarType vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::ScalarType

Definition at line 83 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef _W64 unsigned int vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::size_t

Definition at line 79 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::VertexIterator vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::VertexIterator

Definition at line 86 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::VertexPointer vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::VertexPointer

Definition at line 85 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
typedef TRIMESH_TYPE::VertexType vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::VertexType

Definition at line 84 of file extended_marching_cubes.h.


Constructor & Destructor Documentation

template<class TRIMESH_TYPE , class WALKER_TYPE >
vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::ExtendedMarchingCubes ( TRIMESH_TYPE &  mesh,
WALKER_TYPE &  walker,
ScalarType  angle = 30 
) [inline]

Constructor

Parameters:
mesh The mesh that will be constructed
volume The volume describing the field
walker The class implementing the traversal policy
angle The feature detection threshold misuring the sharpness of a feature(default is 30 degree)

Definition at line 105 of file extended_marching_cubes.h.


Member Function Documentation

template<class TRIMESH_TYPE , class WALKER_TYPE >
void vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::Finalize (  )  [inline]

This method must be executed after the last call to ApplyEMC

Definition at line 128 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
VertexPointer vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::FindFeature ( const std::vector< size_t > &  vertices_idx  )  [inline, private]

Tests if the surface patch crossing the current cell contains a sharp feature

Parameters:
vertices_idx The list of vertex indices intersecting the edges of the current cell
Returns:
The pointer to the new Vertex if a feature is detected; NULL otherwise.

Definition at line 279 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
void vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::FlipEdges (  )  [inline, private]

Postprocessing step performed during the finalization tha flip some of the mesh edges. The flipping criterion is quite simple: each edge is flipped if it will connect two feature samples after the flip.

Definition at line 390 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
void vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::Initialize (  )  [inline]

Execute the initialiazation. This method must be executed before the first call to ApplyEMC

Definition at line 117 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
void vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::ProcessCell ( const vcg::Point3i min,
const vcg::Point3i max 
) [inline]

Apply the extended marching cubes algorithm to the volume cell identified by the two points min and max. All the three coordinates of the first point must be smaller than the respectives three coordinatas of the second point.

Parameters:
min the first point
max the second point

Definition at line 150 of file extended_marching_cubes.h.


Member Data Documentation

template<class TRIMESH_TYPE , class WALKER_TYPE >
vcg::Point3i vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_corners[8] [private]

Array of the 8 corners of the volume cell being processed

Definition at line 267 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
ScalarType vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_featureAngle [private]

The feature detection threshold misuring the sharpness of a feature

Definition at line 259 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
int vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_featureFlag [private]

The flag used for marking the feature vertices.

Definition at line 263 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
ScalarType vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_field[8] [private]

The field value at the cell corners

Definition at line 271 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
bool vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_finalized [private]

Definition at line 252 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
bool vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_initialized [private]

Definition at line 252 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
TRIMESH_TYPE* vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_mesh [private]

Definition at line 249 of file extended_marching_cubes.h.

template<class TRIMESH_TYPE , class WALKER_TYPE >
WALKER_TYPE* vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE >::_walker [private]

Definition at line 241 of file extended_marching_cubes.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:31 2013