ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
DirectionAngle Class Reference

Defines a rotation in 3D space using a direction vector and a rotation angle. More...

#include <DirectionAngle.h>

Collaboration diagram for DirectionAngle:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DirectionAngle() [1/2]

DirectionAngle ( float  rotation,
float  x,
float  y,
float  z 
)

Constructs a DirectionAngle with a rotation angle and individual direction components.

Parameters
rotationThe angle of rotation.
xThe X component of the direction vector.
yThe Y component of the direction vector.
zThe Z component of the direction vector.

Definition at line 5 of file DirectionAngle.cpp.

◆ DirectionAngle() [2/2]

DirectionAngle ( float  rotation,
Vector3D  direction 
)

Constructs a DirectionAngle with a rotation angle and a direction vector.

Parameters
rotationThe angle of rotation.
directionThe direction vector, represented as a Vector3D.

Definition at line 9 of file DirectionAngle.cpp.

Member Function Documentation

◆ ToString()

String ToString ( )

Converts the DirectionAngle to a string representation.

Useful for debugging and visualization of the rotation data.

Returns
A string representing the 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.

Member Data Documentation

◆ Direction

Vector3D Direction

The direction vector defining the axis of rotation.

Definition at line 28 of file DirectionAngle.h.

Referenced by ToString().

◆ Rotation

The angle of rotation in degrees (or radians, depending on usage).

Definition at line 27 of file DirectionAngle.h.


The documentation for this class was generated from the following files: