geomc 1.0
A c++ linear algebra template library
|
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>
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. | |
T | sdf (Vec< T, N > p) const |
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.