WPILibC++ 2023.4.3
frc::Transform3d Class Reference

Represents a transformation for a Pose3d. More...

#include <frc/geometry/Transform3d.h>

Public Member Functions

 Transform3d (Pose3d initial, Pose3d final)
 Constructs the transform that maps the initial pose to the final pose. More...
 
 Transform3d (Translation3d translation, Rotation3d rotation)
 Constructs a transform with the given translation and rotation components. More...
 
constexpr Transform3d ()=default
 Constructs the identity transform – maps an initial pose to itself. More...
 
const Translation3dTranslation () const
 Returns the translation component of the transformation. More...
 
units::meter_t X () const
 Returns the X component of the transformation's translation. More...
 
units::meter_t Y () const
 Returns the Y component of the transformation's translation. More...
 
units::meter_t Z () const
 Returns the Z component of the transformation's translation. More...
 
const Rotation3dRotation () const
 Returns the rotational component of the transformation. More...
 
Transform3d Inverse () const
 Invert the transformation. More...
 
Transform3d operator* (double scalar) const
 Multiplies the transform by the scalar. More...
 
Transform3d operator/ (double scalar) const
 Divides the transform by the scalar. More...
 
Transform3d operator+ (const Transform3d &other) const
 Composes two transformations. More...
 
bool operator== (const Transform3d &) const =default
 Checks equality between this Transform3d and another object. More...
 

Detailed Description

Represents a transformation for a Pose3d.

Constructor & Destructor Documentation

◆ Transform3d() [1/3]

frc::Transform3d::Transform3d ( Pose3d  initial,
Pose3d  final 
)

Constructs the transform that maps the initial pose to the final pose.

Parameters
initialThe initial pose for the transformation.
finalThe final pose for the transformation.

◆ Transform3d() [2/3]

frc::Transform3d::Transform3d ( Translation3d  translation,
Rotation3d  rotation 
)

Constructs a transform with the given translation and rotation components.

Parameters
translationTranslational component of the transform.
rotationRotational component of the transform.

◆ Transform3d() [3/3]

constexpr frc::Transform3d::Transform3d ( )
constexprdefault

Constructs the identity transform – maps an initial pose to itself.

Member Function Documentation

◆ Inverse()

Transform3d frc::Transform3d::Inverse ( ) const

Invert the transformation.

This is useful for undoing a transformation.

Returns
The inverted transformation.

◆ operator*()

Transform3d frc::Transform3d::operator* ( double  scalar) const
inline

Multiplies the transform by the scalar.

Parameters
scalarThe scalar.
Returns
The scaled Transform3d.

◆ operator+()

Transform3d frc::Transform3d::operator+ ( const Transform3d other) const

Composes two transformations.

Parameters
otherThe transform to compose with this one.
Returns
The composition of the two transformations.

◆ operator/()

Transform3d frc::Transform3d::operator/ ( double  scalar) const
inline

Divides the transform by the scalar.

Parameters
scalarThe scalar.
Returns
The scaled Transform3d.

◆ operator==()

bool frc::Transform3d::operator== ( const Transform3d ) const
default

Checks equality between this Transform3d and another object.

◆ Rotation()

const Rotation3d & frc::Transform3d::Rotation ( ) const
inline

Returns the rotational component of the transformation.

Returns
Reference to the rotational component of the transform.

◆ Translation()

const Translation3d & frc::Transform3d::Translation ( ) const
inline

Returns the translation component of the transformation.

Returns
Reference to the translational component of the transform.

◆ X()

units::meter_t frc::Transform3d::X ( ) const
inline

Returns the X component of the transformation's translation.

Returns
The x component of the transformation's translation.

◆ Y()

units::meter_t frc::Transform3d::Y ( ) const
inline

Returns the Y component of the transformation's translation.

Returns
The y component of the transformation's translation.

◆ Z()

units::meter_t frc::Transform3d::Z ( ) const
inline

Returns the Z component of the transformation's translation.

Returns
The z component of the transformation's translation.

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