utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::graphic::Pose< PoseComponentType > Class Template Reference

Template class representing a pose (Position + Orientation). More...

#include <headers/utility/graphic/pose.hpp>

Public Member Functions

 Pose (void)
 Default constructor (zero position, identity orientation).
 
 Pose (const Position< PoseComponentType > &position, const Orientation< PoseComponentType > &orientation)
 Construct a pose from position and orientation.
 
 Pose (const Pose &other)=default
 Copy constructor.
 
 Pose (Pose &&other) noexcept=default
 Move constructor.
 
Poseoperator= (const Pose &other)=default
 Copy assignment operator.
 
Poseoperator= (Pose &&other) noexcept=default
 Move assignment operator.
 
 ~Pose (void)=default
 Default destructor for Pose.
 
PosesetPosition (const Position< PoseComponentType > &position) noexcept
 Set the position component.
 
PosesetPosition (math::Vector< PoseComponentType, 3 > position) noexcept
 Set the position component using a vector.
 
const Position< PoseComponentType > & getPosition (void) const noexcept
 Get the position component.
 
PosesetOrientation (const Orientation< PoseComponentType > &orientation) noexcept
 Set the orientation component.
 
PosesetOrientation (math::Quaternion< PoseComponentType > quaternion) noexcept
 Set the orientation component using a quaternion.
 
const Orientation< PoseComponentType > & getOrientation (void) const noexcept
 Get the orientation component.
 
Posetranslate (const Position< PoseComponentType > &offset) noexcept
 Translate pose position by an offset.
 
Pose translated (const Position< PoseComponentType > &offset) const noexcept
 Return translated copy of this pose.
 
Ray< PoseComponentType > toForwardRay () const noexcept
 Get a ray representing the forward direction of the pose.
 
Ray< PoseComponentType > toUpRay () const noexcept
 Get a ray representing the right direction of the pose.
 
Ray< PoseComponentType > toRightRay () const noexcept
 Get a ray representing the up direction of the pose.
 
bool operator== (const Pose &other) const noexcept
 Equality comparison.
 
bool operator!= (const Pose &other) const noexcept
 Inequality comparison.
 
bool operator< (const Pose &other) const noexcept
 Less-than comparison for ordering.
 

Detailed Description

template<CanBePoseComponent PoseComponentType>
class utility::graphic::Pose< PoseComponentType >

Template class representing a pose (Position + Orientation).

A pose encodes both the spatial Position and the Orientation of an object in 3D space.

Template Parameters
PoseComponentTypeFloating-point type for Position and Orientation components.

Definition at line 50 of file pose.hpp.

Constructor & Destructor Documentation

◆ Pose() [1/4]

template<CanBePoseComponent PoseComponentType>
utility::graphic::Pose< PoseComponentType >::Pose ( void  )
inline

Default constructor (zero position, identity orientation).

Definition at line 67 of file pose.hpp.

◆ Pose() [2/4]

template<CanBePoseComponent PoseComponentType>
utility::graphic::Pose< PoseComponentType >::Pose ( const Position< PoseComponentType > &  position,
const Orientation< PoseComponentType > &  orientation 
)
inline

Construct a pose from position and orientation.

Parameters
positionThe position component.
orientationThe orientation component.

Definition at line 77 of file pose.hpp.

◆ Pose() [3/4]

template<CanBePoseComponent PoseComponentType>
utility::graphic::Pose< PoseComponentType >::Pose ( const Pose< PoseComponentType > &  other)
default

Copy constructor.

Parameters
otherThe Pose object to copy from.

◆ Pose() [4/4]

template<CanBePoseComponent PoseComponentType>
utility::graphic::Pose< PoseComponentType >::Pose ( Pose< PoseComponentType > &&  other)
defaultnoexcept

Move constructor.

Parameters
otherThe Pose object to move from.

Member Function Documentation

◆ getOrientation()

template<CanBePoseComponent PoseComponentType>
const Orientation< PoseComponentType > & utility::graphic::Pose< PoseComponentType >::getOrientation ( void  ) const
inlinenoexcept

Get the orientation component.

Returns
Const reference to the orientation.

Definition at line 175 of file pose.hpp.

Here is the caller graph for this function:

◆ getPosition()

template<CanBePoseComponent PoseComponentType>
const Position< PoseComponentType > & utility::graphic::Pose< PoseComponentType >::getPosition ( void  ) const
inlinenoexcept

Get the position component.

Returns
Const reference to the position.

Definition at line 141 of file pose.hpp.

Here is the caller graph for this function:

◆ operator!=()

