geomc 1.0
A c++ linear algebra template library
|
Base class describing convex shapes in N-dimensional space. More...
#include <geomc/shape/Shape.h>
Public Types | |
typedef PointType< T, N >::point_t | point_t |
typedef T | elem_t |
The coordinate type of this shape. | |
Public Member Functions | |
point_t | convex_support (point_t d) const |
Geometric convex support function. More... | |
template<typename Shape > | |
bool | intersects (const Convex< T, N, Shape > &other) const |
Convex shape overlap test. More... | |
Rect< T, N > | bounds () const |
Produces an axis-aligned box completely enclosing this shape. More... | |
Static Public Attributes | |
static constexpr size_t | N |
The dimension of this shape. | |
Base class describing convex shapes in N-dimensional space.
Uses the curiously-recurring template pattern to perform static polymorphism. Override convex_support()
in the derived implementation.
Produces an axis-aligned box completely enclosing this shape.
The default implementation calls convex_support()
along each of the principal axes to find the extents.
Geometric convex support function.
Returns the point on the surface of this convex shape that is furthest along direction d
(i.e., has the highest dot product with d
).
All shapes which implement this function automatically support geometrical intersection tests with any other Convex object.
d | Direction along which to find a support plane. |
Convex shape overlap test.
other
; false otherwise.