Class for specifying indices of vertices for defining a DIM-dimensional polytope.
More...
|
| | Polytope () |
| | Creates an empty polytope. More...
|
| |
| template<typename It > |
| | Polytope (It begin, It end) |
| | Creates a polytope from a list of (DIM-1)-dimensional polytopes denoting the faces of this polytope. More...
|
| |
| | Polytope (std::set< Polytope< DIM-1 >> &&faces) |
| | Creates a polytope from a list of DIM-1 dimensional polytopes denoting the faces of this polytope. More...
|
| |
| | Polytope (const std::initializer_list< Polytope< DIM-1 >> &faces) |
| | Creates a polytope from a list of DIM-1 dimensional polytopes denoting the faces of this polytope. More...
|
| |
| void | AddFace (Polytope< DIM-1 > &&face) |
| | Adds a face to the polytope. More...
|
| |
| void | AddFace (const Polytope< DIM-1 > &face) |
| | Adds a face to the polytope. More...
|
| |
| template<typename... ARGS> |
| void | AddFace (const ARGS &... face) |
| | Adds a face to the polytope by in-place construction. More...
|
| |
| const std::set< Polytope< DIM-1 > > | Faces () const |
| | Gets a list of the faces in the polytope. More...
|
| |
| template<typename V > |
| bool | Validate ([[maybe_unused]] const V &vertexList) const |
| | Checks if the polytope defines a valid polytope. More...
|
| |
| int | Compare (const Polytope &rhs) const |
| | Compares this polytope to the specified polytope with strict ordering. More...
|
| |
|
(Note that these are not member functions.)
|
| template<std::size_t DIM> |
| bool | operator== (const Polytope< DIM > &lhs, const Polytope< DIM > &rhs) |
| | Checks if the specified polytopes are equivalent (same faces) More...
|
| |
| template<std::size_t DIM> |
| bool | operator!= (const Polytope< DIM > &lhs, const Polytope< DIM > &rhs) |
| | Checks if the specified polytopes are not equivalent (different faces) More...
|
| |
| template<std::size_t DIM> |
| bool | operator< (const Polytope< DIM > &lhs, const Polytope< DIM > &rhs) |
| | Less than operator for strict ordering of polytopes. More...
|
| |
| template<std::size_t DIM> |
| bool | operator<= (const Polytope< DIM > &lhs, const Polytope< DIM > &rhs) |
| | Less than or equal operator for strict ordering of polytopes. More...
|
| |
| template<std::size_t DIM> |
| bool | operator> (const Polytope< DIM > &lhs, const Polytope< DIM > &rhs) |
| | Greater than operator for strict ordering of polytopes. More...
|
| |
| template<std::size_t DIM> |
| bool | operator>= (const Polytope< DIM > &lhs, const Polytope< DIM > &rhs) |
| | Greater than or equal operator for strict ordering of polytopes. More...
|
| |
| Polytope< 3 > | CreateTetrahedron (std::size_t p1, std::size_t p2, std::size_t p3, std::size_t apex) |
| | Creates a polytope for a tetrahedron element. More...
|
| |
| Polytope< 3 > | CreatePyramid (std::size_t p1, std::size_t p2, std::size_t p3, std::size_t p4, std::size_t apex) |
| | Creates a polytope for a pyramid element. More...
|
| |
| Polytope< 3 > | CreateHexahedron (std::size_t p1, std::size_t p2, std::size_t p3, std::size_t p4, std::size_t p5, std::size_t p6, std::size_t p7, std::size_t p8) |
| | Creates a polytope for a hexahedron element. More...
|
| |
| Polytope< 3 > | CreatePrism (std::size_t p1, std::size_t p2, std::size_t p3, std::size_t p4, std::size_t p5, std::size_t p6) |
| | Creates a polytope for a triangular prism element. More...
|
| |
| Polytope< 3 > | CreatePolygonalPrism (const std::initializer_list< std::size_t > &points) |
| | Creates a polytope for a polygon extruded as a prism. More...
|
| |
| template<typename... T> |
| Polytope< 3 > | CreatePolygonalPrism (std::size_t p1, T... pN) |
| | Creates a polytope for a polygon extruded as a prism. More...
|
| |
| Polytope< 3 > | CreatePolygonalPyramid (const std::initializer_list< std::size_t > &points) |
| | Creates a polytope for a pyramid by extending polygon to a point. More...
|
| |
| template<typename... T> |
| Polytope< 3 > | CreatePolygonalPyramid (std::size_t p1, T... pN) |
| | Creates a polytope for a pyramid by extending polygon to a point. More...
|
| |
template<std::size_t DIM>
class ptems::Polytope< DIM >
Class for specifying indices of vertices for defining a DIM-dimensional polytope.
- Template Parameters
-
template<std::size_t DIM>
template<typename V >
| bool ptems::Polytope< DIM >::Validate |
( |
[[maybe_unused] ] const V & |
vertexList | ) |
const |
|
inline |
Checks if the polytope defines a valid polytope.
This check does not need to be complete (returning true does not guarantee a valid polytope), but at least the following conditions should be met:
- At least DIM+1 faces
- Each face of a face of this polytope appears exactly twice (shared between exactly two faces).
- Each face also returns true for Validate(vertexList)
- Two dimensional (sub)faces are planar
This SHOULD guarantee a closed polytope, but no guarantee about simplicity
- Template Parameters
-
| V | Type of vertex list - must be indexable |
- Parameters
-
| vertexList | List of vertices to look up the polytope vertices in |
- Returns
- true if valid; false otherwise