What can I help you with?
NVIDIA Holoscan SDK v3.4.0

Template Struct Pose3

template<typename K>
struct Pose3

Class representing 3D transformations (rigid body motion in 3D).

This class represents elements of the SE(3) group, which combines 3D rotations and translations. Each pose consists of a rotation component (SO3) and a translation vector in 3D space.

Template Parameters

K – Scalar type (typically float or double).

Public Types

using Scalar = K

Public Functions

inline Pose3()

Default constructor creates identity pose.

inline Pose3(const SO3<K> &rotation, const Vector3<K> &translation)

Constructor from rotation and translation components.

Parameters
  • rotation – Rotation component.

  • translation – Translation component.

inline Pose3 inverse() const

Get the inverse transformation.

Returns

Inverse transformation.

inline Matrix4<K> matrix() const

Get the 4×4 homogeneous transformation matrix representation.

Returns

4×4 transformation matrix.

template<typename S, typename std::enable_if_t<!std::is_same<S, K>::value, int> = 0>
inline Pose3<S> cast() const

Cast to a different scalar type.

Template Parameters

S – Target scalar type.

Returns

Pose cast to the target type.

template<typename S, typename std::enable_if_t<std::is_same<S, K>::value, int> = 0>
inline const Pose3 &cast() const

Cast to the same scalar type (no-op).

Template Parameters

S – Target scalar type (same as K).

Returns

Reference to this pose.

inline Pose2<K> to_pose2_xy() const

Convert to a 2D pose in the XY plane.

Returns

2D pose representing the XY components of this 3D pose.

inline Pose3 pow(K exponent) const

Compute the power of the transformation.

This computes the transformation raised to the given exponent using exponential coordinates and matrix exponentiation. The implementation handles the general case by aligning the rotation axis with the Z-axis.

Parameters

exponent – Power to raise the transformation to.

Returns

Transformation raised to the given power.

Public Members

SO3<K> rotation

Rotation component.

Vector3<K> translation

Translation component.

Public Static Functions

static inline Pose3 identity()

Create the identity transformation.

Returns

Identity transformation (no rotation or translation).

static inline Pose3 from_translation(const Vector3<K> &translation)

Create a pure translation transformation.

Parameters

translation – Translation vector.

Returns

Translation-only transformation.

static inline Pose3 from_translation(K x, K y, K z)

Create a pure translation transformation from components.

Parameters
  • x – X component of translation.

  • y – Y component of translation.

  • z – Z component of translation.

Returns

Translation-only transformation.

static inline Pose3 from_rotation(const Vector3<K> &axis, K angle)

Create a pure rotation transformation.

Parameters
  • axis – Rotation axis (will be normalized internally).

  • angle – Rotation angle in radians.

Returns

Rotation-only transformation.

static inline Pose3 from_pose2_xy(const Pose2<K> &pose)

Create a 3D pose from a 2D pose in the XY plane.

Parameters

pose – 2D pose in the XY plane.

Returns

3D pose with Z translation = 0 and rotation around Z-axis.

static inline Pose3 from_matrix(const Matrix4<K> &matrix)

Create a pose from a 4×4 transformation matrix.

Parameters

matrix – 4×4 homogeneous transformation matrix.

Returns

Pose represented by the matrix.

Public Static Attributes

static constexpr int kDimension = 3

Friends

inline friend Pose3 operator*(const Pose3 &lhs, const Pose3 &rhs)

Compose two poses.

Parameters
  • lhs – Left pose.

  • rhs – Right pose.

Returns

Composed pose lhs * rhs.

inline friend Vector3<K> operator*(const Pose3 &pose, const Vector3<K> &vec)

Transform a 3D vector with the given transformation.

Parameters
  • pose – Transformation to apply.

  • vec – Vector to transform.

Returns

Transformed vector.

Previous Template Struct Pose2
Next Struct HashMap::Entry
© Copyright 2022-2025, NVIDIA. Last updated on Jul 1, 2025.