|
geomc 1.0
A c++ linear algebra template library
|
An N-dimensional cylinder, given by its radius and endpoints. More...
#include <geomc/shape/Cylinder.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 | |
| Cylinder () | |
| Construct a cylinder of radius and length 1, with axis along X+. | |
| Cylinder (const Vec< T, N > &p0, const Vec< T, N > &p1, T radius) | |
| Construct a cylinder with arbitrary radius and endpoints. | |
| Cylinder (T r) | |
| Construct a cylinder of radius r and length 1, with axis along X+. | |
| Vec< T, N > | axis () const |
| Rect< T, N > | bounds () const |
| Vec< T, N > | clip (Vec< T, N > p) const |
| bool | contains (Vec< T, N > p) const |
| Shape-point intersection test. | |
| Vec< T, N > | convex_support (Vec< T, N > d) const |
| Rect< T, 1 > | intersect (const Ray< T, N > &ray) const |
| Ray/shape intersection test. | |
| template<ConvexObject Shape> | |
| bool | intersects (const Shape &other) const |
| T | measure_boundary () const |
| Measure the boundary (surface area) of the cylinder. | |
| T | measure_interior () const |
| Measure the interior (volume) of the cylinder. | |
| Vec< T, N > | normal (Vec< T, N > p) const |
| bool | operator== (const Cylinder< T, N > &other) const |
| Vec< T, N > | project (Vec< T, N > p) const |
| T | sdf (Vec< T, N > p) const |
| Signed distance function. | |
Static Public Member Functions | |
| static constexpr bool | admits_cusps () |
Public Attributes | |
| Vec< T, N > | p0 |
| Axis endpoint. | |
| Vec< T, N > | p1 |
| Axis endpoint. | |
| T | radius |
| Cylinder radius. | |
Static Public Attributes | |
| static constexpr index_t | N |
| The dimension of this object. | |
An N-dimensional cylinder, given by its radius and endpoints.
Represents an extrusion of an N-2 sphere. In other words, an extrusion of a disk in 3D; an extrusion of a sphere in 4D; and an extrusion of a line segment in 2D.
|
inherited |
The type of a point in this object's space.
An N-vector of T if N > 1, otherwise a T.