ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
EulerOrder.h
Go to the documentation of this file.
1/**
2 * @file EulerOrder.h
3 * @brief Defines the EulerOrder class for specifying rotation orders in 3D space.
4 *
5 * The EulerOrder class allows for flexible specification of the order of axes used
6 * in rotations, along with the frame of reference (static or rotating).
7 *
8 * @date 22/12/2024
9 * @version 1.0
10 * @author Coela Can't
11 */
12
13#pragma once
14
15#include "Vector3D.h"
16
17/**
18 * @class EulerOrder
19 * @brief Specifies the order and frame of reference for Euler rotations.
20 *
21 * The `EulerOrder` class provides a way to define the sequence of axes
22 * for performing rotations in 3D space. It also differentiates between
23 * static and rotating reference frames.
24 */
26public:
27 /**
28 * @enum Axis
29 * @brief Enumeration of possible axis orders for rotations.
30 *
31 * - `XYZ`: Rotate about X, then Y, then Z.
32 * - `XZY`: Rotate about X, then Z, then Y.
33 * - `YXZ`: Rotate about Y, then X, then Z.
34 * - `YZX`: Rotate about Y, then Z, then X.
35 * - `ZXY`: Rotate about Z, then X, then Y.
36 * - `ZYX`: Rotate about Z, then Y, then X.
37 */
38 enum Axis {
39 XYZ, ///< X → Y → Z rotation order.
40 XZY, ///< X → Z → Y rotation order.
41 YXZ, ///< Y → X → Z rotation order.
42 YZX, ///< Y → Z → X rotation order.
43 ZXY, ///< Z → X → Y rotation order.
44 ZYX ///< Z → Y → X rotation order.
45 };
46
47 /**
48 * @enum AxisFrame
49 * @brief Enumeration of possible reference frames for rotations.
50 *
51 * - `Static`: Rotations are applied relative to a static (inertial) frame.
52 * - `Rotating`: Rotations are applied relative to a rotating (non-inertial) frame.
53 */
54 enum AxisFrame {
55 Static, ///< Rotations relative to a static frame.
56 Rotating ///< Rotations relative to a rotating frame.
57 };
58
59 Axis AxisOrder; ///< The sequence of axes for the rotation order.
60 AxisFrame FrameTaken; ///< The frame of reference (static or rotating).
61 Vector3D Permutation; ///< Permutation vector for axis reordering.
62
63 /**
64 * @brief Default constructor.
65 *
66 * Creates an `EulerOrder` object with default values.
67 */
68 EulerOrder();
69
70 /**
71 * @brief Parameterized constructor.
72 *
73 * Initializes an `EulerOrder` object with the specified axis order, frame, and permutation.
74 *
75 * @param axisOrder The sequence of axes for the rotation order.
76 * @param axisFrame The frame of reference (static or rotating).
77 * @param permutation The permutation vector for axis reordering.
78 */
80
81 /**
82 * @brief Converts the EulerOrder object to a string representation.
83 *
84 * @return A string describing the axis order, frame, and permutation.
85 */
87};
Defines a 3D vector and various related operations.
Specifies the order and frame of reference for Euler rotations.
Definition EulerOrder.h:25
String ToString()
Converts the EulerOrder object to a string representation.
AxisFrame FrameTaken
The frame of reference (static or rotating).
Definition EulerOrder.h:60
Vector3D Permutation
Permutation vector for axis reordering.
Definition EulerOrder.h:61
EulerOrder()
Default constructor.
Definition EulerOrder.cpp:4
Axis
Enumeration of possible axis orders for rotations.
Definition EulerOrder.h:38
@ YZX
Y → Z → X rotation order.
Definition EulerOrder.h:42
@ XZY
X → Z → Y rotation order.
Definition EulerOrder.h:40
@ ZYX
Z → Y → X rotation order.
Definition EulerOrder.h:44
@ YXZ
Y → X → Z rotation order.
Definition EulerOrder.h:41
@ ZXY
Z → X → Y rotation order.
Definition EulerOrder.h:43
@ XYZ
X → Y → Z rotation order.
Definition EulerOrder.h:39
Axis AxisOrder
The sequence of axes for the rotation order.
Definition EulerOrder.h:59
AxisFrame
Enumeration of possible reference frames for rotations.
Definition EulerOrder.h:54
@ Rotating
Rotations relative to a rotating frame.
Definition EulerOrder.h:56
@ Static
Rotations relative to a static frame.
Definition EulerOrder.h:55
Implements a generic Kalman Filter for 1D data.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26