![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Defines a rotation in 3D space using a direction vector and a rotation angle. More...
#include <DirectionAngle.h>
Public Member Functions | |
DirectionAngle (float rotation, float x, float y, float z) | |
Constructs a DirectionAngle with a rotation angle and individual direction components. | |
DirectionAngle (float rotation, Vector3D direction) | |
Constructs a DirectionAngle with a rotation angle and a direction vector. | |
String | ToString () |
Converts the DirectionAngle to a string representation. | |
Public Attributes | |
float | Rotation |
The angle of rotation in degrees (or radians, depending on usage). | |
Vector3D | Direction |
The direction vector defining the axis of rotation. | |
Defines a rotation in 3D space using a direction vector and a rotation angle.
The DirectionAngle
class provides a representation for rotations, where the rotation is defined by an angle and a direction vector. This is similar to AxisAngle
but can represent rotations about arbitrary direction vectors.
Definition at line 25 of file DirectionAngle.h.
DirectionAngle | ( | float | rotation, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Constructs a DirectionAngle
with a rotation angle and individual direction components.
rotation | The angle of rotation. |
x | The X component of the direction vector. |
y | The Y component of the direction vector. |
z | The Z component of the direction vector. |
Definition at line 5 of file DirectionAngle.cpp.
DirectionAngle | ( | float | rotation, |
Vector3D | direction | ||
) |
Constructs a DirectionAngle
with a rotation angle and a direction vector.
rotation | The angle of rotation. |
direction | The direction vector, represented as a Vector3D . |
Definition at line 9 of file DirectionAngle.cpp.
String ToString | ( | ) |
Converts the DirectionAngle
to a string representation.
Useful for debugging and visualization of the rotation data.
DirectionAngle
in the format "(rotation: X, direction: [X, Y, Z])". Definition at line 13 of file DirectionAngle.cpp.
References Direction, Mathematics::DoubleToCleanString(), Vector3D::X, Vector3D::Y, and Vector3D::Z.
Vector3D Direction |
The direction vector defining the axis of rotation.
Definition at line 28 of file DirectionAngle.h.
Referenced by ToString().
The angle of rotation in degrees (or radians, depending on usage).
Definition at line 27 of file DirectionAngle.h.