HeadingPitchRoll 是一个表示方向、俯仰和横滚角度的类,它用于在三维场景中定义物体的朝向。
HeadingPitchRoll(heading, pitch, roll)heading : {Number}, 从正北方向开始的方向(单位:弧度)pitch : {Number}, 水平面上向下的角度(单位:弧度)roll : {Number}, 沿着朝向轴旋转的角度(单位:弧度)heading : {Number}从正北方向开始的方向(单位:弧度)
pitch : {Number}水平面上向下的角度(单位:弧度)
roll : {Number}沿着朝向轴旋转的角度(单位:弧度)
clone(headingPitchRoll) : HeadingPitchRoll返回当前实例的拷贝
headingPitchRoll : {HeadingPitchRoll} 可选,用于存储结果的 HeadingPitchRoll 实例。如果提供该参数,则结果将存储在该实例中。equals(other) : Boolean比较两个 HeadingPitchRoll 实例是否相等。如果两个实例的 heading、pitch、roll 属性都相等,则返回 true。
other : {HeadingPitchRoll}要比较的另一个 HeadingPitchRoll 实例。
toString() : String返回一个字符串,表示该 HeadingPitchRoll 实例的属性值。
var hpRoll = new Cesium.HeadingPitchRoll(Math.PI, Cesium.Math.toRadians(-45), 0);
var hpRollCopy = hpRoll.clone();
console.log(hpRoll.equals(hpRollCopy)); //输出 true
console.log(hpRoll.toString()); //输出 "HeadingPitchRoll(3.141592653589793, -0.7853981633974483, 0)"