geomc 1.0
A c++ linear algebra template library
|
Helper class which virtualizes the static polymorphism of Convex shapes. More...
#include <geomc/shape/Shape.h>
Public Types | |
using | elem_t |
The coordinate type of this object. | |
using | point_t |
The type of a point in this object's space. | |
Public Member Functions | |
Rect< T, N > | bounds () const |
point_t | convex_support (point_t d) const |
bool | intersects (const Convex< T, N, Shape > &other) const |
Convex shape overlap test. | |
Static Public Attributes | |
static constexpr index_t | N |
The dimension of this object. | |
Protected Member Functions | |
virtual Rect< T, N > | _impl_bounds () const =0 |
virtual point_t | _impl_convex_support (Vec< T, N > p) const =0 |
Helper class which virtualizes the static polymorphism of Convex shapes.
This allows the various Shape classes to interoperate with pointers in specific cases where it's needed. An example is in the implementation of gjk_intersect(Shape1, Shape2)
, which should not instantiate a template for each combination of shape classes.
To convert a shape to an AnyConvex, call the convenience function as_any_convex(Shape)
.
|
inherited |
The type of a point in this object's space.
An N-vector of T if N > 1, otherwise a T.
Convex shape overlap test.
other
; false otherwise.