|
geomc 1.0
A c++ linear algebra template library
|
A rigid rotation and translation. More...
#include <geomc/linalg/Isometry.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 | |
| Isometry (const Rotation< T, N > &rx) | |
| Isometry (const Rotation< T, N > &rx, const Vec< T, N > &tx) | |
| Isometry (const Vec< T, N > &tx) | |
| Vec< T, N > | apply_direction (const Vec< T, N > v) const |
| Transform a direction vector. | |
| Vec< T, N > | apply_inverse_direction (const Vec< T, N > v) const |
| Inverse transform a direction vector. | |
| Isometry< T, N > | inverse () const |
| Compute the inverse of the isometry. | |
| operator AffineTransform< T, N > () const | |
| Cast to an affine transform. | |
|
template<index_t M> requires (M > N) | |
| operator Isometry< T, M > () const | |
| Extend the dimensionality of this isometry. | |
|
template<typename U, index_t M> requires (M > N) | |
| operator Isometry< U, M > () const | |
| Extend the dimensionality of this isometry and change the coordinate type. | |
| template<typename U> | |
| operator Isometry< U, N > () const | |
| Cast the underlying coordinate type. | |
| Isometry< T, N > | operator* (const Isometry< T, N > &other) const |
| Compose two isometric transforms. | |
| Vec< T, N > | operator* (const Vec< T, N > &p) const |
| Transform a point. | |
| Isometry< T, N > & | operator*= (const Isometry< T, N > &other) |
| Compose in-place. | |
| Isometry< T, N > | operator+= (const Vec< T, N > &v) |
| Apply a translation. | |
| Isometry< T, N > | operator/ (const Isometry< T, N > &other) const |
| Compose with the inverse of an isometry. | |
| Isometry< T, N > & | operator/= (const Isometry< T, N > &other) |
| In-place apply inverse. | |
Public Attributes | |
| Rotation< T, N > | rx |
| Rotation component. | |
| Vec< T, N > | tx |
| Translation component. | |
Static Public Attributes | |
| static constexpr index_t | N |
| The dimension of this object. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename T, index_t N> | |
| Isometry< T, N > | mix (T s, const Isometry< T, N > &a, const Isometry< T, N > &b) |
| Continuously interpolate two isometries. | |
| template<typename T, index_t N> | |
| Capsule< T, N > | operator* (const Isometry< T, N > &xf, const Capsule< T, N > &c) |
| Transform a capsule by an isometry. | |
| template<typename T, index_t N> | |
| Cylinder< T, N > | operator* (const Isometry< T, N > &xf, const Cylinder< T, N > &c) |
| Transform a cylinder by an isometry. | |
| template<typename T, index_t N, typename Shape> | |
| Dilated< Shape > | operator* (const Isometry< T, N > &xf, const Dilated< Shape > &s) |
| Transform a dilated shape by an isometry. | |
| template<typename T, index_t N> | |
| Simplex< T, N > | operator* (const Isometry< T, N > &xf, const Simplex< T, N > &s) |
| Transform a simplex by an isometry. | |
| template<typename T, index_t N> | |
| Sphere< T, N > | operator* (const Isometry< T, N > &xf, const Sphere< T, N > &s) |
| Transform a sphere by an isometry. | |
| template<typename T, index_t N> | |
| Isometry< T, N > | operator* (const Isometry< T, N > &xf, T s) |
| Scale the magnitude of an isometry. | |
| template<typename T, index_t N> | |
| Isometry< T, N > | operator* (T s, const Isometry< T, N > &xf) |
| Scale the magnitude of an isometry. A scale of 0 produces an identity transform. Applying a scale of 1 to an isometry results in no change. | |
| template<typename T, index_t N> | |
| Isometry< T, N > | operator+ (const Isometry< T, N > &i, const Vec< T, N > &v) |
| Apply a translation to an isometry. | |
| template<typename T, index_t N> | |
| Isometry< T, N > | operator+ (const Vec< T, N > &v, const Isometry< T, N > &i) |
| Apply a translation to an isometry. | |
| template<typename T, index_t N> | |
| Capsule< T, N > | operator/ (const Capsule< T, N > &c, const Isometry< T, N > &xf) |
| Inverse-transform a capsule by an isometry. | |
| template<typename T, index_t N> | |
| Cylinder< T, N > | operator/ (const Cylinder< T, N > &c, const Isometry< T, N > &xf) |
| Inverse-transform a cylinder by an isometry. | |
| template<typename T, index_t N, typename Shape> | |
| Dilated< Shape > | operator/ (const Dilated< Shape > &s, const Isometry< T, N > &xf) |
| Inverse-transform a dilated shape by an isometry. | |
| template<typename T, index_t N> | |
| Simplex< T, N > | operator/ (const Simplex< T, N > &s, const Isometry< T, N > &xf) |
| Inverse-transform a simplex by an isometry. | |
| template<typename T, index_t N> | |
| Sphere< T, N > | operator/ (const Sphere< T, N > &s, const Isometry< T, N > &xf) |
| Inverse-transform a sphere by an isometry. | |
| template<typename T, index_t N> | |
| Vec< T, N > | operator/ (const Vec< T, N > &v, const Isometry< T, N > &i) |
| Transform a point. | |
A rigid rotation and translation.
Isometric transfroms do not have any skew or scales; they preserve shapes, angles, and distances.
Isometries meet the Transform concept. For transforms which include a scaling, see Similarity. For nonuniform scaling or skew transforms, see AffineTransform.
Isometries compose like transforms, with multiplication on the left:
Isometry<T,N> i1, i2; Isometry<T,N> i3 = i2 * i1; // isometry which applies i1, then i2 Vec<T,N> v = i3 * i1 * v0; // apply i1 to v0, then i3 to the result Sphere<T,N> s = i1 * sphere; // apply i1 to a sphere
Isometries can be inverted with the / operator:
Isometry<T,N> i1, i2; Isometry<T,N> i3 = i2 / i1; // isometry which takes i1 to i2 Vec<T,N> v = v0 / i3; // apply the inverse of i3 to v0
Compose with rotations and translations:
Isometry<T,3> i; Rotation<T,3> r; Isoemtry<T,3> i2 = r * i; // i2 is i with r post-applied Isometry<T,3> i3 = i + Vec<T,3>(1,2,3); // i3 is i translated by (1,2,3)
|
inherited |
The type of a point in this object's space.
An N-vector of T if N > 1, otherwise a T.