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 | |
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 |
Rect< T, N > | bounds () const |
bool | intersects (const Convex< T, N, Shape > &other) const |
Convex shape overlap test. More... | |
Static Public Attributes | |
static constexpr size_t | N = _N |
The dimension of this shape. | |
Protected Member Functions | |
virtual point_t | _impl_convex_support (Vec< T, N > p) const =0 |
virtual Rect< T, N > | _impl_bounds () 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)
.
Convex shape overlap test.
other
; false otherwise.