YawPitchRollAngles Class

Three angles that determine the orientation of an object in space. Sometimes referred to as Tait–Bryan angles.

Methods

Name Description
constructor(yaw: Angle = Angle.zero(), pitch: Angle = Angle.zero(), roll: Angle = Angle.zero()):
clone(): Make a copy of this YawPitchRollAngles.
freeze(): void Freeze this YawPitchRollAngles
isAlmostEqual(other: YawPitchRollAngles): boolean * Compare angles between `this` and `other`.
isIdentity(allowPeriodShift: boolean = true): boolean Returns true if this rotation does nothing.
maxAbsDegrees(): number Return the largest angle in degrees.
maxDiffRadians(other: YawPitchRollAngles): number Return the largest difference of angles (in radians) between this and other
setFrom(other: YawPitchRollAngles): void Install all rotations from `other` into `this`.
setFromJSON(json?: YawPitchRollProps): void populate yaw, pitch and roll fields using `Angle.fromJSON`
sumSquaredDegrees(): number Return the sum of squared angles in degrees.
toJSON(): Convert to a JSON object of form { pitch: 20 , roll: 29.999999999999996 , yaw: 10 }.
toMatrix3d(result?: Matrix3d): Expand the angles into a (rigid rotation) matrix.
createDegrees(yawDegrees: number, pitchDegrees: number, rollDegrees: number): Static constructor for YawPitchRollAngles with angles in degrees.
createFromMatrix3d(matrix: Matrix3d, result?: YawPitchRollAngles): YawPitchRollAngles | undefined Static Attempts to create a YawPitchRollAngles object from an Matrix3d
This conversion fails if the matrix is not rigid (unit rows and columns, transpose is inverse)
In the failure case the method's return value is `undefined`.

fromJSON(json?: YawPitchRollProps): Static construct a `YawPitchRoll` object from an object with 3 named angles