Karma Engine
Loading...
Searching...
No Matches
Karma::TRotator Struct Reference

#include <Transform.h>

Public Member Functions

 TRotator (glm::vec3 EulerAngles)
 
TRotator Inverse () const
 
TRotator operator* (const TRotator &Other) const
 
glm::vec3 operator* (const glm::vec3 &Translation) const
 

Public Attributes

float m_Pitch
 
float m_Yaw
 
float m_Roll
 

Detailed Description

Implements a container for rotation information.

All rotation values are stored in degrees.

The angles are interpreted as intrinsic rotations applied in the order Yaw, then Pitch, then Roll. I.e., an object would be rotated first by the specified yaw around its up axis (with positive angles interpreted as clockwise when viewed from above, along -Z), then pitched around its (new) right axis (with positive angles interpreted as 'nose up', i.e. clockwise when viewed along +Y), and then finally rolled around its (final) forward axis (with positive angles interpreted as clockwise rotations when viewed along +X).

Note that these conventions differ from quaternion axis/angle. UE Quat always considers a positive angle to be a left-handed rotation, whereas Rotator treats yaw as left-handed but pitch and roll as right-handed.

Member Function Documentation

◆ Inverse()

TRotator Karma::TRotator::Inverse ( ) const
inline

Returns the counter of this rotation governed by Yaw, Pitch, and Roll in the fashion above

Member Data Documentation

◆ m_Pitch

float Karma::TRotator::m_Pitch

Rotation around the right axis (around Y axis), Looking up and down (0=Straight Ahead, +Up, -Down)

◆ m_Roll

float Karma::TRotator::m_Roll

Rotation around the forward axis (around X axis), Tilting your head, (0=Straight, +Clockwise, -CCW)

◆ m_Yaw

float Karma::TRotator::m_Yaw

Rotation around the up axis (around Z axis), Turning around (0=Forward, +Right, -Left)


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