Visual Computing Library  devel
Loading...
Searching...
No Matches
Mesh Statistic Algorithms

TODO. More...

Collaboration diagram for Mesh Statistic Algorithms:

Functions

template<MeshConcept MeshType>
auto vcl::boundingBox (const MeshType &m)
 Compute the bounding box of a mesh.
 
uint vcl::countPerFaceVertexReferences (const FaceMeshConcept auto &mesh)
 Count the number of references to vertices in the mesh faces.
 
uint vcl::countTriangulatedTriangles (const FaceMeshConcept auto &mesh)
 Counts the number of resulting triangles if the input mesh would be triangulated by splitting each face into triangles.
 
template<FaceMeshConcept MeshType>
uint vcl::countVerticesToDuplicateByWedgeTexCoords (const MeshType &mesh, std::vector< std::pair< uint, uint > > &vertWedgeMap=detail::dummyVectorOfPairs, std::list< uint > &vertsToDuplicate=detail::dummyUintList, std::list< std::list< std::pair< uint, uint > > > &facesToReassign=detail::dummyListOfLists)
 This function counts the number of vertices that must be duplicated in a mesh to have a unique texcoord per vertex, by checking the texcoords of the wedges of the mesh faces.
 
uint vcl::largestFaceSize (const FaceMeshConcept auto &mesh)
 Returns the largest face size in the mesh.
 
uint vcl::largestPerEdgeAdjacentEdgesNumber (const EdgeMeshConcept auto &mesh)
 Returns the largest number of per-edge adjacent edges in the mesh.
 
uint vcl::largestPerEdgeAdjacentFacesNumber (const FaceMeshConcept auto &mesh)
 Returns the largest number of per-edge adjacent faces in the mesh.
 
template<uint ELEM_ID>
uint vcl::largestPerElementAdjacentEdgesNumber (const EdgeMeshConcept auto &mesh)
 Returns the largest number of per-ELEM_ID element adjacent edges in the mesh.
 
template<uint ELEM_ID>
uint vcl::largestPerElementAdjacentFacesNumber (const FaceMeshConcept auto &mesh)
 Returns the largest number of per-ELEM_ID element adjacent faces in the mesh.
 
uint vcl::largestPerFaceAdjacentEdgesNumber (const EdgeMeshConcept auto &mesh)
 Returns the largest number of per-face adjacent edges in the mesh.
 
uint vcl::largestPerVertexAdjacentEdgesNumber (const EdgeMeshConcept auto &mesh)
 Returns the largest number of per-vertex adjacent edges in the mesh.
 
uint vcl::largestPerVertexAdjacentFacesNumber (const FaceMeshConcept auto &mesh)
 Returns the largest number of per-vertex adjacent faces in the mesh.
 
uint vcl::largestPerVertexAdjacentVerticesNumber (const MeshConcept auto &mesh)
 Returns the largest number of per-vertex adjacent vertices in the mesh.
 

Detailed Description

TODO.

Function Documentation

◆ boundingBox()

template<MeshConcept MeshType>
auto vcl::boundingBox ( const MeshType &  m)

Compute the bounding box of a mesh.

Given a mesh m, this function computes and returns the bounding box of the mesh. The bounding box is represented by a vcl::Box object.

Template Parameters
MeshTypeThe type of the mesh. It must satisfy the MeshConcept.
Parameters
[in]mThe input mesh to compute the bounding box of
Returns
The bounding box of the input mesh

◆ countPerFaceVertexReferences()

uint vcl::countPerFaceVertexReferences ( const FaceMeshConcept auto mesh)

Count the number of references to vertices in the mesh faces.

If the mesh is a TriangleMesh, the number of references is equal to the number of faces times 3. Otherwise, the function counts the number of references to vertices in each face of the mesh.

Parameters
[in]meshThe input mesh. It must satisfy the MeshConcept.
Returns
The number of references to vertices in the mesh faces.

◆ countTriangulatedTriangles()

uint vcl::countTriangulatedTriangles ( const FaceMeshConcept auto mesh)

Counts the number of resulting triangles if the input mesh would be triangulated by splitting each face into triangles.

Parameters
[in]meshThe input mesh. It must satisfy the MeshConcept.
Returns
The number of resulting triangles if the input mesh would be triangulated by splitting each face into triangles.

◆ countVerticesToDuplicateByWedgeTexCoords()

template<FaceMeshConcept MeshType>
uint vcl::countVerticesToDuplicateByWedgeTexCoords ( const MeshType &  mesh,
std::vector< std::pair< uint, uint > > &  vertWedgeMap = detail::dummyVectorOfPairs,
std::list< uint > &  vertsToDuplicate = detail::dummyUintList,
std::list< std::list< std::pair< uint, uint > > > &  facesToReassign = detail::dummyListOfLists 
)

This function counts the number of vertices that must be duplicated in a mesh to have a unique texcoord per vertex, by checking the texcoords of the wedges of the mesh faces.

The function returns the number of vertices that must be duplicated (i.e., added to the mesh) to have a unique texcoord per vertex. The function also returns a vector that tells, for each vertex, the pair face/wedge index in the face that must be kept for the vertex, the list of vertices to duplicate, and the list of faces that must be reassigned to the duplicated vertices.

