16#ifdef LIBCARLA_INCLUDED_FROM_UE4
18#include "Math/Rotator.h"
108 in_point.
x * (cp * cy) +
109 in_point.
y * (cy * sp * sr - sy *
cr) +
110 in_point.
z * (-cy * sp *
cr - sy * sr);
113 in_point.
x * (cp * sy) +
114 in_point.
y * (sy * sp * sr + cy *
cr) +
115 in_point.
z * (-sy * sp *
cr + cy * sr);
119 in_point.
y * (-cp * sr) +
120 in_point.
z * (cp *
cr);
122 in_point = out_point;
143 in_point.
x * (cp * cy) +
144 in_point.
y * (cp * sy) +
148 in_point.
x * (cy * sp * sr - sy *
cr) +
149 in_point.
y * (sy * sp * sr + cy *
cr) +
150 in_point.
z * (-cp * sr);
153 in_point.
x * (-cy * sp *
cr - sy * sr) +
154 in_point.
y * (-sy * sp *
cr + cy * sr) +
155 in_point.
z * (cp *
cr);
157 in_point = out_point;
168 V0.
yaw = V0.
yaw - (360.0f * trunc(V0.
yaw/360.0f));
171 if( V0.
pitch < 0.0f ){
177 if( V0.
roll < 0.0f ){
181 if( V0.
pitch >= 180.0f ){
184 if( V0.
yaw >= 180.0f ){
187 if( V0.
roll >= 180.0f ){
223 ( ( abs(
pitch) + abs(rhs.
pitch) == 180.0f) && ( abs(
yaw) + abs(rhs.
yaw) == 180.0f) && ( abs(
roll) + abs(rhs.
roll) == 180.0f) );
227 return !(*
this == rhs);
269#ifdef LIBCARLA_INCLUDED_FROM_UE4
272 :
Rotation(rotator.Pitch, rotator.Yaw, rotator.Roll) {}
274 operator FRotator()
const {
static Vector3D GetRightVector(const Rotation &rotation)
Compute the unit vector pointing towards the Y-axis of rotation.
static constexpr T ToRadians(T deg)
static Vector3D GetUpVector(const Rotation &rotation)
Compute the unit vector pointing towards the Y-axis of rotation.
static Vector3D GetForwardVector(const Rotation &rotation)
Compute the unit vector pointing towards the X-axis of rotation.
Euler angles of a rotation in CARLA's / Unreal's left-handed frame: x forward, y right,...
Vector3D RotateVector(const Vector3D &in_point) const
constexpr Rotation(float p, float y, float r)
constexpr RightHandedRotation ToRightHanded() const
This rotation expressed in a right-handed, x-forward / y-**left** / z-up frame (ROS REP-103 "FLU"),...
Rotation & operator+=(const Rotation &rhs)
static constexpr Rotation FromRightHanded(const RightHandedRotation &rhs)
Inverse of ToRightHanded().
Rotation Normalize() const
Rotation(const FRotator &rotator)
MSGPACK_DEFINE_ARRAY(pitch, yaw, roll)
bool operator==(const Rotation &rhs) const
Vector3D GetUpVector() const
Vector3D GetRightVector() const
Rotation operator-(const Rotation &rhs) const
Rotation & operator-=(const Rotation &rhs)
void InverseRotateVector(Vector3D &in_point) const
bool operator!=(const Rotation &rhs) const
void RotateVector(Vector3D &in_point) const
Rotation operator+(const Rotation &rhs) const
Vector3D GetForwardVector() const
This file contains definitions of common data structures used in traffic manager.
Euler angles of a rotation expressed in a right-handed frame, in degrees.
float yaw
Rotation about the up (+Z) axis, degrees, right-hand rule.
float roll
Rotation about the forward (+X) axis, degrees, right-hand rule.
float pitch
Rotation about the left (+Y) axis, degrees, right-hand rule.