RaidZeroLib
Coroutine robot framework for VEX V5
Toggle main menu visibility
Loading...
Searching...
No Matches
Transform.hpp
1
#pragma once
2
#include "RaidZeroLib/api/Geometry/Point.hpp"
3
#include "RaidZeroLib/api/Geometry/Rotation.hpp"
4
5
namespace
rz
{
6
7
class
Pose
;
8
23
class
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
rz::Point
Immutable 2D point / vector with unit-safe Cartesian coordinates.
Definition
Point.hpp:21
rz::Pose
Rigid-body pose in SE(2) with unit-safe position and rotation.
Definition
Pose.hpp:20
rz::Rotation
Immutable planar rotation about the Z axis.
Definition
Rotation.hpp:16
rz::Transform::getPoint
const Point & getPoint() const noexcept
Access the translation component.
rz::Transform::X
Length X() const noexcept
X translation (meters).
rz::Transform::Theta
Angle Theta() const noexcept
Heading delta (radians, in (-π, π]).
rz::Transform::Transform
constexpr Transform() noexcept=default
Identity transform: zero translation, zero rotation.
rz::Transform::isApprox
bool isApprox(const Transform &rhs) const noexcept
Approximate equality on both translation and rotation.
rz::Transform::Y
Length Y() const noexcept
Y translation (meters).
rz::Transform::getRotation
const Rotation & getRotation() const noexcept
Access the rotation component.
rz::Angle
au::QuantityD< au::Radians > Angle
Definition
Units.hpp:13
rz::Length
au::QuantityD< au::Meters > Length
Definition
Units.hpp:9
rz
Definition
DriverControl.hpp:11
RaidZeroLib
api
Geometry
Transform.hpp
Generated by
1.18.0