15 #ifndef __Thea_CoordinateFrameN_hpp__ 16 #define __Thea_CoordinateFrameN_hpp__ 19 #include "RigidTransformN.hpp" 33 template <
int N,
typename T>
40 typedef typename RigidTransformT::VectorT
VectorT;
41 typedef typename RigidTransformT::MatrixT
MatrixT;
43 THEA_DECL_SMART_POINTERS(CoordinateFrameT)
55 static CoordinateFrameT
_fromAffine(AffineTransformT
const & aff_)
70 CoordinateFrameT
operator*(CoordinateFrameT
const & rhs)
const 127 static RigidTransformT translation(VectorT
const & translation_) {
return RigidTransformT(); }
134 template <
int N,
typename T = Real>
154 template <
int N,
typename T>
156 operator<<(std::ostream & os, CoordinateFrameN<N, T>
const & cf)
158 return os << cf.toString();
163 #include "CoordinateFrame2.hpp" 164 #include "CoordinateFrame3.hpp" static CoordinateFrameT const & identity()
Get the identity frame (same as the world frame).
AffineTransformN< N, T > AffineTransformT
N-dimensional affine transform.
CoordinateFrameN()
Default constructor.
[Internal] Base class for a coordinate frame in N-space, defined by N orthonormal vectors...
std::ptrdiff_t intx
A signed integer suitable for indexing a structure held in memory.
CoordinateFrameNBase(RigidTransformT const &src)
Construct from a rigid transform.
RigidTransformN< N, T > RigidTransformT
N-dimensional rigid transform.
Root namespace for the Thea library.
VectorT vectorToObjectSpace(VectorT const &v) const
Transform a direction vector from world space to the local space of the coordinate frame...
static CoordinateFrameT _fromAffine(AffineTransformT const &aff_)
Construct from an affine transform, assuming it is rigid (use with caution since it can break the ort...
VectorT operator*(VectorT const &p) const
Transform a point from the local space of the coordinate frame to world space.
CoordinateFrameN(RigidTransformT const &src)
Construct from a rigid transform.
CoordinateFrameT operator*(CoordinateFrameT const &rhs) const
Compose this frame, treated as a rigid transform, with another.
VectorT normalToObjectSpace(VectorT const &n) const
Transform a normal from world space to the local space of the coordinate frame.
CoordinateFrameT inverse() const
Get the inverse transform.
CoordinateFrameN< N, T > CoordinateFrameT
N-dimensional coordinate frame type.
VectorT pointToWorldSpace(VectorT const &p) const
Transform a point from the local space of the coordinate frame to world space.
VectorT getAxis(intx i) const
Get an axis of the frame.
A coordinate frame in N-space, defined by N orthonormal vectors.
VectorT pointToObjectSpace(VectorT const &p) const
Transform a point from world space to the local space of the coordinate frame.
VectorT vectorToWorldSpace(VectorT const &v) const
Transform a direction vector from the local space of the coordinate frame to world space...
VectorT normalToWorldSpace(VectorT const &n) const
Transform a normal from the local space of the coordinate frame to world space.