|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
#include <GREM/core/data/TriangleMesh.hpp>
Public Types | |
| using | Vertex = TriangleMeshVertex<N, Scalar> |
| Vertex type of the triangle mesh. | |
| using | VertexIndex = TriangleMeshVertexIndex |
| Vertex index type of the triangle mesh. | |
| using | FaceIndex = TriangleMeshFaceIndex |
| Face index type of the triangle mesh. | |
Public Member Functions | |
| TriangleMesh (Allocation< Vertex > vertices, Allocation< VertexIndex > indices) | |
| Construct a triangle mesh from a set of vertices. | |
| TriangleMesh (Span< const Vertex > vertices, Span< const VertexIndex > indices) | |
| Construct a triangle mesh from a set of vertices and indices. | |
| Span< const Vertex > | getVertices () const noexcept |
| Get the vertices of the mesh. | |
| Span< const VertexIndex > | getIndices () const noexcept |
| Get the vertex indices of the mesh. | |
| Box< N, Scalar > | getBoundingBox () const noexcept |
| Get the bounding box of the mesh. | |
| Scalar | getBoundingRadius () const noexcept |
| Get the bounding radius of the mesh. | |
| const LooseOrthtree< N, Scalar, FaceIndex > & | getFaceOrthtree () const noexcept |
| Get the orthtree of faces in the mesh. | |
Triangle mesh.
| N | number of dimensions of the world space (must be 2 or 3). |
| Scalar | scalar coordinate component type. |
| using grem::TriangleMesh< N, Scalar >::Vertex = TriangleMeshVertex<N, Scalar> |
Vertex type of the triangle mesh.
| using grem::TriangleMesh< N, Scalar >::VertexIndex = TriangleMeshVertexIndex |
Vertex index type of the triangle mesh.
| using grem::TriangleMesh< N, Scalar >::FaceIndex = TriangleMeshFaceIndex |
Face index type of the triangle mesh.
|
inline |
Construct a triangle mesh from a set of vertices.
| vertices | set of vertices to construct the triangle mesh from. |
| indices | set of vertex indices to construct the triangle mesh from. Each index must be less than the number of vertices. Size must be a multiple of 3. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
inline |
Construct a triangle mesh from a set of vertices and indices.
| vertices | read-only view over a set of vertices to construct the triangle mesh from. |
| indices | read-only view over a set of vertex indices to construct the triangle mesh from. Each index must be less than the number of vertices. Size must be a multiple of 3. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
inlinenodiscardnoexcept |
Get the vertices of the mesh.
|
inlinenodiscardnoexcept |
Get the vertex indices of the mesh.
|
inlinenodiscardnoexcept |
Get the bounding box of the mesh.
|
inlinenodiscardnoexcept |
Get the bounding radius of the mesh.
|
inlinenodiscardnoexcept |
Get the orthtree of faces in the mesh.