geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
AnyConvexImpl< Shape > Class Template Reference

Implementation of AnyConvex for a specific Shape. More...

#include <geomc/shape/Shape.h>

Inheritance diagram for AnyConvexImpl< Shape >:
AnyConvex< Shape::elem_t, Shape::N > Convex< Shape::elem_t, N, AnyConvex< Shape::elem_t, N > > Bounded< Shape::elem_t, N, AnyConvex< Shape::elem_t, N > > Dimensional< Shape::elem_t, N >

Public Types

using elem_t
 The coordinate type of this object.
 
using point_t
 The type of a point in this object's space.
 
typedef Shape::elem_t T
 

Public Member Functions

 AnyConvexImpl (const Shape &&s)
 
 AnyConvexImpl (const Shape &s)
 
Rect< Shape::elem_t, N > bounds () const
 
point_t convex_support (point_t d) const
 
point_t convex_support (point_t d) const
 Geometric convex support function.
 
bool intersects (const Convex< Shape::elem_t, N, Shape > &other) const
 Convex shape overlap test.
 

Public Attributes

Shape shape
 

Static Public Attributes

static constexpr index_t N = Shape::N
 

Protected Member Functions

virtual Rect< T, N > _impl_bounds () const
 
virtual point_t _impl_convex_support (Vec< T, N > p) const
 

Detailed Description

template<typename Shape>
class geom::AnyConvexImpl< Shape >

Implementation of AnyConvex for a specific Shape.

Member Typedef Documentation

◆ point_t

using point_t
inherited

The type of a point in this object's space.

An N-vector of T if N > 1, otherwise a T.

Member Function Documentation

◆ convex_support()

point_t convex_support ( point_t d) const
inlineinherited

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.

Parameters
dDirection along which to find a support plane.
Returns
A point on the surface of this convex shape.

◆ intersects()

bool intersects ( const Convex< Shape::elem_t, N, Shape > & other) const
inlineinherited

Convex shape overlap test.

Returns
True if and only if this convex shape overlaps other; false otherwise.

The documentation for this class was generated from the following file: