ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
AxisAngle.cpp
Go to the documentation of this file.
1#include "AxisAngle.h"
2#include "Mathematics.h"
3
4// Constructor with individual components.
5AxisAngle::AxisAngle(float rotation, float x, float y, float z) : Rotation(rotation), Axis(x, y, z) {}
6
7// Constructor with Vector3D.
8AxisAngle::AxisAngle(float rotation, Vector3D axis) : Rotation(rotation), Axis(axis) {}
9
10// Convert AxisAngle to a string representation.
16
17 return r + ": [" + x + " " + y + " " + z + "]";
18}
Represents a rotation defined by an axis and an angle.
Provides a collection of mathematical utility functions and constants.
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
AxisAngle(float rotation, float x, float y, float z)
Constructs an AxisAngle with a rotation angle and individual axis components.
Definition AxisAngle.cpp:5
static String DoubleToCleanString(float value)
Converts a floating-point value to a String, removing trailing decimals if not needed.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26