|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Convex polytope. More...
#include <GREM/core/data/ConvexPolytope.hpp>
Public Types | |
| using | Vertex = ConvexPolytopeVertex<N, Scalar> |
| Vertex type of the convex polytope. | |
| using | Edge = ConvexPolytopeEdge<N, Scalar> |
| Edge type of the convex polytope. | |
| using | Face = ConvexPolytopeFace<N, Scalar> |
| Face type of the convex polytope. | |
Public Member Functions | |
| ConvexPolytope (Allocation< Vertex > vertices, Allocation< Face > faces, const Box< 2, Scalar > &boundingBox, Scalar boundingRadius) | |
| Construct a convex polygon from pre-calculated data. | |
| ConvexPolytope (Allocation< Vertex > vertices, Allocation< ConvexPolytopeEdgeIndex > vertexEdgeIndices, Allocation< Edge > edges, Allocation< Face > faces, const Box< 3, Scalar > &boundingBox, Scalar boundingRadius) | |
| Construct a convex polyhedron from pre-calculated data. | |
| ConvexPolytope (Span< const Vertex > vertices, const mat< N+1, N+1, Scalar > &transformation, ConvexPolytopeVertexIndex maxVertexCount=Limits< ConvexPolytopeVertexIndex >::MAX) | |
| Construct a convex polytope from the convex hull of a set of vertices. | |
| ConvexPolytope (Span< const Vertex > vertices, ConvexPolytopeVertexIndex maxVertexCount=Limits< ConvexPolytopeVertexIndex >::MAX) | |
| Construct a convex polytope from a set of vertices. | |
| Span< const Vertex > | getVertices () const noexcept |
| Get the vertices of the convex polytope. | |
| Span< const ConvexPolytopeEdgeIndex > | getVertexEdgeIndices () const noexcept |
| Get the vertex edge indices of the convex polytope. | |
| Span< const Edge > | getEdges () const noexcept |
| Get the edges of the convex polytope. | |
| Span< const Face > | getFaces () const noexcept |
| Get the faces of the convex polytope. | |
| Box< N, Scalar > | getBoundingBox () const noexcept |
| Get the bounding box of the convex polytope. | |
| Scalar | getBoundingRadius () const noexcept |
| Get the bounding radius of the convex polytope. | |
Convex polytope.
| N | number of dimensions of the world space (must be 2 or 3). |
| Scalar | scalar coordinate component type. |
| using grem::ConvexPolytope< N, Scalar >::Vertex = ConvexPolytopeVertex<N, Scalar> |
Vertex type of the convex polytope.
| using grem::ConvexPolytope< N, Scalar >::Edge = ConvexPolytopeEdge<N, Scalar> |
Edge type of the convex polytope.
| using grem::ConvexPolytope< N, Scalar >::Face = ConvexPolytopeFace<N, Scalar> |
Face type of the convex polytope.
|
inline |
Construct a convex polygon from pre-calculated data.
| vertices | vertices of the convex polyhedron. |
| faces | faces of the convex polygon. Must form a valid convex polygon with the given vertices. |
| boundingBox | local bounding box of the convex polygon. Must contain all of the given vertices. |
| boundingRadius | maximum distance from the origin of any vertex. Must be greater than or equal to the largest vertex vector length. |
| std::bad_alloc | on allocation failure. |
|
inline |
Construct a convex polyhedron from pre-calculated data.
| vertices | vertices of the convex polyhedron. |
| vertexEdgeIndices | outgoing edges corresponding to each vertex. Must have the same size as the vertex array. |
| edges | edges of the convex polyhedron. Must form a valid convex polyhedron with the given vertices and faces. |
| faces | faces of the convex polyhedron. Must form a valid convex polyhedron with the given vertices and edges. |
| boundingBox | local bounding box of the convex polygon. Must contain all of the given vertices. |
| boundingRadius | maximum distance from the origin of any vertex. Must be greater than or equal to the largest vertex vector length. |
|
inline |
Construct a convex polytope from the convex hull of a set of vertices.
| vertices | set of vertices to construct the convex polytope from. |
| transformation | transformation to apply to the vertices when building the convex hull. |
| maxVertexCount | maximum number of vertices to build the convex hull out of. |
| 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. |
|
inlineexplicit |
Construct a convex polytope from a set of vertices.
| vertices | set of vertices to construct the convex polytope from. |
| maxVertexCount | maximum number of vertices to build the convex hull out of. |
| 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 convex polytope.
|
inlinenodiscardnoexcept |
Get the vertex edge indices of the convex polytope.
|
inlinenodiscardnoexcept |
Get the edges of the convex polytope.
|
inlinenodiscardnoexcept |
Get the faces of the convex polytope.
|
inlinenodiscardnoexcept |
Get the bounding box of the convex polytope.
|
inlinenodiscardnoexcept |
Get the bounding radius of the convex polytope.