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

A class to represent yaw, pitch, and roll angles for orientation. More...

#include <YawPitchRoll.h>

Public Member Functions

 YawPitchRoll ()
 Default constructor, initializes yaw, pitch, and roll to 0.
 
 YawPitchRoll (Vector3D vector)
 Constructor to initialize yaw, pitch, and roll from a vector.
 
 YawPitchRoll (const YawPitchRoll &ypr)
 Copy constructor.
 
 YawPitchRoll (float yaw, float pitch, float roll)
 Constructor to initialize yaw, pitch, and roll with specific values.
 
String ToString () const
 Converts the yaw, pitch, and roll angles to a string representation.
 

Public Attributes

float Yaw
 The yaw angle, representing rotation around the vertical axis.
 
float Pitch
 The pitch angle, representing rotation around the lateral axis.
 
float Roll
 The roll angle, representing rotation around the longitudinal axis.
 

Detailed Description

A class to represent yaw, pitch, and roll angles for orientation.

Definition at line 18 of file YawPitchRoll.h.

Constructor & Destructor Documentation

◆ YawPitchRoll() [1/4]

Default constructor, initializes yaw, pitch, and roll to 0.

Definition at line 4 of file YawPitchRoll.cpp.

◆ YawPitchRoll() [2/4]

YawPitchRoll ( Vector3D  vector)

Constructor to initialize yaw, pitch, and roll from a vector.

Parameters
vectorA Vector3D where X = yaw, Y = pitch, Z = roll.

Definition at line 6 of file YawPitchRoll.cpp.

◆ YawPitchRoll() [3/4]

Copy constructor.

Parameters
yprThe YawPitchRoll object to copy from.

Definition at line 8 of file YawPitchRoll.cpp.

◆ YawPitchRoll() [4/4]

YawPitchRoll ( float  yaw,
float  pitch,
float  roll 
)

Constructor to initialize yaw, pitch, and roll with specific values.

Parameters
yawThe yaw angle.
pitchThe pitch angle.
rollThe roll angle.

Definition at line 10 of file YawPitchRoll.cpp.

Member Function Documentation

◆ ToString()

String ToString ( ) const

Converts the yaw, pitch, and roll angles to a string representation.

Returns
A string representation of the YawPitchRoll object.

Definition at line 12 of file YawPitchRoll.cpp.

References Mathematics::DoubleToCleanString(), Pitch, Roll, and Yaw.

Member Data Documentation

◆ Pitch

float Pitch

The pitch angle, representing rotation around the lateral axis.

Definition at line 21 of file YawPitchRoll.h.

Referenced by ToString().

◆ Roll

float Roll

The roll angle, representing rotation around the longitudinal axis.

Definition at line 22 of file YawPitchRoll.h.

Referenced by ToString().

◆ Yaw

float Yaw

The yaw angle, representing rotation around the vertical axis.

Definition at line 20 of file YawPitchRoll.h.

Referenced by ToString().


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