SampledPositionProperty

new Cesium.SampledPositionProperty(referenceFrame, numberOfDerivatives)

一个 SampledProperty,同时也是 PositionProperty
Name Type Default Description
referenceFrame ReferenceFrame ReferenceFrame.FIXED optional 定义位置的参考系。
numberOfDerivatives number 0 optional 每个位置伴随的导数数量;例如速度、加速度等。

Members

backwardExtrapolationDuration : number

获取或设置在属性变为undefined之前向后推断的时间量。值为0将永远推断。
Default Value: 0
获取或设置当在任何可用样本之前的时间请求值时执行的推断类型。
Default Value: ExtrapolationType.NONE
获取当此属性的定义更改时引发的事件。如果对 getValue 的调用对相同时间返回不同结果,则认为定义已更改。

forwardExtrapolationDuration : number

获取或设置在属性变为undefined之前向前推断的时间量。值为0将永远推断。
Default Value: 0
获取或设置当在任何可用样本之后的时间请求值时执行的推断类型。
Default Value: ExtrapolationType.NONE
获取检索值时使用的插值算法。调用 setInterpolationOptions 来设置此项。
Default Value: LinearApproximation

readonly interpolationDegree : number

获取检索值时执行的插值次数。调用 setInterpolationOptions 来设置此项。
Default Value: 1
获取一个值,指示此属性是否为常量。如果 getValue 对当前定义始终返回相同结果,则属性被视为常量。
此属性包含的导数数量;例如,0 表示仅位置,1 表示速度,等等。
Default Value: 0
获取定义位置的参考系。
Default Value: ReferenceFrame.FIXED;

Methods

addSample(time, position, derivatives)

添加新样本。
Name Type Description
time JulianDate 样本时间。
position Cartesian3 指定时间的position。
derivatives Array.<Cartesian3> optional 指定时间的导数值数组。

addSamples(times, positions, derivatives)

通过并行数组添加多个样本。
Name Type Description
times Array.<JulianDate> JulianDate 实例数组,每个索引是一个样本时间。
positions Array.<Cartesian3> Cartesian3 position 实例数组,每个值对应提供的时间索引。
derivatives Array.<Array> optional 一个数组,其中每个值是包含对应时间索引的导数的数组。
Throws:

addSamplesPackedArray(packedSamples, epoch)

以单个打包数组的形式添加样本,其中每个新样本表示为一个日期, 后跟相应值和导出的打包表示。
Name Type Description
packedSamples Array.<number> 打包样本数组。
epoch JulianDate optional 如果 packedSamples 中的任何日期是数字,则它们被视为从此纪元开始的偏移量(秒)。
将此属性与提供的属性进行比较,如果相等则返回 true,否则返回 false
Name Type Description
other Property optional 另一个属性。
Returns:
如果左右相等则返回 true,否则返回 false
获取指定时间的position。
Name Type Default Description
time JulianDate JulianDate.now() optional 用于检索值的时间。如果省略,则使用当前系统时间。
result Cartesian3 optional 用于存储值的对象,如果省略,则创建并返回新实例。
Returns:
修改后的结果参数,如果未提供结果参数,则返回新实例。

getValueInReferenceFrame(time, referenceFrame, result)Cartesian3|undefined

获取指定时间和指定参考系中的position。
Name Type Description
time JulianDate 用于检索值的时间。
referenceFrame ReferenceFrame 结果的所需参考系。
result Cartesian3 optional 用于存储值的对象,如果省略,则创建并返回新实例。
Returns:
修改后的结果参数,如果未提供结果参数,则返回新实例。
移除给定时间的样本(如果存在)。
Name Type Description
time JulianDate 样本时间。
Returns:
如果移除了time的样本则返回 true,否则返回 false
移除给定时间间隔内的所有样本。
Name Type Description
time TimeInterval 要移除所有样本的时间间隔。
设置插值position时使用的算法和次数。
Name Type Description
options object optional 包含以下属性的对象:
Name Type Description
interpolationAlgorithm InterpolationAlgorithm optional 新的插值算法。如果为undefined,则现有属性不变。
interpolationDegree number optional 新的插值次数。如果为undefined,则现有属性不变。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.