|
geomc 1.0
A c++ linear algebra template library
|
An N-dimensional capsule shape. More...
#include <geomc/shape/Capsule.h>
Public Types | |
| using | elem_t |
| The coordinate type of this object. | |
| using | point_t |
| The type of a point in this object's space. | |
Public Member Functions | |
| constexpr | Capsule () |
| constexpr | Capsule (point_t p0, point_t p1, T r) |
| Vec< T, N > | axis () const |
| Rect< T, N > | bounds () const |
| point_t | clip (point_t p) const |
| bool | contains (point_t p) const |
| Shape-point intersection test. | |
| point_t | convex_support (point_t d) const |
| template<ConvexObject Shape> | |
| bool | intersects (const Shape &other) const |
| bool | intersects (Sphere< T, N > s) const |
| T | measure_boundary () const |
| Measure of the shape's boundary. | |
| T | measure_interior () const |
| Measure of the shape's interior. | |
| point_t | nearest_axis_point (point_t p) const |
| point_t | normal (point_t p) const |
| Outward-facing direction. | |
| bool | operator== (const Capsule &other) const |
| point_t | project (point_t p) const |
| T | sdf (point_t p) const |
| Signed distance function. | |
Static Public Member Functions | |
| static constexpr bool | admits_cusps () |
Public Attributes | |
| point_t | p0 |
| endpoints of the capsule axis. | |
| point_t | p1 |
| T | radius |
Static Public Attributes | |
| static constexpr index_t | N |
| The dimension of this object. | |
An N-dimensional capsule shape.
|
inherited |
The type of a point in this object's space.
An N-vector of T if N > 1, otherwise a T.
|
inlineconstexpr |
Construct a capsule centered on the origin, with radius 1, and axis from x = -1 to x = 1.
Sphere-capsule intersection test.
| s | Another sphere. |
Return the point p orthogonally projected onto the surface of the shape.
| T radius |
Radius of the capsule; i.e. the distance from the axis which is inside the capsule.