|
Visual Computing Library
devel
|
List Export Mesh to Buffer algorithms. More...

Functions | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeAdjacentEdgesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentEdgesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent edges indices for each edge of a Mesh. The number of adjacent edges for each edge can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent edges than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL. | |
| template<FaceMeshConcept MeshType> requires (EdgeMeshConcept<MeshType>) | |
| void | vcl::edgeAdjacentFacesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentFacesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent faces indices for each edge of a Mesh. The number of adjacent faces for each edge can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentFacesSize parameter. For elements that have less adjacent faces than largestAdjacentFacesSize, the remaining entries are filled with UINT_NULL. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::edgeVertexIndicesToBuffer (const MeshType &mesh, auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, bool getIndicesAsIfContainerCompact=true, uint rowNumber=UINT_NULL) |
| Export into a buffer the vertex indices for each edge of a Mesh. | |
| template<uint ELEM_ID, EdgeMeshConcept MeshType> | |
| void | vcl::elementAdjacentEdgesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentEdgesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent edges indices for each ELEM_ID element of a Mesh. The number of adjacent edges for each ELEM_ID can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent faces than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL. | |
| template<uint ELEM_ID, FaceMeshConcept MeshType> | |
| void | vcl::elementAdjacentFacesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentFacesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent faces indices for each ELEM_ID element of a Mesh. The number of adjacent faces for each ELEM_ID can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentFacesSize parameter. For elements that have less adjacent faces than largestAdjacentFacesSize, the remaining entries are filled with UINT_NULL. | |
| template<EdgeMeshConcept MeshType> requires (FaceMeshConcept<MeshType>) | |
| void | vcl::faceAdjacentEdgesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentEdgesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent edges indices for each face of a Mesh. The number of adjacent edges for each face can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent edges than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceAdjacentFacesToBuffer (const MeshType &mesh, auto *buffer, uint largestFacesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
| Export into a buffer the adjacent faces indices for each face of a Mesh. The number of adjacent faces for each face is expected to be equal to the largestFaceSize (see vcl::largestFaceSize). | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceMaterialIndicesToBuffer (const MeshType &mesh, auto *buffer) |
| Export into a buffer the per face material indices of a mesh. | |
| template<FaceMeshConcept MeshType> | |
| uint | vcl::faceSizesToBuffer (const MeshType &mesh, auto *buffer) |
| Export into a buffer the sizes of the faces of a Mesh, and return the sum of the sizes. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceVertexIndicesToBuffer (const MeshType &mesh, auto *buffer, bool getIndicesAsIfContainerCompact=true) |
| Export into a buffer the vertex indices for each face of a Mesh. Faces can be polygons. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceVertexIndicesToBuffer (const MeshType &mesh, auto *buffer, uint largestFaceSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, bool getIndicesAsIfContainerCompact=true, uint rowNumber=UINT_NULL) |
Export into a buffer the vertex indices for each face of a Mesh. Faces can be polygons, and the number of output columns can be set by the user with the largestFaceSize parameter. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::faceWedgeTexCoordsToBuffer (const MeshType &mesh, auto *buffer, uint largestFaceSize=3, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export the selection status of the elements identified by ELEM_ID of a mesh to a buffer. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::triangulatedFaceMaterialIndicesToBuffer (const MeshType &mesh, auto *buffer, const TriPolyIndexBiMap &indexMap) |
| Export into a buffer the per triangle material indices of a mesh. Triangles are computed by triangulating the faces of the mesh. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::triangulatedFaceVertexIndicesToBuffer (const MeshType &mesh, auto *buffer, TriPolyIndexBiMap &indexMap=detail::indexMap, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint numTriangles=UINT_NULL, bool getIndicesAsIfContainerCompact=true) |
| Export into a buffer the vertex indices for each triangle computed by triangulating the faces of a Mesh. | |
| template<EdgeMeshConcept MeshType> | |
| void | vcl::vertexAdjacentEdgesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentEdgesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent edges indices for each vertex of a Mesh. The number of adjacent edges for each vertex can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent edges than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::vertexAdjacentFacesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentFacesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent faces indices for each vertex of a Mesh. The number of adjacent faces for each vertex can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentFacesSize parameter. For elements that have less adjacent faces than largestAdjacentFacesSize, the remaining entries are filled with UINT_NULL. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexAdjacentVerticesToBuffer (const MeshType &mesh, auto *buffer, uint largestAdjacentVerticesSize, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
Export into a buffer the adjacent vertex indices for each vertex of a Mesh. The number of adjacent vertices for each vertex can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentVerticesSize parameter. For vertices that have less adjacent vertices than largestAdjacentVerticesSize, the remaining entries are filled with UINT_NULL. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexPositionsToBuffer (const MeshType &mesh, auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, uint rowNumber=UINT_NULL) |
| Export the vertex positions of a mesh to a buffer. | |
| template<MeshConcept MeshType> | |
| void | vcl::vertexQuadIndicesToBuffer (const MeshType &mesh, auto *buffer) |
| Export the indices of a quad per vertex to a buffer. | |
| template<FaceMeshConcept MeshType> | |
| void | vcl::wireframeVertexIndicesToBuffer (const MeshType &mesh, auto *buffer, MatrixStorageType storage=MatrixStorageType::ROW_MAJOR, bool getIndicesAsIfContainerCompact=true, uint rowNumber=UINT_NULL) |
| Export into a buffer the vertex indices for each edge that composes the wireframe of the Mesh (i.e., the edges of the faces). | |
List Export Mesh to Buffer algorithms.
They allow to export mesh data to pre-allocated buffers.
| void vcl::edgeAdjacentEdgesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentEdgesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent edges indices for each edge of a Mesh. The number of adjacent edges for each edge can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent edges than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerEdgeAdjacentEdgesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentEdgesSize | size of the largest per-edge edge adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of edges in the mesh) - used only when storage is column major |
| void vcl::edgeAdjacentFacesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentFacesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent faces indices for each edge of a Mesh. The number of adjacent faces for each edge can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentFacesSize parameter. For elements that have less adjacent faces than largestAdjacentFacesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerEdgeAdjacentFacesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentFacesSize | size of the largest per-edge face adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of edges in the mesh) - used only when storage is column major |
| void vcl::edgeVertexIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| bool | getIndicesAsIfContainerCompact = true, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the vertex indices for each edge of a Mesh.
This function exports the vertex indices of the edges of a mesh to a buffer. Indices are stored following the order the edges appear in the mesh. The buffer must be preallocated with the correct size (number of edges times 2).
getIndicesAsIfContainerCompact == true) the function stores the vertex indices as if the vertex container of the mesh is compact. This means that, if the mesh has deleted vertices, the vertex indices stored in the buffer may not correspond to the vertex indices of the mesh. If you want to store the actual vertex indices in the input mesh, set getIndicesAsIfContainerCompact to false.| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | getIndicesAsIfContainerCompact | if true, the function will store the vertex indices as if the vertex container of the mesh is compact. If false, the actual vertex indices in the input mesh will be stored. |
| [in] | rowNumber | number of rows of the matrix (if different from the number of edges in the mesh) - used only when storage is column major |
| void vcl::elementAdjacentEdgesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentEdgesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent edges indices for each ELEM_ID element of a Mesh. The number of adjacent edges for each ELEM_ID can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent faces than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerElementAdjacentEdgesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentEdgesSize | size of the largest per-element edge adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of elements in the mesh) - used only when storage is column major |
| void vcl::elementAdjacentFacesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentFacesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent faces indices for each ELEM_ID element of a Mesh. The number of adjacent faces for each ELEM_ID can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentFacesSize parameter. For elements that have less adjacent faces than largestAdjacentFacesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerElementAdjacentFacesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentFacesSize | size of the largest per-element face adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of elements in the mesh) - used only when storage is column major |
| void vcl::faceAdjacentEdgesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentEdgesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent edges indices for each face of a Mesh. The number of adjacent edges for each face can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent edges than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerFaceAdjacentEdgesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentEdgesSize | size of the largest per-face edge adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of faces in the mesh) - used only when storage is column major |
| void vcl::faceAdjacentFacesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestFacesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent faces indices for each face of a Mesh. The number of adjacent faces for each face is expected to be equal to the largestFaceSize (see vcl::largestFaceSize).
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestFacesSize | size of the largest face in the mesh |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of faces in the mesh) - used only when storage is column major |
| void vcl::faceMaterialIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer | ||
| ) |
Export into a buffer the per face material indices of a mesh.
This function exports the per face material indices of a mesh to a buffer. Material indices are stored in the buffer following the order the faces appear in the mesh. The buffer must be preallocated with the correct size (number of faces).
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| uint vcl::faceSizesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer | ||
| ) |
Export into a buffer the sizes of the faces of a Mesh, and return the sum of the sizes.
This function could be useful when dealing with polygonal meshes: it exports the sizes of the faces of a mesh to a buffer. Sizes are stored following the order the faces appear in the mesh. The buffer must be preallocated with the correct size (number of faces).
The return value is the sum of the sizes of the faces. This value is useful when you need to allocate a buffer to store the vertex indices of the faces (its size is the sum of the face sizes).
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| void vcl::faceVertexIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| bool | getIndicesAsIfContainerCompact = true |
||
| ) |
Export into a buffer the vertex indices for each face of a Mesh. Faces can be polygons.
This function exports the vertex indices of the polygonal faces of a mesh to a buffer. Indices are stored consecutively in the buffer, following the order the faces appear in the mesh. The buffer must be preallocated with the correct size (sum of the sizes of the faces).
You can use the function vcl::faceSizesToBuffer to get the sizes of the faces and allocate the buffer accordingly:
getIndicesAsIfContainerCompact == true) the function stores the vertex indices as if the vertex container of the mesh is compact. This means that, if the mesh has deleted vertices, the vertex indices stored in the buffer may not correspond to the vertex indices of the mesh. If you want to store the actual vertex indices in the input mesh, set getIndicesAsIfContainerCompact to false.| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | getIndicesAsIfContainerCompact | if true, the function will store the vertex indices as if the vertex container of the mesh is compact. If false, the actual vertex indices in the input mesh will be stored. |
| void vcl::faceVertexIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestFaceSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| bool | getIndicesAsIfContainerCompact = true, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the vertex indices for each face of a Mesh. Faces can be polygons, and the number of output columns can be set by the user with the largestFaceSize parameter.
This function exports the vertex indices of the polygonal faces of a mesh to a buffer. Indices are stored following the order the faces appear in the mesh. The buffer must be preallocated with the correct size (number of faces times largestFaceSize). For each face that has less vertices than the largest face size, the remaining indices are set to -1.
For triangle meshes, you can set largestFaceSize to 3. For polygonal meshes, you can use the function vcl::largestFaceSize to get the largest face size and allocate the buffer accordingly:
getIndicesAsIfContainerCompact == true) the function stores the vertex indices as if the vertex container of the mesh is compact. This means that, if the mesh has deleted vertices, the vertex indices stored in the buffer may not correspond to the vertex indices of the mesh. If you want to store the actual vertex indices in the input mesh, set getIndicesAsIfContainerCompact to false.| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestFaceSize | size of the largest face in the mesh |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | getIndicesAsIfContainerCompact | if true, the function will store the vertex indices as if the vertex container of the mesh is compact. If false, the actual vertex indices in the input mesh will be stored. |
| [in] | rowNumber | number of rows of the matrix (if different from the number of faces in the mesh) - used only when storage is column major |
| void vcl::faceWedgeTexCoordsToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestFaceSize = 3, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export the selection status of the elements identified by ELEM_ID of a mesh to a buffer.
This function exports the selection status of the elements identified by ELEM_ID of a mesh to a buffer. Values are stored in the buffer following the order the elements appear in the mesh. The buffer must be preallocated with the correct size (number of elements).
Usage example with std::vector<bool>:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestFaceSize | size of the largest face in the mesh |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of faces in the mesh) - used only when storage is column major |
| void vcl::triangulatedFaceMaterialIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| const TriPolyIndexBiMap & | indexMap | ||
| ) |
Export into a buffer the per triangle material indices of a mesh. Triangles are computed by triangulating the faces of the mesh.
This function exports the per triangle material indices of a mesh to a buffer. Material indices are stored in the buffer following the order the faces appear in the mesh. The buffer must be preallocated with the correct size (number of triangles).
The function requires an already computed index map, which maps each triangle to the face index and vice versa. You can use the vcl::triangulatedFaceIndicesToBuffer function to get the index map. You can use the function vcl::countTriangulatedTriangles to get the number of resulting triangles and allocate the buffer accordingly.
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | indexMap | map from triangle index to face index |
| void vcl::triangulatedFaceVertexIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| TriPolyIndexBiMap & | indexMap = detail::indexMap, |
||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | numTriangles = UINT_NULL, |
||
| bool | getIndicesAsIfContainerCompact = true |
||
| ) |
Export into a buffer the vertex indices for each triangle computed by triangulating the faces of a Mesh.
This function exports the vertex indices of the triangles computed by triangulating the faces of a mesh to a buffer. Indices are stored following the order the faces appear in the mesh. The buffer must be preallocated with the correct size (number of resulting triangles times 3).
You can use the function vcl::countTriangulatedTriangles to get the number of resulting triangles and allocate the buffer accordingly:
The input indexMap is used to map each triangle to the face index. If the storage of the buffer is column major, the number of resulting triangles (that should be known when calling this function) should be given as input. If the number of resulting triangles is not given, the function will compute it again.
getIndicesAsIfContainerCompact == true) the function stores the vertex indices as if the vertex container of the mesh is compact. This means that, if the mesh has deleted vertices, the vertex indices stored in the buffer may not correspond to the vertex indices of the mesh. If you want to store the actual vertex indices in the input mesh, set getIndicesAsIfContainerCompact to false.| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [out] | indexMap | map from triangle index to face index |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | numTriangles | number of resulting triangles (necessary only if the storage is column major) |
| [in] | getIndicesAsIfContainerCompact | if true, the function will store the vertex indices as if the vertex container of the mesh is compact. If false, the actual vertex indices in the input mesh will be stored. |
| void vcl::vertexAdjacentEdgesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentEdgesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent edges indices for each vertex of a Mesh. The number of adjacent edges for each vertex can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentEdgesSize parameter. For elements that have less adjacent edges than largestAdjacentEdgesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerVertexAdjacentEdgesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentEdgesSize | size of the largest per-vertex edge adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of vertices in the mesh) - used only when storage is column major |
| void vcl::vertexAdjacentFacesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentFacesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent faces indices for each vertex of a Mesh. The number of adjacent faces for each vertex can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentFacesSize parameter. For elements that have less adjacent faces than largestAdjacentFacesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerVertexAdjacentFacesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentFacesSize | size of the largest per-vertex face adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of vertices in the mesh) - used only when storage is column major |
| void vcl::vertexAdjacentVerticesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| uint | largestAdjacentVerticesSize, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the adjacent vertex indices for each vertex of a Mesh. The number of adjacent vertices for each vertex can be different, so the user must provide the size of the largest adjacency list with the largestAdjacentVerticesSize parameter. For vertices that have less adjacent vertices than largestAdjacentVerticesSize, the remaining entries are filled with UINT_NULL.
You can use the function vcl::largestPerVertexAdjacentVerticesNumber to get the largest adjacency size and allocate the buffer accordingly:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | largestAdjacentVerticesSize | size of the largest per-vertex vertex adjacency list |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of vertices in the mesh) - used only when storage is column major |
| void vcl::vertexPositionsToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export the vertex positions of a mesh to a buffer.
This function exports the vertex positions of a mesh to a buffer. Vertices are stored in the buffer following the order they appear in the mesh. The buffer must be preallocated with the correct size (number of vertices times the number of positions per vertex).
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | rowNumber | number of rows of the matrix (if different from the number of vertices in the mesh) - used only when storage is column major |
| void vcl::vertexQuadIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer | ||
| ) |
Export the indices of a quad per vertex to a buffer.
This function exports the vertex indices of a quad per vertex to a buffer. The buffer must be preallocated with the correct size (number of vertices times 6).
The indices are stored in the following order:
| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| void vcl::wireframeVertexIndicesToBuffer | ( | const MeshType & | mesh, |
| auto * | buffer, | ||
| MatrixStorageType | storage = MatrixStorageType::ROW_MAJOR, |
||
| bool | getIndicesAsIfContainerCompact = true, |
||
| uint | rowNumber = UINT_NULL |
||
| ) |
Export into a buffer the vertex indices for each edge that composes the wireframe of the Mesh (i.e., the edges of the faces).
This function exports the vertex indices of the wireframe edges of a mesh to a buffer. Indices are stored following the order the edges appear in the faces. The buffer must be preallocated with the correct size (number of references to vertices in the mesh faces times 2 - see countPerFaceVertexReferences).
getIndicesAsIfContainerCompact == true) the function stores the vertex indices as if the vertex container of the mesh is compact. This means that, if the mesh has deleted vertices, the vertex indices stored in the buffer may not correspond to the vertex indices of the mesh. If you want to store the actual vertex indices in the input mesh, set getIndicesAsIfContainerCompact to false.| [in] | mesh | input mesh |
| [out] | buffer | preallocated buffer |
| [in] | storage | storage type of the matrix (row or column major) |
| [in] | getIndicesAsIfContainerCompact | if true, the function will store the vertex indices as if the vertex container of the mesh is compact. If false, the actual vertex indices in the input mesh will be stored. |
| [in] | rowNumber | number of rows of the matrix (if different from the number of references to vertices in the mesh faces times 2) - used only when storage is column major |