headingPitchRollToFixedFrame

fun headingPitchRollToFixedFrame(origin: Cartesian3, headingPitchRoll: HeadingPitchRoll, ellipsoid: Ellipsoid? = definedExternally, fixedFrameTransform: LocalFrameToFixedFrame? = definedExternally, result: Matrix4? = definedExternally): Matrix4(source)

Computes a 4x4 transformation matrix from a reference frame with axes computed from the heading-pitch-roll angles centered at the provided origin to the provided ellipsoid's fixed reference frame. Heading is the rotation from the local east direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.

// Get the transform from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.
const center = Cartesian3.fromDegrees(0.0, 0.0);
const heading = -Cesium.Math.PI_OVER_TWO;
const pitch = Math.PI_OVER_FOUR;
const roll = 0.0;
const hpr = new HeadingPitchRoll(heading, pitch, roll);
const transform = Transforms.headingPitchRollToFixedFrame(center, hpr);

Return

The modified result parameter or a new Matrix4 instance if none was provided.

Parameters

origin

The center point of the local reference frame.

headingPitchRoll

The heading, pitch, and roll.

ellipsoid

The ellipsoid whose fixed frame is used in the transformation. Default value - Ellipsoid.default

fixedFrameTransform

A 4x4 transformation matrix from a reference frame to the provided ellipsoid's fixed reference frame Default value - Transforms.eastNorthUpToFixedFrame

result

The object onto which to store the result.

See also