template<CanBePoseComponent PoseComponentType>
bool utility::graphic::Pose< PoseComponentType >::operator!= ( const Pose< PoseComponentType > &  other) const
inlinenoexcept

Inequality comparison.

Parameters
otherPose to compare with.
Returns
True when either position or orientation differs.

Definition at line 247 of file pose.hpp.

◆ operator<()

template<CanBePoseComponent PoseComponentType>
bool utility::graphic::Pose< PoseComponentType >::operator< ( const Pose< PoseComponentType > &  other) const
inlinenoexcept

Less-than comparison for ordering.

Parameters
otherPose to compare with.
Returns
True when this pose is less than the other pose.

Definition at line 257 of file pose.hpp.

◆ operator=() [1/2]

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::operator= ( const Pose< PoseComponentType > &  other)
default

Copy assignment operator.

Parameters
otherThe Pose object to copy from.
Returns
A reference to this Pose object.

◆ operator=() [2/2]

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::operator= ( Pose< PoseComponentType > &&  other)
defaultnoexcept

Move assignment operator.

Parameters
otherThe Pose object to move from.
Returns
A reference to this Pose object.

◆ operator==()

template<CanBePoseComponent PoseComponentType>
bool utility::graphic::Pose< PoseComponentType >::operator== ( const Pose< PoseComponentType > &  other) const
inlinenoexcept

Equality comparison.

Parameters
otherPose to compare with.
Returns
True when position and orientation are equal.

Definition at line 236 of file pose.hpp.

◆ setOrientation() [1/2]

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::setOrientation ( const Orientation< PoseComponentType > &  orientation)
inlinenoexcept

Set the orientation component.

Parameters
orientationNew orientation value.
Returns
Reference to this object for chaining.

Definition at line 151 of file pose.hpp.

◆ setOrientation() [2/2]

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::setOrientation ( math::Quaternion< PoseComponentType >  quaternion)
inlinenoexcept

Set the orientation component using a quaternion.

Parameters
quaternionNew orientation value as a quaternion.
Returns
Reference to this object for chaining.

Definition at line 163 of file pose.hpp.

◆ setPosition() [1/2]

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::setPosition ( const Position< PoseComponentType > &  position)
inlinenoexcept

Set the position component.

Parameters
positionNew position value.
Returns
Reference to this object for chaining.

Definition at line 120 of file pose.hpp.

◆ setPosition() [2/2]

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::setPosition ( math::Vector< PoseComponentType, 3 >  position)
inlinenoexcept

Set the position component using a vector.

Parameters
positionNew position value as a 3D vector.
Returns
Reference to this object for chaining.

Definition at line 131 of file pose.hpp.

◆ toForwardRay()

template<CanBePoseComponent PoseComponentType>
Ray< PoseComponentType > utility::graphic::Pose< PoseComponentType >::toForwardRay ( ) const
inlinenoexcept

Get a ray representing the forward direction of the pose.

Returns
Ray pointing in the forward direction from the pose position.

Definition at line 208 of file pose.hpp.

Here is the call graph for this function:

◆ toRightRay()

template<CanBePoseComponent PoseComponentType>
Ray< PoseComponentType > utility::graphic::Pose< PoseComponentType >::toRightRay ( ) const
inlinenoexcept

Get a ray representing the up direction of the pose.

Returns
Ray pointing in the up direction from the pose position.

Definition at line 226 of file pose.hpp.

Here is the call graph for this function:

◆ toUpRay()

template<CanBePoseComponent PoseComponentType>
Ray< PoseComponentType > utility::graphic::Pose< PoseComponentType >::toUpRay ( ) const
inlinenoexcept

Get a ray representing the right direction of the pose.

Returns
Ray pointing in the right direction from the pose position.

Definition at line 217 of file pose.hpp.

Here is the call graph for this function:

◆ translate()

template<CanBePoseComponent PoseComponentType>
Pose & utility::graphic::Pose< PoseComponentType >::translate ( const Position< PoseComponentType > &  offset)
inlinenoexcept

Translate pose position by an offset.

Parameters
offsetPosition offset to apply.
Returns
Reference to this pose for chaining.

Definition at line 185 of file pose.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ translated()

template<CanBePoseComponent PoseComponentType>
Pose utility::graphic::Pose< PoseComponentType >::translated ( const Position< PoseComponentType > &  offset) const
inlinenoexcept

Return translated copy of this pose.

Parameters
offsetPosition offset to apply.
Returns
A translated pose copy.

Definition at line 197 of file pose.hpp.

Here is the call graph for this function:

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