17#ifdef LIBCARLA_INCLUDED_FROM_UE4
19#include "Math/Rotator.h"
97 in_point.
x * (cp * cy) +
98 in_point.
y * (cy * sp * sr - sy *
cr) +
99 in_point.
z * (-cy * sp *
cr - sy * sr);
103 in_point.
x * (cp * sy) +
104 in_point.
y * (sy * sp * sr + cy *
cr) +
105 in_point.
z * (-sy * sp *
cr + cy * sr);
110 in_point.
y * (-cp * sr) +
111 in_point.
z * (cp *
cr);
113 in_point = out_point;
141 in_point.
x * (cp * cy) +
142 in_point.
y * (cp * sy) +
147 in_point.
x * (cy * sp * sr - sy *
cr) +
148 in_point.
y * (sy * sp * sr + cy *
cr) +
149 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;
171 return!(*
this == rhs);
178#ifdef LIBCARLA_INCLUDED_FROM_UE4
181 :
Rotation(rotator.Pitch, rotator.Yaw, rotator.Roll) {}
184 operator FRotator()
const {
static Vector3D GetRightVector(const Rotation &rotation)
计算指向 rotation 的 Y 轴的单位向量
static constexpr T ToRadians(T deg)
static Vector3D GetUpVector(const Rotation &rotation)
计算指向 rotation 的 Z 轴的单位向量
static Vector3D GetForwardVector(const Rotation &rotation)
计算指向 rotation 的 X 轴的单位向量
Vector3D RotateVector(const Vector3D &in_point) const
Rotation(const FRotator &rotator)
MSGPACK_DEFINE_ARRAY(pitch, yaw, roll)
bool operator==(const Rotation &rhs) const
Vector3D GetUpVector() const
Vector3D GetRightVector() const
void InverseRotateVector(Vector3D &in_point) const
bool operator!=(const Rotation &rhs) const
void RotateVector(Vector3D &in_point) const
Vector3D GetForwardVector() const
Rotation(float p, float y, float r)