ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
DirectionAngle.h
Go to the documentation of this file.
1/**
2 * @file DirectionAngle.h
3 * @brief Represents a rotation defined by a direction vector and an angle.
4 *
5 * The `DirectionAngle` class encapsulates a rotation where the rotation is specified
6 * about a direction vector instead of a strict axis.
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 DirectionAngle
19 * @brief Defines a rotation in 3D space using a direction vector and a rotation angle.
20 *
21 * The `DirectionAngle` class provides a representation for rotations, where the rotation
22 * is defined by an angle and a direction vector. This is similar to `AxisAngle` but can
23 * represent rotations about arbitrary direction vectors.
24 */
26public:
27 float Rotation; ///< The angle of rotation in degrees (or radians, depending on usage).
28 Vector3D Direction; ///< The direction vector defining the axis of rotation.
29
30 /**
31 * @brief Constructs a `DirectionAngle` with a rotation angle and individual direction components.
32 *
33 * @param rotation The angle of rotation.
34 * @param x The X component of the direction vector.
35 * @param y The Y component of the direction vector.
36 * @param z The Z component of the direction vector.
37 */
38 DirectionAngle(float rotation, float x, float y, float z);
39
40 /**
41 * @brief Constructs a `DirectionAngle` with a rotation angle and a direction vector.
42 *
43 * @param rotation The angle of rotation.
44 * @param direction The direction vector, represented as a `Vector3D`.
45 */
46 DirectionAngle(float rotation, Vector3D direction);
47
48 /**
49 * @brief Converts the `DirectionAngle` to a string representation.
50 *
51 * Useful for debugging and visualization of the rotation data.
52 *
53 * @return A string representing the `DirectionAngle` in the format "(rotation: X, direction: [X, Y, Z])".
54 */
56};
Defines a 3D vector and various related operations.
Defines a rotation in 3D space using a direction vector and a rotation angle.
String ToString()
Converts the DirectionAngle to a string representation.
float Rotation
The angle of rotation in degrees (or radians, depending on usage).
Vector3D Direction
The direction vector defining the axis of rotation.
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