Ocean
|
This class implements a camera pose with six degrees of freedom (6-DOF). More...
Public Member Functions | |
PoseT () | |
Creates a new pose object with default values (no translation and no rotation). More... | |
template<typename U > | |
PoseT (const PoseT< U > &pose) | |
Copies a pose with different element data type than T. More... | |
PoseT (const VectorT3< T > &translation) | |
Creates a new pose object with a translation only. More... | |
PoseT (const EulerT< T > &euler) | |
Creates a new pose object with a rotation component on. More... | |
PoseT (const QuaternionT< T > &quaternion) | |
Creates a new pose object with a rotation component on. More... | |
PoseT (const RotationT< T > &rotation) | |
Creates a new pose object with a rotation component on. More... | |
PoseT (const HomogenousMatrixT4< T > &transformation) | |
Creates a new pose object by a specified 4x4 homogeneous transformation matrix. More... | |
PoseT (const T *values) | |
Creates a new pose by at least six pose values. More... | |
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. More... | |
PoseT (const VectorT3< T > &translation, const EulerT< T > &euler) | |
Creates a new pose object. More... | |
PoseT (const VectorT3< T > &translation, const QuaternionT< T > &quaternion) | |
Creates a new pose object. More... | |
PoseT (const VectorT3< T > &translation, const RotationT< T > &rotation) | |
Creates a new pose object. More... | |
VectorT3< T > | translation () const |
Returns the translation of this pose. More... | |
QuaternionT< T > | orientation () const |
Returns the orientation of this pose. More... | |
HomogenousMatrixT4< T > | transformation () const |
Returns the 4x4 homogeneous transformation matrix of this pose. More... | |
T | x () const |
Returns the translation value for the x-axis. More... | |
T & | x () |
Returns the translation value for the x-axis. More... | |
T | y () const |
Returns the translation value for the y-axis. More... | |
T & | y () |
Returns the translation value for the y-axis. More... | |
T | z () const |
Returns the translation value for the z-axis. More... | |
T & | z () |
Returns the translation value for the z-axis. More... | |
T | rx () const |
Returns the x parameter of the rotation. More... | |
T & | rx () |
Returns the x parameter of the rotation. More... | |
T | ry () const |
Returns the y parameter of the rotation. More... | |
T & | ry () |
Returns the y parameter of the rotation. More... | |
T | rz () const |
Returns the z parameter of the rotation. More... | |
T & | rz () |
Returns the z parameter of the rotation. More... | |
T | angle () const |
Returns the angle of the pose rotation. More... | |
bool | isNull () const |
Returns whether this pose holds no translation and no rotation. More... | |
const T * | data () const |
Data access operator. More... | |
T * | data () |
Data access operator. More... | |
bool | operator== (const PoseT< T > &pose) const |
Returns whether two poses are identical up to a small epsilon. More... | |
bool | operator!= (const PoseT< T > &pose) const |
Returns whether two poses are not identical up to a small epsilon. More... | |
PoseT< T > | operator+ (const PoseT< T > &pose) const |
Returns a new pose created by the element wise sum of two poses. More... | |
PoseT< T > & | operator+= (const PoseT< T > &pose) |
Adds element wise the six values of a second pose to this pose. More... | |
PoseT< T > | operator- (const PoseT< T > &pose) const |
Returns a new pose created by the element wise subtraction of two poses. More... | |
PoseT< T > & | operator-= (const PoseT< T > &pose) |
Subtracts element wise the six values of a second pose from this pose. More... | |
PoseT< T > | operator* (const T value) const |
Multiplies this pose by a scalar value and returns the new result. More... | |
PoseT< T > & | operator*= (const T value) |
Multiplies this pose by a scalar. More... | |
T | operator() (unsigned int index) const |
Element access operator. More... | |
T & | operator() (unsigned int index) |
Element access operator. More... | |
T | operator[] (unsigned int index) const |
Element access operator. More... | |
T & | operator[] (unsigned int index) |
Element access operator. More... | |
const T * | operator() () const |
Access operator. More... | |
T * | operator() () |
Access operator. More... | |
Static Public Member Functions | |
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. More... | |
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 poses. More... | |
static HomogenousMatrixT4< T > | linearPoseInterpolation (const HomogenousMatrixT4< T > &pose0, const HomogenousMatrixT4< T > &pose1, const T &factor) |
Interpolates two camera poses by a linear interpolation. More... | |
Protected Attributes | |
T | values_ [6] |
The six values of the pose, with element order: (Tx, Ty, Tz, Rx, Ry, Rz). More... | |
This class implements a camera pose with six degrees of freedom (6-DOF).
Three degrees for the translation or position and three for the orientation or rotation.
This object stores six elements. The first three elements define the translation.
The last three elements define the orientation as exponential map (rotation axis and angle as axis length).
The element order is defined as: (Tx, Ty, Tz, Rx, Ry, Rz).
T | The scalar floating point data type to be used, either 'float' or 'double' |
Ocean::PoseT< T >::PoseT | ( | ) |
Creates a new pose object with default values (no translation and no rotation).
|
inlineexplicit |
Copies a pose with different element data type than T.
pose | The pose object to be copied |
U | The element data type of the given pose |
|
explicit |
Creates a new pose object with a translation only.
translation | 3D vector defining the translation of the pose object |
|
explicit |
Creates a new pose object with a rotation component on.
euler | The Euler rotation defining the rotation of the pose object |
|
explicit |
Creates a new pose object with a rotation component on.
quaternion | Unit quaternion rotation defining the rotation of the pose object |
|
explicit |
Creates a new pose object with a rotation component on.
rotation | Angle-axis rotation defining the rotation of the pose object |
|
explicit |
Creates a new pose object by a specified 4x4 homogeneous transformation matrix.
transformation | Matrix defining the position and rotation of the new pose |
|
explicit |
Creates a new pose by at least six pose values.
The specified pose must have the following order: (Tx, Ty, Tz, Rx, Ry, Rz).
With (Tx, Ty, Tz) as translation vector, (Rx, Ry, Rz) as rotation axis and sqrt(Rx * Rx + Ry * Ry + Rz * Rz) as rotation angle.
values | The six pose values specifying the new pose, must be valid |
Ocean::PoseT< T >::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.
tx | Translation value for the x-axis |
ty | Translation value for the y-axis |
tz | Translation value for the z-axis |
rx | X parameter of the rotation |
ry | Y parameter of the rotation |
rz | Z parameter of the rotation |
Ocean::PoseT< T >::PoseT | ( | const VectorT3< T > & | translation, |
const EulerT< T > & | euler | ||
) |
Creates a new pose object.
translation | 3D vector defining the translation component of the pose object |
euler | The Euler rotation defining the rotation component of the pose object |
Ocean::PoseT< T >::PoseT | ( | const VectorT3< T > & | translation, |
const QuaternionT< T > & | quaternion | ||
) |
Creates a new pose object.
translation | 3D vector defining the translation component of the pose object |
quaternion | Unit quaternion rotation defining the rotation component of the pose object |
Ocean::PoseT< T >::PoseT | ( | const VectorT3< T > & | translation, |
const RotationT< T > & | rotation | ||
) |
Creates a new pose object.
translation | 3D vector defining the translation component of the pose object |
rotation | Angle-axis rotation defining the rotation component of the pose object |
T Ocean::PoseT< T >::angle | ( | ) | const |
Returns the angle of the pose rotation.
|
inline |
Data access operator.
|
inline |
Data access operator.
bool Ocean::PoseT< T >::isNull | ( | ) | const |
Returns whether this pose holds no translation and no rotation.
|
static |
Interpolates two camera poses by a linear interpolation.
pose0 | The first camera pose |
pose1 | The second camera pose |
factor | The interpolation factor which is applied as follows: pose0 * (1 - factor) + pose1 * factor, with range [0, 1] |
|
inline |
Returns whether two poses are not identical up to a small epsilon.
pose | Right pose to compare |
|
inline |
Access operator.
|
inline |
Access operator.
|
inline |
Element access operator.
Beware: No range check will be done!
index | The index of the element to return, with range [0, 5] |
|
inline |
Element access operator.
Beware: No range check will be done!
index | The index of the element to return, with range [0, 5] |
PoseT<T> Ocean::PoseT< T >::operator* | ( | const T | value | ) | const |
Multiplies this pose by a scalar value and returns the new result.
The multiplication is done element wise.
value | Scalar value for multiplication |
PoseT<T>& Ocean::PoseT< T >::operator*= | ( | const T | value | ) |
Multiplies this pose by a scalar.
The multiplication is done element wise.
value | Scalar value for multiplication |
PoseT<T> Ocean::PoseT< T >::operator+ | ( | const PoseT< T > & | pose | ) | const |
Returns a new pose created by the element wise sum of two poses.
pose | Second pose to add |
PoseT<T>& Ocean::PoseT< T >::operator+= | ( | const PoseT< T > & | pose | ) |
Adds element wise the six values of a second pose to this pose.
pose | Second pose to add the six values |
PoseT<T> Ocean::PoseT< T >::operator- | ( | const PoseT< T > & | pose | ) | const |
Returns a new pose created by the element wise subtraction of two poses.
pose | Second pose to subtract |
PoseT<T>& Ocean::PoseT< T >::operator-= | ( | const PoseT< T > & | pose | ) |
Subtracts element wise the six values of a second pose from this pose.
pose | Second pose to subtract the six values |
|
inline |
Returns whether two poses are identical up to a small epsilon.
pose | Right pose to compare |
|
inline |
Element access operator.
Beware: No range check will be done!
index | The index of the element to return, with range [0, 5] |
|
inline |
Element access operator.
Beware: No range check will be done!
index | The index of the element to return, with range [0, 5] |
QuaternionT<T> Ocean::PoseT< T >::orientation | ( | ) | const |
Returns the orientation of this pose.
|
static |
Determines a subset of a set of given poses (defined as matrices) best representing the entire set of poses.
poseMatrices | The entire set of given pose matrices from which a subset is extracted, must be valid |
size | The number of provided set of pose matrices, with range [1, infinity) |
subsetSize | The number of poses in the resulting subset, with range [1, size] |
explicitIndexOffset | The explicit offset which is added to each index of the resulting (pose) subset allowing to add an explicit index shift |
|
static |
Determines a subset of a set of given poses best representing the entire set of poses.
poses | The entire set of given poses from which a subset is extracted, must be valid |
subsetSize | The number of poses in the resulting subset, with range [1, poses.size()] |
explicitIndexOffset | The explicit offset which is added to each index of the resulting (pose) subset allowing to add an explicit index shift |
|
inline |
Returns the x parameter of the rotation.
|
inline |
Returns the x parameter of the rotation.
|
inline |
Returns the y parameter of the rotation.
|
inline |
Returns the y parameter of the rotation.
|
inline |
Returns the z parameter of the rotation.
|
inline |
Returns the z parameter of the rotation.
HomogenousMatrixT4<T> Ocean::PoseT< T >::transformation | ( | ) | const |
Returns the 4x4 homogeneous transformation matrix of this pose.
|
inline |
Returns the translation of this pose.
|
inline |
Returns the translation value for the x-axis.
|
inline |
Returns the translation value for the x-axis.
|
inline |
Returns the translation value for the y-axis.
|
inline |
Returns the translation value for the y-axis.
|
inline |
Returns the translation value for the z-axis.
|
inline |
Returns the translation value for the z-axis.
|
protected |
The six values of the pose, with element order: (Tx, Ty, Tz, Rx, Ry, Rz).