geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
Isometry< T, N > Class Template Reference

A rigid rotation and translation. More...

#include <geomc/linalg/Isometry.h>

Inheritance diagram for Isometry< T, N >:
Dimensional< T, N >

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, Napply_direction (const Vec< T, N > v) const
 Transform a direction vector.
 
Vec< T, Napply_inverse_direction (const Vec< T, N > v) const
 Inverse transform a direction vector.
 
Isometry< T, Ninverse () 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, Noperator* (const Isometry< T, N > &other) const
 Compose two isometric transforms.
 
Vec< T, Noperator* (const Vec< T, N > &p) const
 Transform a point.
 
Isometry< T, N > & operator*= (const Isometry< T, N > &other)
 Compose in-place.
 
Isometry< T, Noperator+= (const Vec< T, N > &v)
 Apply a translation.
 
Isometry< T, Noperator/ (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, Nrx
 Rotation component.
 
Vec< T, Ntx
 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, Nmix (T s, const Isometry< T, N > &a, const Isometry< T, N > &b)
 Continuously interpolate two isometries.
 
template<typename T, index_t N>
Capsule< T, Noperator* (const Isometry< T, N > &xf, const Capsule< T, N > &c)
 Transform a capsule by an isometry.
 
template<typename T, index_t N>
Cylinder< T, Noperator* (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, Noperator* (const Isometry< T, N > &xf, const Simplex< T, N > &s)
 Transform a simplex by an isometry.
 
template<typename T, index_t N>
Sphere< T, Noperator* (const Isometry< T, N > &xf, const Sphere< T, N > &s)
 Transform a sphere by an isometry.
 
template<typename T, index_t N>
Isometry< T, Noperator* (const Isometry< T, N > &xf, T s)
 Scale the magnitude of an isometry.
 
template<typename T, index_t N>
Isometry< T, Noperator* (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, Noperator+ (const Isometry< T, N > &i, const Vec< T, N > &v)
 Apply a translation to an isometry.
 
template<typename T, index_t N>
Isometry< T, Noperator+ (const Vec< T, N > &v, const Isometry< T, N > &i)
 Apply a translation to an isometry.
 
template<typename T, index_t N>
Capsule< T, Noperator/ (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, Noperator/ (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, Noperator/ (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, Noperator/ (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, Noperator/ (const Vec< T, N > &v, const Isometry< T, N > &i)
 Transform a point.
 

Detailed Description

template<typename T, index_t N>
class geom::Isometry< T, N >

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)

Member Typedef Documentation

◆ point_t

using point_t
inherited

The type of a point in this object's space.

An N-vector of T if N > 1, otherwise a T.


The documentation for this class was generated from the following files: