Euphoria
axisangle.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#include "base/vec3.h"
6#include "base/angle.h"
7
8
9namespace eu
10{
15 struct Q;
16
18 struct AA
19 {
22
25
26 AA(const n3 &ax, const An &ang);
27
28 [[nodiscard]] static std::optional<AA> from(const Q& q);
29 };
30
38
39 [[nodiscard]] AA
40 rha(const n3& axis, const An& angle);
41
42 std::string string_from(const AA &aa);
43 std::string string_from(const Ypr& ypr);
44
49}
50
51ADD_DEFAULT_FORMATTER(eu::AA, std::string, eu::string_from);
52ADD_DEFAULT_FORMATTER(eu::Ypr, std::string, eu::string_from);
#define ADD_CATCH_FORMATTER_DEF(TYPE)
Definition pch.public.h:22
AA rha(const n3 &axis, const An &angle)
constexpr An no_rotation
Definition angle.h:89
std::string string_from(const An &a)
Definition assert.h:109
Axis + Angle.
Definition axisangle.h:19
An angle
rotation according to right-hand rule
Definition axisangle.h:24
n3 axis
a unit-vector
Definition axisangle.h:21
static std::optional< AA > from(const Q &q)
AA(const n3 &ax, const An &ang)
An angle in both degrees and radians.
Definition angle.h:13
A quaternion representing a rotation in 3d.
Definition quat.h:19
yaw + pitch + roll
Definition axisangle.h:33
An pitch
Definition axisangle.h:35
An roll
Definition axisangle.h:36
a 3d unit (vector)
Definition vec3.h:92