|
geomc 1.0
A c++ linear algebra template library
|
A wrapper shape which orients another arbitrary shape with an AffineTransform. More...
#include <geomc/shape/Oriented.h>
Public Types | |
| typedef Shape::elem_t | T |
| The coordinate type of this Shape. | |
| typedef PointType< Shape::elem_t, N >::point_t | point_t |
| typedef Shape::elem_t | elem_t |
| The coordinate type of this shape. | |
Public Member Functions | |
| Oriented () | |
| Wrap a default-constructed Shape with the identity transformation. | |
| Oriented (const Shape &s) | |
Wrap s in an identity transformation. | |
| Oriented (const Shape &s, const AffineTransform< T, N > &xf) | |
Construct an oriented shape from s, which is positioned and oriented by xf. | |
| bool | operator== (const Oriented &other) const |
| bool | contains (Vec< T, N > p) const |
| Shape-point overlap test. | |
| Vec< T, N > | convex_support (Vec< T, N > d) const |
| Rect< T, N > | bounds () const |
| Rect< T, 1 > | intersect (const Ray< T, N > &r) const |
| Ray-shape intersection. | |
| Oriented< Rect< T, N > > | oriented_bounds () const |
| Return an Oriented Rect containing the shape. | |
| point_t | convex_support (point_t d) const |
| Geometric convex support function. | |
| bool | intersects (const Convex< Shape::elem_t, N, Shape > &other) const |
| Convex shape overlap test. | |
Public Attributes | |
| Shape | shape |
| Un-transformed shape. | |
| AffineTransform< T, N > | xf |
Transformation orienting shape. | |
Static Public Attributes | |
| static constexpr size_t | N = Shape::N |
| The dimension of this Shape. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename T > | |
| using | OrientedCone = Oriented<Cone<T>> |
| Convenience typedef for an oriented cone. | |
| template<typename T , index_t N> | |
| using | OrientedRect = Oriented<Rect<T,N>> |
| Convenience typedef for oriented Rects. | |
| template<typename Shape > | |
| Oriented< Shape > | operator* (const AffineTransform< typename Shape::elem_t, Shape::N > &xf, const Shape &s) |
Transform the shape s by wrapping it in an Oriented class. | |
| template<typename Shape > | |
| Oriented< Shape > | operator* (const AffineTransform< typename Shape::elem_t, Shape::N > &xf, const Oriented< Shape > &s) |
Transform the oriented shape s by xf. | |
| template<typename Shape > | |
| Oriented< Shape > & | operator*= (Oriented< Shape > &s, const AffineTransform< typename Shape::elem_t, Shape::N > &xf) |
In-place transform the oriented shape s by xf. | |
| template<typename Shape > | |
| Oriented< Shape > | operator/ (const Shape &s, const AffineTransform< typename Shape::elem_t, Shape::N > &xf) |
Transform the shape s by the inverse of xf. | |
| template<typename Shape > | |
| Oriented< Shape > | operator/ (const Oriented< Shape > &s, const AffineTransform< typename Shape::elem_t, Shape::N > &xf) |
Transform the oriented shape s by the inverse of xf. | |
| template<typename Shape > | |
| Oriented< Shape > & | operator/= (Oriented< Shape > &s, const AffineTransform< typename Shape::elem_t, Shape::N > &xf) |
In-place transform the oriented shape s by the inverse of xf. | |
A wrapper shape which orients another arbitrary shape with an AffineTransform.
Oriented shapes can be constructed simply by applying an AffineTransform to an ordinary shape:
AffineTransform<double,3> xf = rotation(...); Oriented<Cylinder<double,3>> oriented = xf * Cylinder<double,3>();
Transforming an Oriented results in another Oriented of the same type:
Oriented<Cylinder<double,3>> ocyl_a = xf * Cylinder<double,3>(); Oriented<Cylinder<double,3>> ocyl_b = xf * ocyl_a;
Geometric convex support function.
Returns the point on the surface of this convex shape that is furthest along direction d (i.e., has the highest dot product with d).
All shapes which implement this function automatically support geometrical intersection tests with any other Convex object.
| d | Direction along which to find a support plane. |
Convex shape overlap test.
other; false otherwise.