Visual Computing Library
|
List Export Mesh to Matrix algorithms. More...
Functions | |
template<typename Vect , FaceMeshConcept MeshType> | |
Vect | vcl::faceIndicesVector (const MeshType &mesh) |
Get a #V*3 Matrix of scalars containing the coordinates of the vertices of a Mesh. The function is templated on the Matrix itself. | |
template<MatrixConcept Matrix, EdgeMeshConcept MeshType> | |
Matrix | vcl::edgeIndicesMatrix (const MeshType &mesh) |
Get a #F*max(size(F)) Matrix of integers containing the vertex indices for each face of a Mesh. | |
template<uint ELEM_ID, MatrixConcept Matrix, MeshConcept MeshType> | |
Matrix | vcl::elementNormalsMatrix (const MeshType &mesh) |
Get a #E Vector of booleans (or integers) containing the selection status of the elements identified by ELEM_ID of a Mesh. The function is templated on the Vector itself. | |
template<MatrixConcept Matrix, MeshConcept MeshType> | |
Matrix | vcl::vertexNormalsMatrix (const MeshType &mesh) |
Get a #V*3 Matrix of scalars containing the normals of the vertices of a Mesh. The function is templated on the Matrix itself. | |
template<MatrixConcept Matrix, FaceMeshConcept MeshType> | |
Matrix | vcl::faceNormalsMatrix (const MeshType &mesh) |
Get a #F*3 Matrix of scalars containing the normals of the faces of a Mesh. The function is templated on the Matrix itself. | |
template<uint ELEM_ID, MatrixConcept Matrix, MeshConcept MeshType> | |
Matrix | vcl::elementColorsMatrix (const MeshType &mesh) |
Get a #E*4 Matrix of integers containing the colors of the elements identified by ELEM_ID of a Mesh. The function is templated on the Matrix itself. | |
template<uint ELEM_ID, typename Vect , MeshConcept MeshType> | |
Vect | vcl::elementColorsVector (const MeshType &mesh, Color::Format colorFormat) |
Get a #E Vector of integers containing the colors of the elements identified by ELEM_ID of a Mesh. The function is templated on the Vector itself. The color is packed in a single 32 bit value using the provided format. | |
template<MatrixConcept Matrix, MeshConcept MeshType> | |
Matrix | vcl::vertexColorsMatrix (const MeshType &mesh) |
Get a #V*4 Matrix of integers containing the colors of the vertices of a Mesh. The function is templated on the Matrix itself. | |
template<typename Vect , MeshConcept MeshType> | |
Vect | vcl::vertexColorsVector (const MeshType &mesh, Color::Format colorFormat) |
Get a #V Vector of integers containing the colors of the vertices of a Mesh. The function is templated on the Vector itself. The color is packed in a single 32 bit value using the provided format. | |
template<MatrixConcept Matrix, FaceMeshConcept MeshType> | |
Matrix | vcl::faceColorsMatrix (const MeshType &mesh) |
Get a #F*4 Matrix of integers containing the colors of the faces of a Mesh. The function is templated on the Matrix itself. | |
template<typename Vect , MeshConcept MeshType> | |
Vect | vcl::faceColorsVector (const MeshType &mesh, Color::Format colorFormat) |
Get a #F Vector of integers containing the colors of the faces of a Mesh. The function is templated on the Vector itself. The color is packed in a single 32 bit value using the provided format. | |
template<uint ELEM_ID, typename Vect , MeshConcept MeshType> | |
Vect | vcl::elementQualityVector (const MeshType &mesh) |
Get a #E Vector of scalars containing the quality of the elements identified by ELEM_ID of a Mesh. The function is templated on the Vector itself. | |
template<typename Vect , MeshConcept MeshType> | |
Vect | vcl::vertexQualityVector (const MeshType &mesh) |
Get a #V Vector of scalars containing the quality of the vertices of a Mesh. The function is templated on the Vector itself. | |
template<typename Vect , FaceMeshConcept MeshType> | |
Vect | vcl::faceQualityVector (const MeshType &mesh) |
Get a #F Vector of scalars containing the quality of the faces of a Mesh. The function is templated on the Vector itself. | |
List Export Mesh to Matrix algorithms.
They allow to export mesh data to matrices.
You can access these algorithms by including #include <vclib/algorithms/mesh/import_export.h>
Matrix vcl::edgeIndicesMatrix | ( | const MeshType & | mesh | ) |
Get a #F*max(size(F)) Matrix of integers containing the vertex indices for each face of a Mesh.
If the mesh is polygonal, the matrix will have a number of rows equal to the greatest polygon of the mesh, and unused values will be set to -1.
This function works with every Matrix type that satisfies the MatrixConcept.
Usage example with Eigen Matrix:
vcl::MissingCompactnessException | if the vertex container is not compact. |
Matrix | type of the matrix to be returned, it must satisfy the MatrixConcept. |
MeshType | type of the input mesh, it must satisfy the EdgeMeshConcept. |
[in] | mesh | input mesh |
Matrix vcl::elementColorsMatrix | ( | const MeshType & | mesh | ) |
Get a #E*4 Matrix of integers containing the colors of the elements identified by ELEM_ID
of a Mesh. The function is templated on the Matrix itself.
This function works with every Matrix type that satisfies the MatrixConcept, and requires that the mesh has per-element colors.
Usage example with Eigen Matrix:
vcl::MissingComponentException | if the mesh does not have per-element colors available. |
ELEM_ID | the ID of the element. |
[in] | mesh | input mesh |
Vect vcl::elementColorsVector | ( | const MeshType & | mesh, |
Color::Format | colorFormat | ||
) |
Get a #E Vector of integers containing the colors of the elements identified by ELEM_ID
of a Mesh. The function is templated on the Vector itself. The color is packed in a single 32 bit value using the provided format.
This function works with every Vector type that has a constructor with a size_t argument and an operator[uint], and requires that the mesh has per-element colors.
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-element colors available. |
ELEM_ID | the ID of the element. |
[in] | mesh | input mesh |
Matrix vcl::elementNormalsMatrix | ( | const MeshType & | mesh | ) |
Get a #E Vector of booleans (or integers) containing the selection status of the elements identified by ELEM_ID
of a Mesh. The function is templated on the Vector itself.
This function works with every Vector type that has a constructor with a size_t argument and an operator[uint].
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-element normals available. |
ELEM_ID | the ID of the element. |
[in] | mesh | input mesh |
Get a #E Vector of scalars containing the quality of the elements identified by ELEM_ID
of a Mesh. The function is templated on the Vector itself.
This function works with every Vector type that has a constructor with a size_t argument and an operator[uint], and requires that the mesh has per-element quality.
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-element quality available. |
ELEM_ID | the ID of the element. |
[in] | mesh | input mesh |
Matrix vcl::faceColorsMatrix | ( | const MeshType & | mesh | ) |
Get a #F*4 Matrix of integers containing the colors of the faces of a Mesh. The function is templated on the Matrix itself.
This function works with every Matrix type that satisfies the MatrixConcept, and requires that the mesh has per-face colors.
Usage example with Eigen Matrix:
vcl::MissingComponentException | if the mesh does not have per-face colors available. |
[in] | mesh | input mesh |
Vect vcl::faceColorsVector | ( | const MeshType & | mesh, |
Color::Format | colorFormat | ||
) |
Get a #F Vector of integers containing the colors of the faces of a Mesh. The function is templated on the Vector itself. The color is packed in a single 32 bit value using the provided format.
This function works with every Vector type that has a constructor with a size_t argument and an operator[uint], and requires that the mesh has per-vertex colors.
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-face colors available. |
[in] | mesh | input mesh |
Get a #V*3 Matrix of scalars containing the coordinates of the vertices of a Mesh. The function is templated on the Matrix itself.
This function works with every Matrix type that satisfies the MatrixConcept.
Usage example with an Eigen Matrix:
[in] | mesh | input mesh |
Matrix vcl::faceNormalsMatrix | ( | const MeshType & | mesh | ) |
Get a #F*3 Matrix of scalars containing the normals of the faces of a Mesh. The function is templated on the Matrix itself.
This function works with every Matrix type that satisfies the MatrixConcept, and requires that the mesh has per-face normals.
Usage example with Eigen Matrix:
vcl::MissingComponentException | if the mesh does not have per-face normals available. |
[in] | mesh | input mesh |
Get a #F Vector of scalars containing the quality of the faces of a Mesh. The function is templated on the Vector itself.
This function works with every Vector type that has a constructor with a size_t argument and an operator(uint), and requires that the mesh has per-face quality.
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-face quality available. |
[in] | mesh | input mesh |
Matrix vcl::vertexColorsMatrix | ( | const MeshType & | mesh | ) |
Get a #V*4 Matrix of integers containing the colors of the vertices of a Mesh. The function is templated on the Matrix itself.
This function works with every Matrix type that satisfies the MatrixConcept, and requires that the mesh has per-vertex colors.
Usage example with Eigen Matrix:
vcl::MissingComponentException | if the mesh does not have per-vertex colors available. |
[in] | mesh | input mesh |
Vect vcl::vertexColorsVector | ( | const MeshType & | mesh, |
Color::Format | colorFormat | ||
) |
Get a #V Vector of integers containing the colors of the vertices of a Mesh. The function is templated on the Vector itself. The color is packed in a single 32 bit value using the provided format.
This function works with every Vector type that has a constructor with a size_t argument and an operator[uint], and requires that the mesh has per-vertex colors.
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-vertex colors available. |
[in] | mesh | input mesh |
Matrix vcl::vertexNormalsMatrix | ( | const MeshType & | mesh | ) |
Get a #V*3 Matrix of scalars containing the normals of the vertices of a Mesh. The function is templated on the Matrix itself.
This function works with every Matrix type that satisfies the MatrixConcept, and requires that the mesh has per-vertex normals.
Usage example with Eigen Matrix:
vcl::MissingComponentException | if the mesh does not have per-vertex normals available. |
[in] | mesh | input mesh |
Get a #V Vector of scalars containing the quality of the vertices of a Mesh. The function is templated on the Vector itself.
This function works with every Vector type that has a constructor with a size_t argument and an operator(uint), and requires that the mesh has per-vertex quality.
Usage example with Eigen Vector:
vcl::MissingComponentException | if the mesh does not have per-vertex quality available. |
[in] | mesh | input mesh |