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

Defines a rotation in 3D space using an axis and an angle. More...

#include <AxisAngle.h>

Collaboration diagram for AxisAngle:

Public Member Functions

 AxisAngle (float rotation, float x, float y, float z)
 Constructs an AxisAngle with a rotation angle and individual axis components.
 
 AxisAngle (float rotation, Vector3D axis)
 Constructs an AxisAngle with a rotation angle and a vector axis.
 
String ToString ()
 Converts the AxisAngle to a string representation.
 

Public Attributes

float Rotation
 The angle of rotation in degrees (or radians, depending on usage).
 
Vector3D Axis
 The axis of rotation, represented as a 3D vector.
 

Detailed Description

Defines a rotation in 3D space using an axis and an angle.

The AxisAngle class provides a representation for rotations, where the rotation is defined by an angle in degrees (or radians) and a unit axis vector.

Definition at line 23 of file AxisAngle.h.

Constructor & Destructor Documentation

◆ AxisAngle() [1/2]

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

Constructs an AxisAngle with a rotation angle and individual axis components.

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

Definition at line 5 of file AxisAngle.cpp.

◆ AxisAngle() [2/2]

AxisAngle ( float  rotation,
Vector3D  axis 
)

Constructs an AxisAngle with a rotation angle and a vector axis.

Parameters
rotationThe angle of rotation.
axisThe axis of rotation, represented as a Vector3D.

Definition at line 8 of file AxisAngle.cpp.

Member Function Documentation

◆ ToString()

String ToString ( )

Converts the AxisAngle to a string representation.

Useful for debugging and visualization of the rotation data.

Returns
A string representing the AxisAngle in the format "(rotation: X, axis: [X, Y, Z])".

Definition at line 11 of file AxisAngle.cpp.

References Axis, Mathematics::DoubleToCleanString(), Vector3D::X, Vector3D::Y, and Vector3D::Z.

Member Data Documentation

◆ Axis

Vector3D Axis

The axis of rotation, represented as a 3D vector.

Definition at line 26 of file AxisAngle.h.

Referenced by ToString().

◆ Rotation

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

Definition at line 25 of file AxisAngle.h.


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