Visual Computing Library
devel
|
TODO. More...
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. | |
TODO.
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.
MeshType | The type of the mesh. It must satisfy the MeshConcept. |
[in] | m | The input mesh to compute the bounding box of |
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.
[in] | mesh | The input mesh. It must satisfy the MeshConcept. |
Counts the number of resulting triangles if the input mesh would be triangulated by splitting each face into triangles.
[in] | mesh | The input mesh. It must satisfy the MeshConcept. |
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.
[in] | mesh | The input mesh. It must satisfy the FaceMeshConcept and must have per-face wedge texcoords. |
[out] | vertWedgeMap | A 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] | vertsToDuplicate | a list of vertices that must be duplicated (each element of the list is the index of the vertex to duplicate). |
[out] | facesToReassign | a 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 largest face size in the mesh.
If the mesh is a TriangleMesh, the function returns 3. Otherwise, the function returns the size of the largest face in the mesh.
[in] | mesh | The input mesh. It must satisfy the MeshConcept. |