geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
Projectable< T, N, Derived > Class Template Reference

Base class describing N-dimensional shapes which implement the ability to project an arbitrary point to the nearest point on their surface. More...

#include <geomc/shape/Shape.h>

Inheritance diagram for Projectable< T, N, Derived >:
SdfEvaluable< T, N, Derived > Dilated< Hollow< Sphere< T, N > > > Rect< float, 1 > Rect< double, 1 > Rect< dual_t, 1 > Similar< Rect< T, N > >

Public Member Functions

Vec< T, N > clip (Vec< T, N > p) const
 Nearest point on the interior of the shape.
 
bool contains (Vec< T, N > p) const
 Shape-point overlap test.
 
Vec< T, N > normal (Vec< T, N > p) const
 Unit-length outward-facing direction.
 
Vec< T, N > project (Vec< T, N > p) const
 Nearest point on the surface of the shape.
 
sdf (Vec< T, N > p) const
 

Detailed Description

template<typename T, index_t N, typename Derived>
class geom::Projectable< T, N, Derived >

Base class describing N-dimensional shapes which implement the ability to project an arbitrary point to the nearest point on their surface.

Uses the curiously-recurring template pattern to perform static polymorphism. Override project() and at least one of sdf() or contains() in the derived implementation.


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