ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
AxisAngle.h
Go to the documentation of this file.
1/**
2 * @file AxisAngle.h
3 * @brief Represents a rotation defined by an axis and an angle.
4 *
5 * The `AxisAngle` class encapsulates a rotation using a specified axis and a rotation angle.
6 *
7 * @date 22/12/2024
8 * @version 1.0
9 * @author Coela Can't
10 */
11
12#pragma once
13
14#include "Vector3D.h"
15
16/**
17 * @class AxisAngle
18 * @brief Defines a rotation in 3D space using an axis and an angle.
19 *
20 * The `AxisAngle` class provides a representation for rotations, where the rotation is defined
21 * by an angle in degrees (or radians) and a unit axis vector.
22 */
23class AxisAngle {
24public:
25 float Rotation; ///< The angle of rotation in degrees (or radians, depending on usage).
26 Vector3D Axis; ///< The axis of rotation, represented as a 3D vector.
27
28 /**
29 * @brief Constructs an `AxisAngle` with a rotation angle and individual axis components.
30 *
31 * @param rotation The angle of rotation.
32 * @param x The X component of the rotation axis.
33 * @param y The Y component of the rotation axis.
34 * @param z The Z component of the rotation axis.
35 */
36 AxisAngle(float rotation, float x, float y, float z);
37
38 /**
39 * @brief Constructs an `AxisAngle` with a rotation angle and a vector axis.
40 *
41 * @param rotation The angle of rotation.
42 * @param axis The axis of rotation, represented as a `Vector3D`.
43 */
44 AxisAngle(float rotation, Vector3D axis);
45
46 /**
47 * @brief Converts the `AxisAngle` to a string representation.
48 *
49 * Useful for debugging and visualization of the rotation data.
50 *
51 * @return A string representing the `AxisAngle` in the format "(rotation: X, axis: [X, Y, Z])".
52 */
54};
Defines a 3D vector and various related operations.
Defines a rotation in 3D space using an axis and an angle.
Definition AxisAngle.h:23
String ToString()
Converts the AxisAngle to a string representation.
Definition AxisAngle.cpp:11
Vector3D Axis
The axis of rotation, represented as a 3D vector.
Definition AxisAngle.h:26
float Rotation
The angle of rotation in degrees (or radians, depending on usage).
Definition AxisAngle.h:25
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