ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
DirectionAngle.cpp
Go to the documentation of this file.
1#include "DirectionAngle.h"
2#include "Mathematics.h"
3
4// Constructor with individual components.
5DirectionAngle::DirectionAngle(float rotation, float x, float y, float z)
6 : Rotation(rotation), Direction(x, y, z) {}
7
8// Constructor with Vector3D.
9DirectionAngle::DirectionAngle(float rotation, Vector3D direction)
10 : Rotation(rotation), Direction(direction) {}
11
12// Convert DirectionAngle to a string representation.
18
19 return r + ": [" + x + " " + y + " " + z + "]";
20}
Represents a rotation defined by a direction vector and an angle.
Provides a collection of mathematical utility functions and constants.
String ToString()
Converts the DirectionAngle to a string representation.
DirectionAngle(float rotation, float x, float y, float z)
Constructs a DirectionAngle with a rotation angle and individual direction components.
float Rotation
The angle of rotation in degrees (or radians, depending on usage).
Vector3D Direction
The direction vector defining the axis of rotation.
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