|
Visual Computing Library
devel
|
List Import Mesh from Buffer algorithms. More...

Functions | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeColorsFromBuffer (MeshType &mesh, const auto *buffer, Color::Format colorFormat) |
Sets the edge color of the given input mesh from the input buffer, that is expected to be a contiguous array of #V 32 bit values, on each of them the color is packed using the provided colorFormat. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeColorsFromBuffer (MeshType &mesh, const auto *buffer, uint channelsNumber=4, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, Color::Representation representation=Color::Representation::INT_0_255, uint rowNumber=UINT_NULL) |
Sets the edge colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #E*3 or #E*4 scalars, where each row contains the 3 or 4 components of the color of a edge. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeIndicesFromBuffer (MeshType &mesh, const auto *buffer, uint edgeNumber, bool clearBeforeSet=true, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the edge indices of the given input mesh from the input edge buffer, that is expected to be a contiguous array of integers, where each row contains the indices of the vertices of an edge. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeNormalsFromBuffer (MeshType &mesh, const auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the edge normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*3 scalars, where each row contains the 3 components of the normal of a edge. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeQualityFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the edge quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #F scalars, where each value contains the quality of a edge. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeSelectionFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the edge selection of the given input mesh from the input selection buffer. | |
| template<uint ELEM_ID, MeshConcept MeshType> | |
| void | vcl::elementColorsFromBuffer (MeshType &mesh, const auto *buffer, Color::Format colorFormat) |
Sets the element identified by ELEM_ID color of the given input mesh from the input buffer, that is expected to be a contiguous array of #E 32 bit values, on each of them the color is packed using the provided colorFormat. | |
| template<uint ELEM_ID, MeshConcept MeshType> | |
| void | vcl::elementColorsFromBuffer (MeshType &mesh, const auto *buffer, uint channelsNumber=4, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, Color::Representation representation=Color::Representation::INT_0_255, uint rowNumber=UINT_NULL) |
Sets the element identified by ELEM_ID colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #E*3 or #E*4 scalars, where each row contains the 3 or 4 components of the color of a element. | |
| template<uint ELEM_ID, MeshConcept MeshType> | |
| void | vcl::elementNormalsFromBuffer (MeshType &mesh, const auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the element identified by ELEM_ID normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #E*3 scalars, where each row contains the 3 components of the normal of a element. | |
| template<uint ELEM_ID, MeshConcept MeshType> | |
| void | vcl::elementQualityFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the element identified by ELEM_ID quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #E scalars, where each value contains the quality of a element. | |
| template<uint ELEM_ID, MeshConcept MeshType> | |
| void | vcl::elementSelectionFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the element identified by ELEM_ID selection of the given input mesh from the input selection buffer. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceColorsFromBuffer (MeshType &mesh, const auto *buffer, Color::Format colorFormat) |
Sets the face color of the given input mesh from the input buffer, that is expected to be a contiguous array of #V 32 bit values, on each of them the color is packed using the provided colorFormat. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceColorsFromBuffer (MeshType &mesh, const auto *buffer, uint channelsNumber=4, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, Color::Representation representation=Color::Representation::INT_0_255, uint rowNumber=UINT_NULL) |
Sets the face colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*3 or #F*4 scalars, where each row contains the 3 or 4 components of the color of a face. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceIndicesFromBuffer (MeshType &mesh, const auto *buffer, uint faceNumber, uint faceSize=3, bool clearBeforeSet=true, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the face indices of the given input mesh from the input face buffer, that is expected to be a contiguous array of integers, where each row contains the indices of the vertices of a face. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceMaterialIndicesFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the face material indices of the given input mesh from the input material indices buffer, that is expected to be a contiguous array of #F scalars, where each value contains the material index of a face. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceNormalsFromBuffer (MeshType &mesh, const auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the face normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*3 scalars, where each row contains the 3 components of the normal of a face. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceQualityFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the face quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #F scalars, where each value contains the quality of a face. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceSelectionFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the face selection of the given input mesh from the input selection buffer. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceWedgeTexCoordsFromBuffer (MeshType &mesh, const auto *buffer, uint largestFaceSize=3, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the face wedge texcoords of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*(LFS*2) of scalars, where each row contains the 2*largetFaceSize components of the wedge texture coordinates of a face. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexColorsFromBuffer (MeshType &mesh, const auto *buffer, Color::Format colorFormat) |
Sets the vertex color of the given input mesh from the input buffer, that is expected to be a contiguous array of #V 32 bit values, on each of them the color is packed using the provided colorFormat. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexColorsFromBuffer (MeshType &mesh, const auto *buffer, uint channelsNumber=4, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, Color::Representation representation=Color::Representation::INT_0_255, uint rowNumber=UINT_NULL) |
Sets the vertex colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #V*3 or #V*4 scalars, where each row contains the 3 or 4 components of the color of a vertex. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexMaterialIndicesFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the vertex material indices of the given input mesh from the input material indices buffer, that is expected to be a contiguous array of #V scalars, where each value contains the material index of a vertex. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexNormalsFromBuffer (MeshType &mesh, const auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the vertex normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #V*3 scalars, where each row contains the 3 components of the normal of a vertex. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexPositionsFromBuffer (MeshType &mesh, const auto *buffer, uint vertexNumber, bool clearBeforeSet=true, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the vertex positions of the given input mesh from the input buffer, that is expected to be a contiguous array of scalars, where each row contains the 3 components of the position of a vertex. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexQualityFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the vertex quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #V scalars, where each value contains the quality of a vertex. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexSelectionFromBuffer (MeshType &mesh, const auto *buffer) |
Sets the vertex selection of the given input mesh from the input selection buffer. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexTexCoordsFromBuffer (MeshType &mesh, const auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Sets the vertex texcoords of the given input mesh from the input buffer, that is expected to be a contiguous array of #V*2 scalars, where each row contains the 2 components of the texture coordinates of a vertex. | |
List Import Mesh from Buffer algorithms.
They allow to import mesh data from buffers.
| void vcl::edgeColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| Color::Format | colorFormat | ||
| ) |
Sets the edge color of the given input mesh from the input buffer, that is expected to be a contiguous array of #V 32 bit values, on each of them the color is packed using the provided colorFormat.
If not specified, the number of colors in the input buffer is assumed to be at least the number of edges of the mesh. The extra colors are ignored.
The function enables the per-edge color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input edge color. | |
| [in] | buffer | the input edge color buffer. |
| [in] | colorFormat | the format used to pack the color in a single 32 bit value. |
| void vcl::edgeColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | channelsNumber = 4, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| Color::Representation | representation = Color::Representation::INT_0_255, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the edge colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #E*3 or #E*4 scalars, where each row contains the 3 or 4 components of the color of a edge.
If not specified, the number of colors in the input buffer is assumed to be at least the number of edges of the mesh. The extra colors are ignored.
Scalars can be either in the range [0,255] or in the range [0,1], as specified by the representation argument. The default is [0,255].
The number of channels can be either 3 (RGB) or 4 (RGBA), as specified by the channelsNumber argument. The default is 4.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-edge color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the EdgeMeshConcept. |
| [in/out] | mesh: the mesh on which import the input edge colors. | |
| [in] | buffer | a contiguous array containing the colors of the elements of the mesh. |
| [in] | channelsNumber | the number of channels per color in the input buffer. It can be either 3 (RGB) or 4 (RGBA). |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | representation | the representation of the color scalars in the input buffer. It can be either in the range [0,255] or in the range [0,1]. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of edges of the mesh. |
| void vcl::edgeIndicesFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | edgeNumber, | ||
| bool | clearBeforeSet = true, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the edge indices of the given input mesh from the input edge buffer, that is expected to be a contiguous array of integers, where each row contains the indices of the vertices of an edge.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
If the argument clearBeforeSet is set to true (default), the function clears the edge container of the mesh and then adds a number of edges that depends on the given edgeNumber. In this scenario, all the old edges with their components stored in the mesh before calling this function are lost.
If the argument clearBeforeSet is set to false, the function checks that the given edgeNumber is equal to the number of edges of the mesh. If this is not the case, an exception is thrown. Then, the function sets the indices of the edges of the mesh from the input edge buffer. In this scenario, all the components (except the indices) of the edges stored in the mesh before calling this function are preserved.
All the other containers of the mesh are left as they are. Pointers to edges stored in the other containers of the mesh are still valid only if the number of edges is not changed (same allocation policy of the std::vector).
| MeshType | the type of the mesh to be filled. It must satisfy the EdgeMeshConcept. |
| [in/out] | mesh: the mesh on which import the input edges. | |
| [in] | buffer | a contiguous array of #E*2 values containing the indices of the vertices of the edges of the mesh. |
| [in] | edgeNumber | the number of edges contained in the input buffer. |
| [in] | clearBeforeSet | if true, the function clears the container of the edges of the mesh before adding the edges from the input buffer. If false, the function sets the indices from the input buffer to the edges of the mesh, leaving all the other components untouched. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to edgeNumber. |
| void vcl::edgeNormalsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the edge normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*3 scalars, where each row contains the 3 components of the normal of a edge.
If not specified, the number of normals in the input buffer is assumed to be at least the number of edges of the mesh. The extra normals are ignored.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-edge normal component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the EdgeMeshConcept. |
| [in/out] | mesh: the mesh on which import the input edge normals. | |
| [in] | buffer | a contiguous array containing the normals of the edges of the mesh. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of edges of the mesh. |
| void vcl::edgeQualityFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the edge quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #F scalars, where each value contains the quality of a edge.
If not specified, the number of quality values in the input buffer is assumed to be at least the number of edges of the mesh. The extra quality values are ignored.
The function enables the per-edge quality component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input edge quality. | |
| [in] | buffer | the input edge quality buffer. |
| void vcl::edgeSelectionFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the edge selection of the given input mesh from the input selection buffer.
The number of elements of the input buffer is expected to be at least the number edges of the mesh. The extra elements are ignored.
| MeshType | the type of the mesh to be filled. It must satisfy the EdgeMeshConcept. |
| [in/out] | mesh: the mesh on which import the input edge selection. | |
| [in] | buffer | the input edge selection buffer. |
| [in] | elementNumber | the number of elements contained in the input buffer. |
| void vcl::elementColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| Color::Format | colorFormat | ||
| ) |
Sets the element identified by ELEM_ID color of the given input mesh from the input buffer, that is expected to be a contiguous array of #E 32 bit values, on each of them the color is packed using the provided colorFormat.
If not specified, the number of colors in the input buffer is assumed to be at least the number of ELEM_ID elements of the mesh. The extra colors are ignored.
The function enables the per-element color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input element color. | |
| [in] | buffer | the input element color buffer. |
| [in] | colorFormat | the format used to pack the color in a single 32 bit value. |
| void vcl::elementColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | channelsNumber = 4, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| Color::Representation | representation = Color::Representation::INT_0_255, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the element identified by ELEM_ID colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #E*3 or #E*4 scalars, where each row contains the 3 or 4 components of the color of a element.
If not specified, the number of colors in the input buffer is assumed to be at least the number of ELEM_ID elements of the mesh. The extra colors are ignored.
Scalars can be either in the range [0,255] or in the range [0,1], as specified by the representation argument. The default is [0,255].
The number of channels can be either 3 (RGB) or 4 (RGBA), as specified by the channelsNumber argument. The default is 4.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-element color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input element colors. | |
| [in] | buffer | a contiguous array containing the colors of the elements of the mesh. |
| [in] | channelsNumber | the number of channels per color in the input buffer. It can be either 3 (RGB) or 4 (RGBA). |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | representation | the representation of the color scalars in the input buffer. It can be either in the range [0,255] or in the range [0,1]. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of ELEM_ID elements of the mesh. |
| void vcl::elementNormalsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the element identified by ELEM_ID normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #E*3 scalars, where each row contains the 3 components of the normal of a element.
If not specified, the number of normals in the input buffer is assumed to be at least the number of ELEM_ID elements of the mesh. The extra normals are ignored.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-element normal component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input element normals. | |
| [in] | buffer | a contiguous array containing the normals of the elements of the mesh. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of ELEM_ID elements of the mesh. |
| void vcl::elementQualityFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the element identified by ELEM_ID quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #E scalars, where each value contains the quality of a element.
If not specified, the number of quality values in the input buffer is assumed to be at least the number of ELEM_ID elements of the mesh. The extra quality values are ignored.
The function enables the per-element quality component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input element quality. | |
| [in] | buffer | the input element quality buffer. |
| void vcl::elementSelectionFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the element identified by ELEM_ID selection of the given input mesh from the input selection buffer.
The number of elements of the input buffer is expected to be at least the number of ELEM_ID elements of the mesh. The extra elements are ignored.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input element selection. | |
| [in] | buffer | the input element selection buffer. |
| void vcl::faceColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| Color::Format | colorFormat | ||
| ) |
Sets the face color of the given input mesh from the input buffer, that is expected to be a contiguous array of #V 32 bit values, on each of them the color is packed using the provided colorFormat.
If not specified, the number of colors in the input buffer is assumed to be at least the number of faces of the mesh. The extra colors are ignored.
The function enables the per-face color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input face color. | |
| [in] | buffer | the input face color buffer. |
| [in] | colorFormat | the format used to pack the color in a single 32 bit value. |
| void vcl::faceColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | channelsNumber = 4, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| Color::Representation | representation = Color::Representation::INT_0_255, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the face colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*3 or #F*4 scalars, where each row contains the 3 or 4 components of the color of a face.
If not specified, the number of colors in the input buffer is assumed to be at least the number of faces of the mesh. The extra colors are ignored.
Scalars can be either in the range [0,255] or in the range [0,1], as specified by the representation argument. The default is [0,255].
The number of channels can be either 3 (RGB) or 4 (RGBA), as specified by the channelsNumber argument. The default is 4.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-face color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the FaceMeshConcept. |
| [in/out] | mesh: the mesh on which import the input face colors. | |
| [in] | buffer | a contiguous array containing the colors of the elements of the mesh. |
| [in] | channelsNumber | the number of channels per color in the input buffer. It can be either 3 (RGB) or 4 (RGBA). |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | representation | the representation of the color scalars in the input buffer. It can be either in the range [0,255] or in the range [0,1]. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of faces of the mesh. |
| void vcl::faceIndicesFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | faceNumber, | ||
| uint | faceSize = 3, |
||
| bool | clearBeforeSet = true, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the face indices of the given input mesh from the input face buffer, that is expected to be a contiguous array of integers, where each row contains the indices of the vertices of a face.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
If the MeshType is not a polygonal mesh (e.g. a triangle mesh), the given faceSize must be equal to the number of vertices of each face of the mesh (e.g. 3 for triangle meshes, 4 for quad meshes, etc.). If this condition is not satisfied, an exception is thrown.
If the MeshType is a polygonal mesh, the size of each polygonal face is determined by counting the number of valid vertex indices in each row of the input buffer. Valid vertex indices are non-negative and not equal to UINT_NULL.
If the argument clearBeforeSet is set to true (default), the function clears the face container of the mesh and then adds a number of faces that depends on the given faceNumber. In this scenario, all the old faces with their components stored in the mesh before calling this function are lost.
If the argument clearBeforeSet is set to false, the function checks that the given faceNumber is equal to the number of faces of the mesh. If this is not the case, an exception is thrown. Then, the function sets the indices of the faces of the mesh from the input buffer. In this scenario, all the components (except the indices) of the faces stored in the mesh before calling this function are preserved.
All the other containers of the mesh are left as they are. Pointers to faces stored in the other containers of the mesh are still valid only if the number of faces is not changed (same allocation policy of the std::vector).
| MeshType | the type of the mesh to be filled. It must satisfy the FaceMeshConcept. |
| FMatrix | the type of the input face matrix. It must satisfy the MatrixConcept. |
| [in/out] | mesh: the mesh on which import the input faces. | |
| [in] | buffer | a contiguous array of #F*faceSize values containing the indices of the vertices of the faces of the mesh. |
| [in] | faceNumber | the number of faces contained in the input buffer. |
| [in] | faceSize | the number of vertex indices per face contained in the input buffer. If the MeshType is not a polygonal mesh (e.g. a triangle mesh), this parameter must be equal to the number of vertices of each face of the mesh (e.g. 3 for triangle meshes, 4 for quad meshes, etc.). |
| [in] | clearBeforeSet | if true, the function clears the container of the faces of the mesh before adding the faces from the input buffer. If false, the function sets the indices from the input buffer to the faces of the mesh, leaving all the other components untouched. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to faceNumber. |
| void vcl::faceMaterialIndicesFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the face material indices of the given input mesh from the input material indices buffer, that is expected to be a contiguous array of #F scalars, where each value contains the material index of a face.
If not specified, the number of material indices values in the input buffer is assumed to be at least the number of faces of the mesh. The extra material indices values are ignored.
The function enables the per-face material index component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the FaceMeshConcept. |
| [in/out] | mesh: the mesh on which import the input face material indices. | |
| [in] | buffer | the input face material indices buffer. |
| void vcl::faceNormalsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the face normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*3 scalars, where each row contains the 3 components of the normal of a face.
If not specified, the number of normals in the input buffer is assumed to be at least the number of faces of the mesh. The extra normals are ignored.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-face normal component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the FaceMeshConcept. |
| [in/out] | mesh: the mesh on which import the input face normals. | |
| [in] | buffer | a contiguous array containing the normals of the faces of the mesh. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of faces of the mesh. |
| void vcl::faceQualityFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the face quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #F scalars, where each value contains the quality of a face.
If not specified, the number of quality values in the input buffer is assumed to be at least the number of faces of the mesh. The extra quality values are ignored.
The function enables the per-face quality component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input face quality. | |
| [in] | buffer | the input face quality buffer. |
| void vcl::faceSelectionFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the face selection of the given input mesh from the input selection buffer.
The number of elements of the input buffer is expected to be at least the number faces of the mesh. The extra elements are ignored.
| MeshType | the type of the mesh to be filled. It must satisfy the FaceMeshConcept. |
| [in/out] | mesh: the mesh on which import the input face selection. | |
| [in] | buffer | the input face selection buffer. |
| void vcl::faceWedgeTexCoordsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | largestFaceSize = 3, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the face wedge texcoords of the given input mesh from the input buffer, that is expected to be a contiguous array of #F*(LFS*2) of scalars, where each row contains the 2*largetFaceSize components of the wedge texture coordinates of a face.
If not specified, the number of per face wedge texcoords in the input buffer is assumed to be at least the number of faces of the mesh.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The number of columns of the input buffer must be equal to 2*largestFaceSize, where largestFaceSize is the size of the largest face of the mesh. If a face has a size smaller than largestFaceSize, only the first 2*faceSize columns of the corresponding row are used.
The function enables the per-face wedge texcoords component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the FaceMeshConcept. |
| [in/out] | mesh: the mesh on which import the input wedge texcoords. | |
| [in] | buffer | a contiguous array containing the wedge texcoords of the faces of the mesh. |
| [in] | largestFaceSize | the largest size of the faces, that corresponds to the number of columns of the input buffer divided by 2 (u and v). |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of faces of the mesh. |
| void vcl::vertexColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| Color::Format | colorFormat | ||
| ) |
Sets the vertex color of the given input mesh from the input buffer, that is expected to be a contiguous array of #V 32 bit values, on each of them the color is packed using the provided colorFormat.
If not specified, the number of colors in the input buffer is assumed to be at least the number of vertices of the mesh. The extra colors are ignored.
The function enables the per-vertex color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertex color. | |
| [in] | buffer | the input vertex color buffer. |
| [in] | colorFormat | the format used to pack the color in a single 32 bit value. |
| void vcl::vertexColorsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | channelsNumber = 4, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| Color::Representation | representation = Color::Representation::INT_0_255, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the vertex colors of the given input mesh from the input buffer, that is expected to be a contiguous array of #V*3 or #V*4 scalars, where each row contains the 3 or 4 components of the color of a vertex.
If not specified, the number of colors in the input buffer is assumed to be at least the number of vertices of the mesh. The extra colors are ignored.
Scalars can be either in the range [0,255] or in the range [0,1], as specified by the representation argument. The default is [0,255].
The number of channels can be either 3 (RGB) or 4 (RGBA), as specified by the channelsNumber argument. The default is 4.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-vertex color component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertex colors. | |
| [in] | buffer | a contiguous array containing the colors of the elements of the mesh. |
| [in] | channelsNumber | the number of channels per color in the input buffer. It can be either 3 (RGB) or 4 (RGBA). |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | representation | the representation of the color scalars in the input buffer. It can be either in the range [0,255] or in the range [0,1]. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of vertices of the mesh. |
| void vcl::vertexMaterialIndicesFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the vertex material indices of the given input mesh from the input material indices buffer, that is expected to be a contiguous array of #V scalars, where each value contains the material index of a vertex.
If not specified, the number of material indices values in the input buffer is assumed to be at least the number of vertices of the mesh. The extra material indices values are ignored.
The function enables the per-vertex material index component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertex material indices. | |
| [in] | buffer | the input vertex material indices buffer. |
| void vcl::vertexNormalsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the vertex normals of the given input mesh from the input buffer, that is expected to be a contiguous array of #V*3 scalars, where each row contains the 3 components of the normal of a vertex.
If not specified, the number of normals in the input buffer is assumed to be at least the number of vertices of the mesh. The extra normals are ignored.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
The function enables the per-vertex normal component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertex normals. | |
| [in] | buffer | a contiguous array containing the normals of the vertices of the mesh. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of vertices of the mesh. |
| void vcl::vertexPositionsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| uint | vertexNumber, | ||
| bool | clearBeforeSet = true, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the vertex positions of the given input mesh from the input buffer, that is expected to be a contiguous array of scalars, where each row contains the 3 components of the position of a vertex.
The layout of the buffer can be either row-major or column-major, as specified by the storage argument. The default is row-major.
If the argument clearBeforeSet is set to true (default), the function clears the vertex container of the mesh and then adds a number of vertices that depends on the given vertexNumber. In this scenario, all the old vertices with their components stored in the mesh before calling this function are lost.
If the argument clearBeforeSet is set to false, the function checks that the given vertexNumber is equal to the number of vertices of the mesh. If this is not the case, an exception is thrown. Then, the function sets the positions of the vertices of the mesh from the input buffer. In this scenario, all the components (except the positions) of the vertices stored in the mesh before calling this function are preserved.
All the other containers of the mesh are left as they are. Pointers to vertices stored in the other containers of the mesh are still valid only if the number of vertices is not changed (same allocation policy of the std::vector).
| vcl::WrongSizeException | if clearBeforeSet is false and vertexNumber != mesh.vertexNumber(). |
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertices. | |
| [in] | buffer | a contiguous array containing the positions of the vertices of the mesh. |
| [in] | vertexNumber | the number of vertices contained in the input buffer. |
| [in] | clearBeforeSet | if true, the function clears the container of the vertices of the mesh before adding the vertices from the input buffer. If false, the function sets the positions in the input buffer to the vertices of the mesh, leaving all the other components untouched. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to vertexNumber. |
| void vcl::vertexQualityFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the vertex quality of the given input mesh from the input quality buffer, that is expected to be a contiguous array of #V scalars, where each value contains the quality of a vertex.
If not specified, the number of quality values in the input buffer is assumed to be at least the number of vertices of the mesh. The extra quality values are ignored.
The function enables the per-vertex quality component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertex quality. | |
| [in] | buffer | the input vertex quality buffer. |
| void vcl::vertexSelectionFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer | ||
| ) |
Sets the vertex selection of the given input mesh from the input selection buffer.
The number of elements of the input buffer is expected to be at least the number vertices of the mesh. The extra elements are ignored.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input vertex selection. | |
| [in] | buffer | the input vertex selection buffer. |
| void vcl::vertexTexCoordsFromBuffer | ( | MeshType & | mesh, |
| const auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Sets the vertex texcoords of the given input mesh from the input buffer, that is expected to be a contiguous array of #V*2 scalars, where each row contains the 2 components of the texture coordinates of a vertex.
If not specified, the number of texcoords in the input buffer is assumed to be at least the number of vertices of the mesh. The extra texcoords are ignored.
The function enables the per-vertex texcoords component if it is not already enabled.
| MeshType | the type of the mesh to be filled. It must satisfy the MeshConcept. |
| [in/out] | mesh: the mesh on which import the input texcoords. | |
| [in] | buffer | a contiguous array containing the texcoords of the vertices of the mesh. |
| [in] | storage | the storage type of the input buffer. It can be either row-major or column-major. |
| [in] | rowNumber | if the storage type is column-major, this parameter specifies the number of rows in the input buffer. If it is not specified (default), it is assumed to be equal to the number of vertices of the mesh. |