YawPitchRollTransform

Description

sealed class Tinman.Engine.Scenes.Util.YawPitchRollTransform

Derived from

TerrainTransform abstract

A ITerrainTransform that rotates model-space around the given yaw, pitch and roll angles, in order to transform to a local coordinate system (see LocalTransform).

The rotations are performed in the following order, to transform from model-space to the local coordinate system:

  1. Clockwise rotation in direction of positive Z-axis with Roll angle.
    In terms of an aircraft, positive roll angles lift the left wing and lower the right wing.

  2. Clockwise rotation in direction of negative ( CartesianHandedness.RightHanded) resp. positive ( CartesianHandedness.LeftHanded) X-axis with Pitch angle.
    In terms of an aircraft, positive pitch angles raise the nose and lower the tail.

  3. Clockwise rotation in direction of negative Y-axis with Yaw angle.
    In terms of an aircraft, positive yaw angles move the nose to the right and the tail to the left.

This corresponds to these descriptions:
https://en.wikipedia.org/wiki/Aircraft_principal_axes

The following static method may be used to general-purpose computations regarding yaw, pitch and roll angles:

Public / Methods

Matrix

2 overloads


[Pure]
public static method Matrix1 → (2)

yawPitchRoll in : Vec3D

The rotation angles:
Vec3D.X: Yaw
Vec3D.Y: Pitch
Vec3D.Z: Roll

rightHanded opt : bool = true

Assume a right-handed coordinate system?

returns → Mat3D

The resulting rotation matrix.

Computes the combined rotation matrix for the given angles.


[Pure]
public static method Matrix2 → (4)

yaw in : float64

The Yaw angle.

pitch in : float64

The Pitch angle.

roll in : float64

The Roll angle.

rightHanded opt : bool = true

Assume a right-handed coordinate system?

returns → Mat3D

The resulting rotation matrix.

Computes the combined rotation matrix for the given angles.

Normal


[Pure]
public static method Normal → (3)

in : Vec3D

First point in the local coordinate system.

in : Vec3D

Second point in the local coordinate system.

in : Vec3D

Third point in the local coordinate system.

returns → Vec3D

The normal vector in the local coordinate system. The vector will not be of unit-length.

Computes a normal vector in the local coordinate system.

See also

LocalTransform

Pitch​Angle


[Pure]
public static method PitchAngle → (1)

normal in : Vec3D

The normal vector, in the local coordinate system.

returns → float64

The pitch angle, in degrees.

Computes the Pitch angle for the given normal vector.

Pitch​Matrix


[Pure]
public static method PitchMatrix → (2)

pitch in : float64

The Pitch angle.

rightHanded opt : bool = true

Assume a right-handed coordinate system?

returns → Mat3D

The resulting rotation matrix.

Computes the rotation matrix for the given pitch in angle.

Roll​Angle


[Pure]
public static method RollAngle → (1)

normal in : Vec3D

The normal vector, in the local coordinate system.

returns → float64

The roll angle, in degrees.

Computes the Roll angle for the given normal vector.

Roll​Matrix


[Pure]
public static method RollMatrix → (1)

roll in : float64

The Roll angle.

returns → Mat3D

The resulting rotation matrix.

Computes the rotation matrix for the given roll in angle.

Yaw​Matrix


[Pure]
public static method YawMatrix → (1)

yaw in : float64

The Yaw angle.

returns → Mat3D

The resulting rotation matrix.

Computes the rotation matrix for the given yaw in angle.

Public / Attributes

Angles


public attribute Angles → (get,set)

value : Vec3D

The angles:
Vec3D.X : Yaw
Vec3D.Y : Pitch
Vec3D.Z : Roll

The yaw, pitch and roll angles.

Pitch


public attribute Pitch → (get,set)

value : float64

The pitch angle, in the range [-180..180[ degrees.

The pitch angle.

Roll


public attribute Roll → (get,set)

value : float64

The roll angle, in the range [-180..180[ degrees.

The roll angle.

Yaw


public attribute Yaw → (get,set)

value : float64

The yaw angle, in the range [-180..180[ degrees.

The yaw angle.