Skip to content

Commit 27c5060

Browse files
committed
provide alias aviable names for euler angles
1 parent 0f541b2 commit 27c5060

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

geometry/geometry_datatypes.h

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,22 @@ typedef struct quaternion_
7575
/** 3D Euler or Tait-Bryan angles (in radian) */
7676
typedef struct euler_
7777
{
78-
float roll; /**< or bank \f$\phi\f$ = rotation about X axis */
79-
float pitch; /**< or elevation \f$\theta\f$ = rotation about Y axis */
80-
float yaw; /**< or heading \f$\psi\f$ = rotation about Z axis */
78+
union
79+
{
80+
float roll; /**< or bank \f$\phi\f$ = rotation about X axis */
81+
float bank; /**< or bank \f$\phi\f$ = rotation about X axis */
82+
};
83+
union
84+
{
85+
float pitch; /**< or elevation \f$\theta\f$ = rotation about Y axis */
86+
float
87+
elevation; /**< or elevation \f$\theta\f$ = rotation about Y axis */
88+
};
89+
union
90+
{
91+
float yaw; /**< or heading \f$\psi\f$ = rotation about Z axis */
92+
float heading; /**< or heading \f$\psi\f$ = rotation about Z axis */
93+
};
8194
} euler;
8295

8396
/** @} */

0 commit comments

Comments
 (0)