LemLib  0.4.7
An easy to use and feature-rich PROS template
Loading...
Searching...
No Matches
pose.hpp
Go to the documentation of this file.
1
11#pragma once
12
13namespace lemlib {
14class Pose {
15 public:
17 float x;
19 float y;
21 float theta;
29 Pose(float x, float y, float theta = 0);
36 Pose operator+(const Pose& other);
43 Pose operator-(const Pose& other);
50 float operator*(const Pose& other);
57 Pose operator*(const float& other);
64 Pose operator/(const float& other);
72 Pose lerp(Pose other, float t);
79 float distance(Pose other);
86 float angle(Pose other);
94};
95} // namespace lemlib
Definition: pose.hpp:14
Pose operator-(const Pose &other)
Subtract a pose from this pose.
float theta
theta value
Definition: pose.hpp:21
Pose lerp(Pose other, float t)
Linearly interpolate between two poses.
Pose operator/(const float &other)
Divide a pose by a float.
float operator*(const Pose &other)
Multiply a pose by this pose.
Pose operator+(const Pose &other)
Add a pose to this pose.
Pose(float x, float y, float theta=0)
Create a new pose.
float distance(Pose other)
Get the distance between two poses.
Pose rotate(float angle)
Rotate a pose by an angle.
float y
y value
Definition: pose.hpp:19
float angle(Pose other)
Get the angle between two poses.
Pose operator*(const float &other)
Multiply a pose by a float.
float x
x value
Definition: pose.hpp:17