Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
vcg::tri::ExtendedMarchingCubes< TRIMESH_TYPE, WALKER_TYPE > Class Template Reference

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 68 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 80 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 89 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 88 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 87 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 86 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 85 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 81 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 77 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 84 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 83 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 82 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:
meshThe mesh that will be constructed
volumeThe volume describing the field
walkerThe class implementing the traversal policy
angleThe feature detection threshold misuring the sharpness of a feature(default is 30 degree)

Definition at line 104 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 127 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_idxThe 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 278 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 407 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 116 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:
minthe first point
maxthe second point

Definition at line 149 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 266 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 258 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 262 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 270 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 251 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 251 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 248 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 240 of file extended_marching_cubes.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:42:17