Skip to content

KBE3D / KBCore / Cesium / HeadingPitchRoll

类: HeadingPitchRoll

A rotation expressed as a heading, pitch, and roll. Heading is the rotation about the negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about the positive x axis.

参数

The heading component in radians.

参数

The pitch component in radians.

参数

The roll component in radians.

属性

heading

heading: number

Gets or sets the heading.


pitch

pitch: number

Gets or sets the pitch.


roll

roll: number

Gets or sets the roll.

方法

fromQuaternion()

static fromQuaternion(quaternion: Quaternion, result?: HeadingPitchRoll): HeadingPitchRoll

Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

)

参数

quaternion

Quaternion

The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.

result?

HeadingPitchRoll

The object in which to store the result. If not provided, a new instance is created and returned.

返回

HeadingPitchRoll

The modified result parameter or a new HeadingPitchRoll instance if one was not provided.


fromDegrees()

static fromDegrees(heading: number, pitch: number, roll: number, result?: HeadingPitchRoll): HeadingPitchRoll

Returns a new HeadingPitchRoll instance from angles given in degrees.

参数

heading

number

the heading in degrees

pitch

number

the pitch in degrees

roll

number

the heading in degrees

result?

HeadingPitchRoll

The object in which to store the result. If not provided, a new instance is created and returned.

返回

HeadingPitchRoll

A new HeadingPitchRoll instance


clone()

static clone(headingPitchRoll: HeadingPitchRoll, result?: HeadingPitchRoll): HeadingPitchRoll

Duplicates a HeadingPitchRoll instance.

参数

headingPitchRoll

HeadingPitchRoll

The HeadingPitchRoll to duplicate.

result?

HeadingPitchRoll

The object onto which to store the result.

返回

HeadingPitchRoll

The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)


equals()

static equals(left?: HeadingPitchRoll, right?: HeadingPitchRoll): boolean

Compares the provided HeadingPitchRolls componentwise and returns <code>true</code> if they are equal, <code>false</code> otherwise.

参数

left?

HeadingPitchRoll

The first HeadingPitchRoll.

HeadingPitchRoll

The second HeadingPitchRoll.

返回

boolean

true if left and right are equal, false otherwise.


equalsEpsilon()

static equalsEpsilon(left?: HeadingPitchRoll, right?: HeadingPitchRoll, relativeEpsilon?: number, absoluteEpsilon?: number): boolean

Compares the provided HeadingPitchRolls componentwise and returns <code>true</code> if they pass an absolute or relative tolerance test, <code>false</code> otherwise.

参数

left?

HeadingPitchRoll

The first HeadingPitchRoll.

right?

HeadingPitchRoll

The second HeadingPitchRoll.

relativeEpsilon?

number

The relative epsilon tolerance to use for equality testing.

absoluteEpsilon?

number

The absolute epsilon tolerance to use for equality testing.

返回

boolean

true if left and right are within the provided epsilon, false otherwise.


clone()

clone(result?: HeadingPitchRoll): HeadingPitchRoll

Duplicates this HeadingPitchRoll instance.

参数

result?

HeadingPitchRoll

The object onto which to store the result.

返回

HeadingPitchRoll

The modified result parameter or a new HeadingPitchRoll instance if one was not provided.


equals()

equals(right?: HeadingPitchRoll): boolean

Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns <code>true</code> if they are equal, <code>false</code> otherwise.

参数

right?

HeadingPitchRoll

The right hand side HeadingPitchRoll.

返回

boolean

true if they are equal, false otherwise.


equalsEpsilon()

equalsEpsilon(right?: HeadingPitchRoll, relativeEpsilon?: number, absoluteEpsilon?: number): boolean

Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns <code>true</code> if they pass an absolute or relative tolerance test, <code>false</code> otherwise.

参数

right?

HeadingPitchRoll

The right hand side HeadingPitchRoll.

relativeEpsilon?

number

The relative epsilon tolerance to use for equality testing.

absoluteEpsilon?

number

The absolute epsilon tolerance to use for equality testing.

返回

boolean

true if they are within the provided epsilon, false otherwise.


toString()

toString(): string

Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.

返回

string

A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.

构造函数

构造函数

new HeadingPitchRoll(heading?: number, pitch?: number, roll?: number): HeadingPitchRoll

参数

heading?

number

pitch?

number

roll?

number

返回

HeadingPitchRoll

KBE3D @3.0.0 Copyright © 2024-present KBE3D