Class implementing simplification of quad meshes by diagonal collapses. More...
#include <quad_diag_collapse.h>
Public Member Functions | |
ScalarType | ComputePriority () |
void | Execute (MeshType &m) |
virtual const char * | Info (MeshType &m) |
bool | IsFeasible () |
ModifierType | IsOfType () |
return the type of operation | |
bool | IsUpToDate () |
virtual ScalarType | Priority () const |
QuadDiagonalCollapseBase () | |
Default Constructor. | |
QuadDiagonalCollapseBase (HEdgePointer he, int mark) | |
void | UpdateHeap (HeapType &h_ret) |
~QuadDiagonalCollapseBase () | |
Static Public Member Functions | |
static GRID *& | grid () |
Spatial index for smoothing. | |
static void | Init (MeshType &m, HeapType &h_ret) |
static TriMeshType *& | refMesh () |
Reference mesh used for smoothing. | |
static unsigned int & | smoothing_iterations () |
Number of smoothing iterations to be performed. | |
Protected Types | |
typedef MeshType::CoordType | CoordType |
typedef MeshType::FacePointer | FacePointer |
typedef vcg::GridStaticPtr < TriFaceType, typename TriFaceType::ScalarType > | GRID |
typedef LocalOptimization < MeshType >::HeapElem | HeapElem |
typedef LocalOptimization < MeshType >::HeapType | HeapType |
typedef MeshType::HEdgePointer | HEdgePointer |
typedef Pos< MeshType > | PosType |
typedef MeshType::ScalarType | ScalarType |
typedef TriMeshType::FaceType | TriFaceType |
typedef MeshType::VertexPointer | VertexPointer |
Static Protected Member Functions | |
static int & | GlobalMark () |
Global mark for updating. | |
Protected Attributes | |
ScalarType | _priority |
Priority in the heap. | |
set< FacePointer > | faces |
Set of modified faces. | |
HEdgePointer | hp |
Halfedge that identifies the diagonal to collapse. | |
int | localMark |
Local mark for updating. | |
VertexPointer | ret |
Vertex returned by the collapse. |
Class implementing simplification of quad meshes by diagonal collapses.
Definition at line 241 of file quad_diag_collapse.h.
typedef MeshType::CoordType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::CoordType [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 253 of file quad_diag_collapse.h.
typedef MeshType::FacePointer vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::FacePointer [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 248 of file quad_diag_collapse.h.
typedef vcg::GridStaticPtr<TriFaceType, typename TriFaceType::ScalarType> vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::GRID [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 255 of file quad_diag_collapse.h.
typedef LocalOptimization<MeshType>::HeapElem vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::HeapElem [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 250 of file quad_diag_collapse.h.
typedef LocalOptimization<MeshType>::HeapType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::HeapType [protected] |
Reimplemented from vcg::LocalModification< MeshType >.
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 251 of file quad_diag_collapse.h.
typedef MeshType::HEdgePointer vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::HEdgePointer [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 249 of file quad_diag_collapse.h.
typedef Pos<MeshType> vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::PosType [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 246 of file quad_diag_collapse.h.
typedef MeshType::ScalarType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::ScalarType [protected] |
Reimplemented from vcg::LocalModification< MeshType >.
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 252 of file quad_diag_collapse.h.
typedef TriMeshType::FaceType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::TriFaceType [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 254 of file quad_diag_collapse.h.
typedef MeshType::VertexPointer vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::VertexPointer [protected] |
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 247 of file quad_diag_collapse.h.
vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::QuadDiagonalCollapseBase | ( | ) | [inline] |
Default Constructor.
Definition at line 303 of file quad_diag_collapse.h.
vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::QuadDiagonalCollapseBase | ( | HEdgePointer | he, |
int | mark | ||
) | [inline] |
Constructor
he | Pointer to an halfedge representing a diagonal |
mark | Temporal mark of the operation |
Definition at line 311 of file quad_diag_collapse.h.
vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::~QuadDiagonalCollapseBase | ( | ) | [inline] |
Definition at line 318 of file quad_diag_collapse.h.
ScalarType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::ComputePriority | ( | ) | [inline] |
Computes priority of the operation as the length of the diagonal
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 328 of file quad_diag_collapse.h.
void vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::Execute | ( | MeshType & | m | ) | [inline] |
Performs the collapse and the optimizations
m | Mesh |
Definition at line 350 of file quad_diag_collapse.h.
static int& vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::GlobalMark | ( | ) | [inline, static, protected] |
Global mark for updating.
Definition at line 261 of file quad_diag_collapse.h.
static GRID* & vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::grid | ( | ) | [inline, static] |
Spatial index for smoothing.
Definition at line 289 of file quad_diag_collapse.h.
virtual const char* vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::Info | ( | MeshType & | m | ) | [inline, virtual] |
Reimplemented from vcg::LocalModification< MeshType >.
Definition at line 337 of file quad_diag_collapse.h.
static void vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::Init | ( | MeshType & | m, |
HeapType & | h_ret | ||
) | [inline, static] |
Initializes a heap with all the possible diagonal collapses of the mesh For each face inserts two consecutive halfedges representing the two diagonals
m | Mesh |
h_ret | heap to be initialized |
Definition at line 506 of file quad_diag_collapse.h.
bool vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::IsFeasible | ( | ) | [inline] |
Checks if the operation can be done without generation of degenerate configurations
Reimplemented in vcg::tri::QuadDiagonalCollapse< MeshType, MYTYPE, TriMeshType, OptimizationType, WeightType, CheckType >, and vcg::tri::QuadDiagonalCollapse< MyPolyMesh, MyCollapseAdaptive, CMesh, vcg::tri::VertReg< MyPolyMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh >, vcg::tri::FitmapsCollapse< MyPolyMesh, CMesh > >.
Definition at line 458 of file quad_diag_collapse.h.
ModifierType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::IsOfType | ( | ) | [inline, virtual] |
return the type of operation
Implements vcg::LocalModification< MeshType >.
Definition at line 448 of file quad_diag_collapse.h.
bool vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::IsUpToDate | ( | ) | [inline] |
Checks if the operation is up to date
Definition at line 477 of file quad_diag_collapse.h.
virtual ScalarType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::Priority | ( | ) | const [inline, virtual] |
Gets the priority of the operation
Implements vcg::LocalModification< MeshType >.
Definition at line 493 of file quad_diag_collapse.h.
static TriMeshType* & vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::refMesh | ( | ) | [inline, static] |
Reference mesh used for smoothing.
Definition at line 282 of file quad_diag_collapse.h.
static unsigned int& vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::smoothing_iterations | ( | ) | [inline, static] |
Number of smoothing iterations to be performed.
Definition at line 296 of file quad_diag_collapse.h.
void vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::UpdateHeap | ( | HeapType & | h_ret | ) | [inline] |
Updates the heap of operations. For each modified face inserts into the heap two consecutive halfedges representing the two diagonals
h_ret | Heap to be updated |
Definition at line 422 of file quad_diag_collapse.h.
ScalarType vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::_priority [protected] |
Priority in the heap.
Definition at line 271 of file quad_diag_collapse.h.
set<FacePointer> vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::faces [protected] |
Set of modified faces.
Definition at line 274 of file quad_diag_collapse.h.
HEdgePointer vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::hp [protected] |
Halfedge that identifies the diagonal to collapse.
Definition at line 277 of file quad_diag_collapse.h.
int vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::localMark [protected] |
Local mark for updating.
Definition at line 268 of file quad_diag_collapse.h.
VertexPointer vcg::tri::QuadDiagonalCollapseBase< MeshType, MYTYPE, TriMeshType, OptimizationType >::ret [protected] |
Vertex returned by the collapse.
Definition at line 258 of file quad_diag_collapse.h.