RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
Transform.hpp
1#pragma once
2#include "RaidZeroLib/api/Geometry/Point.hpp"
3#include "RaidZeroLib/api/Geometry/Rotation.hpp"
4
5namespace rz {
6
7class Pose;
8
23class Transform {
24 public:
26 constexpr Transform() noexcept = default;
27
38 Transform(const Pose& initial, const Pose& final) noexcept;
39
46 Transform(const Point& point, const Rotation& rotation) noexcept;
47
49 const Point& getPoint() const noexcept;
50
52 const Rotation& getRotation() const noexcept;
53
55 Length X() const noexcept;
56
58 Length Y() const noexcept;
59
61 Angle Theta() const noexcept;
62
72 Transform operator+(const Transform& rhs) const noexcept;
73
82 Transform operator-() const noexcept;
83
92 bool isApprox(const Transform& rhs) const noexcept;
93
94 private:
95 Point point;
96 Rotation rotation;
97};
98
99} // namespace rz
Immutable 2D point / vector with unit-safe Cartesian coordinates.
Definition Point.hpp:21
Rigid-body pose in SE(2) with unit-safe position and rotation.
Definition Pose.hpp:20
Immutable planar rotation about the Z axis.
Definition Rotation.hpp:16
const Point & getPoint() const noexcept
Access the translation component.
Length X() const noexcept
X translation (meters).
Angle Theta() const noexcept
Heading delta (radians, in (-π, π]).
constexpr Transform() noexcept=default
Identity transform: zero translation, zero rotation.
bool isApprox(const Transform &rhs) const noexcept
Approximate equality on both translation and rotation.
Length Y() const noexcept
Y translation (meters).
const Rotation & getRotation() const noexcept
Access the rotation component.
au::QuantityD< au::Radians > Angle
Definition Units.hpp:13
au::QuantityD< au::Meters > Length
Definition Units.hpp:9
Definition DriverControl.hpp:11