Skip to content

KBE3D / KBCore / Cesium / Transforms / headingPitchRollToFixedFrame

函数: headingPitchRollToFixedFrame()

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

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.

参数

origin

Cartesian3

The center point of the local reference frame.

headingPitchRoll

HeadingPitchRoll

The heading, pitch, and roll.

ellipsoid?

Ellipsoid

The ellipsoid whose fixed frame is used in the transformation.

fixedFrameTransform?

LocalFrameToFixedFrame

A 4x4 transformation matrix from a reference frame to the provided ellipsoid's fixed reference frame

result?

Matrix4

The object onto which to store the result.

返回

Matrix4

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

示例

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

KBE3D @3.0.0 Copyright © 2024-present KBE3D