Parameters
[in]meshThe input mesh. It must satisfy the FaceMeshConcept and must have per-face wedge texcoords.
[out]vertWedgeMapA vector that tells, for each vertex, the pair face/wedge index in the face that must be kept for the vertex (it allows to index the texcoords of the vertex).
[out]vertsToDuplicatea list of vertices that must be duplicated (each element of the list is the index of the vertex to duplicate).
[out]facesToReassigna list of lists of pairs face/wedge index in the face that must be reassigned to the duplicated vertices (each list of pairs is the list of faces that must be reassigned to the corresponding duplicated vertex). The list contains a list for each vertex to duplicate.
Returns
The number of vertices that must be duplicated.

◆ largestFaceSize()

uint vcl::largestFaceSize ( const FaceMeshConcept auto mesh)

Returns the largest face size in the mesh.

If the mesh has static face size, the function returns the static size. Otherwise, the function iterates through all the faces of the mesh to find the largest face size.

Parameters
[in]meshThe input mesh. It must satisfy the FaceMeshConcept.
Returns
The largest face size in the mesh.

◆ largestPerEdgeAdjacentEdgesNumber()

uint vcl::largestPerEdgeAdjacentEdgesNumber ( const EdgeMeshConcept auto mesh)

Returns the largest number of per-edge adjacent edges in the mesh.

The function requires that per-edge adjacent edges have been precomputed for the mesh (see vcl::updatePerEdgeAdjacentEdges).

Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-edge adjacent edges available.
Parameters
[in]meshThe input mesh. It must satisfy the EdgeMeshConcept.
Returns
The largest number of per-edge adjacent edges in the mesh.

◆ largestPerEdgeAdjacentFacesNumber()

uint vcl::largestPerEdgeAdjacentFacesNumber ( const FaceMeshConcept auto mesh)

Returns the largest number of per-edge adjacent faces in the mesh.

The function requires that per-edge adjacent faces have been precomputed for the mesh.

Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-edge adjacent faces available.
Parameters
[in]meshThe input mesh. It must satisfy the FaceMeshConcept and EdgeMeshConcept.
Returns
The largest number of per-edge adjacent faces in the mesh.

◆ largestPerElementAdjacentEdgesNumber()

template<uint ELEM_ID>
uint vcl::largestPerElementAdjacentEdgesNumber ( const EdgeMeshConcept auto mesh)

Returns the largest number of per-ELEM_ID element adjacent edges in the mesh.

The function requires that per-ELEM_ID element adjacent edges have been precomputed for the mesh (see vcl::updatePer<Element>AdjacentEdges).

Note
If the element has Tied To Vertex Number Adjacent Edges, the returned value is equal to the number of vertices of the element.
Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-element adjacent edges available.
Parameters
[in]meshThe input mesh. It must satisfy the EdgeMeshConcept.
Returns
The largest number of per-element adjacent edges in the mesh.

◆ largestPerElementAdjacentFacesNumber()

template<uint ELEM_ID>
uint vcl::largestPerElementAdjacentFacesNumber ( const FaceMeshConcept auto mesh)

Returns the largest number of per-ELEM_ID element adjacent faces in the mesh.

The function requires that per-ELEM_ID element adjacent faces have been precomputed for the mesh (see vcl::updatePer<Element>AdjacentFaces).

Note
If the element has Tied To Vertex Number Adjacent Faces, the returned value is equal to the number of vertices of the element.
Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-element adjacent faces available.
Parameters
[in]meshThe input mesh. It must satisfy the FaceMeshConcept.
Returns
The largest number of per-element adjacent faces in the mesh.

◆ largestPerFaceAdjacentEdgesNumber()

uint vcl::largestPerFaceAdjacentEdgesNumber ( const EdgeMeshConcept auto mesh)

Returns the largest number of per-face adjacent edges in the mesh.

The function requires that per-face adjacent edges have been precomputed for the mesh (see vcl::updatePerFaceAdjacentEdges).

Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-face adjacent edges available.
Parameters
[in]meshThe input mesh. It must satisfy the EdgeMeshConcept and FaceMeshConcept.
Returns
The largest number of per-face adjacent edges in the mesh.

◆ largestPerVertexAdjacentEdgesNumber()

uint vcl::largestPerVertexAdjacentEdgesNumber ( const EdgeMeshConcept auto mesh)

Returns the largest number of per-vertex adjacent edges in the mesh.

The function requires that per-vertex adjacent edges have been precomputed for the mesh (see vcl::updatePerVertexAdjacentEdges).

Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-vertex adjacent edges available.
Parameters
[in]meshThe input mesh. It must satisfy the EdgeMeshConcept.
Returns
The largest number of per-vertex adjacent edges in the mesh.

◆ largestPerVertexAdjacentFacesNumber()

uint vcl::largestPerVertexAdjacentFacesNumber ( const FaceMeshConcept auto mesh)

Returns the largest number of per-vertex adjacent faces in the mesh.

The function requires that per-vertex adjacent faces have been precomputed for the mesh (see vcl::updatePerVertexAdjacentFaces).

Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-vertex adjacent faces available.
Parameters
[in]meshThe input mesh. It must satisfy the FaceMeshConcept.
Returns
The largest number of per-vertex adjacent faces in the mesh.

◆ largestPerVertexAdjacentVerticesNumber()

uint vcl::largestPerVertexAdjacentVerticesNumber ( const MeshConcept auto mesh)

Returns the largest number of per-vertex adjacent vertices in the mesh.

The function requires that per-vertex adjacent vertices have been precomputed for the mesh (see vcl::updatePerVertexAdjacentVertices).

Exceptions
vcl::MissingComponentExceptionif the mesh does not have per-vertex adjacent vertices available.
Parameters
[in]meshThe input mesh. It must satisfy the MeshConcept.
Returns
The largest number of per-vertex adjacent vertices in the mesh.