|
typedef CleanMeshType | MeshType |
|
typedef MeshType::VertexType | VertexType |
|
typedef MeshType::VertexPointer | VertexPointer |
|
typedef MeshType::ConstVertexPointer | ConstVertexPointer |
|
typedef MeshType::VertexIterator | VertexIterator |
|
typedef MeshType::ConstVertexIterator | ConstVertexIterator |
|
typedef MeshType::EdgeIterator | EdgeIterator |
|
typedef MeshType::EdgePointer | EdgePointer |
|
typedef MeshType::CoordType | CoordType |
|
typedef MeshType::ScalarType | ScalarType |
|
typedef MeshType::FaceType | FaceType |
|
typedef MeshType::FacePointer | FacePointer |
|
typedef MeshType::FaceIterator | FaceIterator |
|
typedef MeshType::ConstFaceIterator | ConstFaceIterator |
|
typedef MeshType::FaceContainer | FaceContainer |
|
typedef MeshType::TetraType | TetraType |
|
typedef MeshType::TetraPointer | TetraPointer |
|
typedef MeshType::TetraIterator | TetraIterator |
|
typedef MeshType::ConstTetraIterator | ConstTetraIterator |
|
typedef vcg::Box3< ScalarType > | Box3Type |
|
typedef GridStaticPtr< FaceType, ScalarType > | TriMeshGrid |
|
|
static int | RemoveDuplicateVertex (MeshType &m, bool RemoveDegenerateFlag=true) |
|
static int | RemoveDuplicateFace (MeshType &m) |
|
static int | RemoveDuplicateEdge (MeshType &m) |
|
static int | CountUnreferencedVertex (MeshType &m) |
|
static int | RemoveUnreferencedVertex (MeshType &m, bool DeleteVertexFlag=true) |
|
static int | RemoveDegenerateVertex (MeshType &m) |
|
static int | RemoveDegenerateFace (MeshType &m) |
|
static int | RemoveDegenerateEdge (MeshType &m) |
|
static int | RemoveNonManifoldVertex (MeshType &m) |
|
static int | SplitSelectedVertexOnEdgeMesh (MeshType &m) |
|
static void | SelectNonManifoldVertexOnEdgeMesh (MeshType &m) |
|
static void | SelectCreaseVertexOnEdgeMesh (MeshType &m, ScalarType AngleRadThr) |
|
static int | SplitNonManifoldVertex (MeshType &m, ScalarType moveThreshold) |
| Removal of faces that were incident on a non manifold edge.
|
|
static size_t | SplitManifoldComponents (MeshType &m, const ScalarType moveThreshold=0) |
| This function expand current selection to cover the whole connected component.
|
|
static int | RemoveNonManifoldFace (MeshType &m) |
| Removal of faces that were incident on a non manifold edge.
|
|
static int | RemoveFaceOutOfRangeArea (MeshType &m, ScalarType MinAreaThr=0, ScalarType MaxAreaThr=(std::numeric_limits< ScalarType >::max)(), bool OnlyOnSelected=false) |
|
static int | RemoveZeroAreaFace (MeshType &m) |
|
static bool | IsBitQuadOnly (const MeshType &m) |
|
static bool | IsFaceFauxConsistent (MeshType &m) |
|
static bool | IsBitTriOnly (const MeshType &m) |
|
static bool | IsBitPolygonal (const MeshType &m) |
|
static bool | IsBitTriQuadOnly (const MeshType &m) |
|
static int | CountBitQuads (const MeshType &m) |
|
static int | CountBitTris (const MeshType &m) |
|
static int | CountBitPolygons (const MeshType &m) |
|
static int | CountBitLargePolygons (const MeshType &m) |
|
static bool | HasConsistentPerFaceFauxFlag (const MeshType &m) |
|
static int | CountNonManifoldEdgeEE (MeshType &m, bool SelectFlag=false) |
|
static int | CountNonManifoldEdgeFF (MeshType &m, bool SelectFlag=false) |
|
static int | CountNonManifoldVertexFF (MeshType &m, bool selectVert=true, bool clearSelection=true) |
|
static bool | IsWaterTight (MeshType &m) |
|
static void | CountEdgeNum (MeshType &m, int &total_e, int &boundary_e, int &non_manif_e) |
|
static int | CountHoles (MeshType &m) |
|
static int | CountConnectedComponents (MeshType &m) |
|
static int | ConnectedComponents (MeshType &m, std::vector< std::pair< int, FacePointer > > &CCV) |
|
static int | edgeMeshConnectedComponents (MeshType &poly, std::vector< std::pair< int, typename MeshType::EdgePointer > > &eCC) |
|
static void | ComputeValence (MeshType &m, typename MeshType::PerVertexIntHandle &h) |
|
static int | MeshGenus (int nvert, int nedges, int nfaces, int numholes, int numcomponents) |
|
static int | MeshGenus (MeshType &m) |
|
static void | IsRegularMesh (MeshType &m, bool &Regular, bool &Semiregular) |
|
static bool | IsCoherentlyOrientedMesh (MeshType &m) |
|
static void | OrientCoherentlyMesh (MeshType &m, bool &_IsOriented, bool &_IsOrientable) |
|
static void | FlipMesh (MeshType &m, bool selected=false) |
| Flip the orientation of the whole mesh flipping all the faces (by swapping the first two vertices)
|
|
static bool | FlipNormalOutside (MeshType &m) |
|
static int | RemoveFaceFoldByFlip (MeshType &m, float normalThresholdDeg=175, bool repeat=true) |
|
static int | RemoveTVertexByFlip (MeshType &m, float threshold=40, bool repeat=true) |
|
static int | RemoveTVertexByCollapse (MeshType &m, float threshold=40, bool repeat=true) |
|
static bool | SelfIntersections (MeshType &m, std::vector< FaceType * > &ret) |
|
static bool | IsSizeConsistent (MeshType &m) |
|
static bool | IsFFAdjacencyConsistent (MeshType &m) |
|
static bool | HasConsistentPerWedgeTexCoord (MeshType &m) |
|
static bool | HasZeroTexCoordFace (MeshType &m) |
|
static bool | TestFaceFaceIntersection (FaceType *f0, FaceType *f1) |
|
static int | MergeCloseVertex (MeshType &m, const ScalarType radius) |
|
static int | ClusterVertex (MeshType &m, const ScalarType radius) |
|
static std::pair< int, int > | RemoveSmallConnectedComponentsSize (MeshType &m, int maxCCSize) |
|
static std::pair< int, int > | RemoveSmallConnectedComponentsDiameter (MeshType &m, ScalarType maxDiameter) |
| Remove the connected components smaller than a given diameter.
|
|
static std::pair< int, int > | RemoveHugeConnectedComponentsDiameter (MeshType &m, ScalarType minDiameter) |
| Remove the connected components greater than a given diameter.
|
|
static void | SelectFoldedFaceFromOneRingFaces (MeshType &m, ScalarType cosThreshold) |
|
static int | SelectIntersectingFaces (MeshType &m1, MeshType &m2) |
|
template<class CleanMeshType>
class vcg::tri::Clean< CleanMeshType >
Class of static functions to clean//restore meshs.
template<class CleanMeshType >
static int vcg::tri::Clean< CleanMeshType >::MeshGenus |
( |
int |
nvert, |
|
|
int |
nedges, |
|
|
int |
nfaces, |
|
|
int |
numholes, |
|
|
int |
numcomponents |
|
) |
| |
|
inlinestatic |
GENUS.
A topologically invariant property of a surface defined as
the largest number of non-intersecting simple closed curves that can be
drawn on the surface without separating it.
Roughly speaking, it is the number of holes in a surface. The genus g of a closed surface, also called the geometric genus, is related to the Euler characteristic by the relation $chi$ by $chi==2-2g$.
The genus of a connected, orientable surface is an integer representing the maximum number of cuttings along closed simple curves without rendering the resultant manifold disconnected. It is equal to the number of handles on it.
For general polyhedra the Euler Formula is:
V - E + F = 2 - 2G - B
where V is the number of vertices, F is the number of faces, E is the number of edges, G is the genus and B is the number of boundary polygons.
The above formula is valid for a mesh with one single connected component. By considering multiple connected components the formula becomes:
V - E + F = 2C - 2Gs - B -> 2Gs = - ( V-E+F +B -2C)
where C is the number of connected components and Gs is the sum of the genus of all connected components.
Note that in the case of a mesh with boundaries the intuitive meaning of Genus is less intuitive that it could seem. A closed sphere, a sphere with one hole (e.g. a disk) and a sphere with two holes (e.g. a tube) all of them have Genus == 0