new Quaternion(xopt, yopt, zopt, wopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
Number |
<optional> |
0 | x分量 |
y |
Number |
<optional> |
0 | y分量 |
z |
Number |
<optional> |
0 | z分量 |
w |
Number |
<optional> |
0 | w分量 |
Methods
-
static fromAxisAngle(axis, angle, resultopt)
-
计算绕给定轴旋转给定角度的四元数
Parameters:
Name Type Attributes Description axis
Cartesian3 angle
Number 角度,弧度制
result
Quaternion <optional>
预存结果的四元数
-
static headingPitchRollToEastNorthUpQuaternion(position, heading, pitch, roll, result) → {Quaternion}
-
计算世界坐标系下的旋转四元数
Parameters:
Name Type Default Description position
Cartesian3 世界坐标系下的模型原点位置
heading
Number 0 朝向角,弧度制
pitch
Number 0 俯仰角,弧度制
roll
Number 0 旋转角,弧度制
result
Quaternion 预存结果的四元数对象
Returns:
Quaternion