geomc 1.0
A c++ linear algebra template library
|
Selects the boundary of a shape. More...
#include <geomc/shape/Hollow.h>
Public Types | |
using | elem_t = typename Shape::elem_t |
using | T = elem_t |
Public Member Functions | |
Hollow () | |
Wrap a default-constructed shape with the identity transform. | |
Hollow (const Shape &shape) | |
Wrap a shape with a similarity transform. | |
Rect< T, N > | bounds () const |
Compute the axis-aligned bounding box of the shape. | |
Vec< T, N > | clip (Vec< T, N > p) const |
Nearest point on the interior of the shape to p ; the same as project(p) , since hollow shapes do not have an interior. | |
bool | contains (typename Shape::point_t p) const |
Shape-point intersection test. Always returns false , because hollow shapes are infinitely thin. | |
bool | contains (Vec< Shape::elem_t, N > p) const |
Shape-point overlap test. | |
T | measure_boundary () const |
Measure the boundary (surface area) of the shape. | |
Vec< T, N > | normal (Vec< T, N > p) const |
Normal vector at point p . | |
bool | operator== (const Hollow &other) const |
Shape equality test. | |
Vec< T, N > | project (Vec< T, N > p) const |
Project a point to the surface of this shape. | |
T | sdf (Vec< T, N > p) const |
Signed distance function. | |
Static Public Member Functions | |
static constexpr bool | admits_cusps () |
Public Attributes | |
Shape | shape |
Solid shape. | |
Static Public Attributes | |
static constexpr index_t | N = Shape::N |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename Shape, Transform< typename Shape::elem_t, Shape::N > Xf> | |
Hollow< Shape > | operator* (const Xf &xf, const Hollow< Shape > &s) |
Transform a hollow shape. | |
template<typename Shape, Transform< typename Shape::elem_t, Shape::N > Xf> | |
Hollow< Shape > | operator/ (const Hollow< Shape > &s, const Xf &xf) |
Inverse transform a hollow shape. | |
template<typename Shape, Transform< typename Shape::elem_t, Shape::N > Xf> | |
Hollow< Shape > & | operator*= (Hollow< Shape > &s, const Xf &xf) |
In-place transform a hollow shape. | |
template<typename Shape, Transform< typename Shape::elem_t, Shape::N > Xf> | |
Hollow< Shape > & | operator/= (Hollow< Shape > &s, const Xf &xf) |
In-place inverse transform a hollow shape. | |
Selects the boundary of a shape.
Hollow shapes are infinitely thin. They are the boundary of a shape, but do not contain any points. Hollow shapes can report the distance to their surface, the normal vector at a test point, and can orthogonally project points onto their surface.
Hollow shapes may be a useful foundation for thick-shelled shapes using the Dilated
shape wrapper.
|
inlineinherited |
Shape-point overlap test.
Return true
if the point p
is on the surface or interior of the shape, false
otherwise.
|
inline |
Measure the boundary (surface area) of the shape.
This is the same as the boundary of the inner shape. Hollow shapes do not have any volume, so this is their only meaningful measure.