8 #ifndef META_OCEAN_MATH_POSE_H
9 #define META_OCEAN_MATH_POSE_H
24 template <
typename T>
class PoseT;
53 using PosesT = std::vector<PoseT<T>>;
60 using Poses = std::vector<Pose>;
136 PoseT(
const T tx,
const T ty,
const T tz,
const T
rx,
const T
ry,
const T
rz);
409 template <
typename T>
410 template <
typename U>
413 values_[0] = T(pose[0]);
414 values_[1] = T(pose[1]);
415 values_[2] = T(pose[2]);
416 values_[3] = T(pose[3]);
417 values_[4] = T(pose[4]);
418 values_[5] = T(pose[5]);
421 template <
typename T>
427 template <
typename T>
433 template <
typename T>
439 template <
typename T>
445 template <
typename T>
451 template <
typename T>
457 template <
typename T>
463 template <
typename T>
469 template <
typename T>
475 template <
typename T>
481 template <
typename T>
487 template <
typename T>
493 template <
typename T>
499 template <
typename T>
505 template <
typename T>
508 return !(*
this == pose);
511 template <
typename T>
514 ocean_assert(index < 6);
515 return values_[index];
518 template <
typename T>
521 ocean_assert(index < 6);
522 return values_[index];
525 template <
typename T>
528 ocean_assert(index < 6);
529 return values_[index];
532 template <
typename T>
535 ocean_assert(index < 6);
536 return values_[index];
539 template <
typename T>
545 template <
typename T>
551 template <
typename T>
557 template <
typename T>
This class implements an euler rotation with angles: yaw, pitch and roll.
Definition: Euler.h:80
This class implements a 4x4 homogeneous transformation matrix using floating point values with the pr...
Definition: HomogenousMatrix4.h:110
static bool isEqual(const T first, const T second)
Returns whether two values are equal up to a small epsilon.
Definition: Numeric.h:2386
PoseT(const HomogenousMatrixT4< T > &transformation)
Creates a new pose object by a specified 4x4 homogeneous transformation matrix.
T & rx()
Returns the x parameter of the rotation.
Definition: Pose.h:470
PoseT(const VectorT3< T > &translation, const QuaternionT< T > &quaternion)
Creates a new pose object.
T operator[](unsigned int index) const
Element access operator.
Definition: Pose.h:526
T values_[6]
The six values of the pose, with element order: (Tx, Ty, Tz, Rx, Ry, Rz).
Definition: Pose.h:406
VectorT3< T > translation() const
Returns the translation of this pose.
Definition: Pose.h:422
T x() const
Returns the translation value for the x-axis.
Definition: Pose.h:428
T rx() const
Returns the x parameter of the rotation.
Definition: Pose.h:464
bool isNull() const
Returns whether this pose holds no translation and no rotation.
T * operator()()
Access operator.
Definition: Pose.h:546
PoseT()
Creates a new pose object with default values (no translation and no rotation).
PoseT(const VectorT3< T > &translation, const RotationT< T > &rotation)
Creates a new pose object.
PoseT< T > & operator+=(const PoseT< T > &pose)
Adds element wise the six values of a second pose to this pose.
PoseT< T > & operator*=(const T value)
Multiplies this pose by a scalar.
T operator()(unsigned int index) const
Element access operator.
Definition: Pose.h:512
T & operator()(unsigned int index)
Element access operator.
Definition: Pose.h:519
PoseT< T > operator*(const T value) const
Multiplies this pose by a scalar value and returns the new result.
static Indices32 representativePoses(const HomogenousMatrixT4< T > *poseMatrices, const size_t size, const size_t subsetSize, const size_t explicitIndexOffset=0)
Determines a subset of a set of given poses (defined as matrices) best representing the entire set of...
T & operator[](unsigned int index)
Element access operator.
Definition: Pose.h:533
PoseT< T > operator-(const PoseT< T > &pose) const
Returns a new pose created by the element wise subtraction of two poses.
T y() const
Returns the translation value for the y-axis.
Definition: Pose.h:440
T & y()
Returns the translation value for the y-axis.
Definition: Pose.h:446
static HomogenousMatrixT4< T > linearPoseInterpolation(const HomogenousMatrixT4< T > &pose0, const HomogenousMatrixT4< T > &pose1, const T &factor)
Interpolates two camera poses by a linear interpolation.
T * data()
Data access operator.
Definition: Pose.h:558
PoseT(const PoseT< U > &pose)
Copies a pose with different element data type than T.
Definition: Pose.h:411
T angle() const
Returns the angle of the pose rotation.
PoseT< T > operator+(const PoseT< T > &pose) const
Returns a new pose created by the element wise sum of two poses.
T & z()
Returns the translation value for the z-axis.
Definition: Pose.h:458
PoseT(const EulerT< T > &euler)
Creates a new pose object with a rotation component on.
const T * data() const
Data access operator.
Definition: Pose.h:552
bool operator!=(const PoseT< T > &pose) const
Returns whether two poses are not identical up to a small epsilon.
Definition: Pose.h:506
PoseT(const VectorT3< T > &translation, const EulerT< T > &euler)
Creates a new pose object.
bool operator==(const PoseT< T > &pose) const
Returns whether two poses are identical up to a small epsilon.
Definition: Pose.h:500
PoseT(const QuaternionT< T > &quaternion)
Creates a new pose object with a rotation component on.
HomogenousMatrixT4< T > transformation() const
Returns the 4x4 homogeneous transformation matrix of this pose.
const T * operator()() const
Access operator.
Definition: Pose.h:540
PoseT(const VectorT3< T > &translation)
Creates a new pose object with a translation only.
PoseT(const RotationT< T > &rotation)
Creates a new pose object with a rotation component on.
T & ry()
Returns the y parameter of the rotation.
Definition: Pose.h:482
T & rz()
Returns the z parameter of the rotation.
Definition: Pose.h:494
T rz() const
Returns the z parameter of the rotation.
Definition: Pose.h:488
T ry() const
Returns the y parameter of the rotation.
Definition: Pose.h:476
PoseT(const T *values)
Creates a new pose by at least six pose values.
T z() const
Returns the translation value for the z-axis.
Definition: Pose.h:452
static Indices32 representativePoses(const PosesT< T > &poses, const size_t subsetSize, const size_t explicitIndexOffset=0)
Determines a subset of a set of given poses best representing the entire set of poses.
T & x()
Returns the translation value for the x-axis.
Definition: Pose.h:434
QuaternionT< T > orientation() const
Returns the orientation of this pose.
PoseT(const T tx, const T ty, const T tz, const T rx, const T ry, const T rz)
Creates a new pose by six pose parameters.
PoseT< T > & operator-=(const PoseT< T > &pose)
Subtracts element wise the six values of a second pose from this pose.
This class implements a unit quaternion rotation.
Definition: Quaternion.h:100
This class implements a axis-angle rotation using floating point values.
Definition: Rotation.h:79
This class implements a vector with three elements.
Definition: Vector3.h:97
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition: Base.h:96
std::vector< PoseT< T > > PosesT
Definition of a typename alias for vectors with PoseT objects.
Definition: Pose.h:53
std::vector< Pose > Poses
Definition of a vector holding ExponentialMap objects.
Definition: Pose.h:60
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15