English中文

SampledPositionProperty

new Cesium.SampledPositionProperty(referenceFrame, numberOfDerivatives)

A SampledProperty 这也是一个 which is also a PositionProperty.
名称 Name 类型 Type 默认值 Default 说明 Description
referenceFrame ReferenceFrame ReferenceFrame.FIXED 可选 optional 定义位置的参考系。 The reference frame in which the position is defined.
numberOfDerivatives number 0 可选 optional 每个仓位对应的衍生品数量;即速度、加速度等... The number of derivatives that accompany each position; i.e. velocity, acceleration, etc...

成员 Members

backwardExtrapolationDuration : number

获取或设置属性变为未定义之前向后推断的时间量。值为 0 将永远进行推断。 Gets or sets the amount of time to extrapolate backward before the property becomes undefined. A value of 0 will extrapolate forever.
默认值: Default Value: 0
获取或设置在任何可用样本之前每次请求值时要执行的外推类型。 Gets or sets the type of extrapolation to perform when a value is requested at a time before any available samples.
默认值: Default Value: ExtrapolationType.NONE
获取每当此属性的定义更改时引发的事件。如果对 getValue 的调用同时返回不同的结果,则认为定义已更改。 Gets the event that is raised whenever the definition of this property changes. The definition is considered to have changed if a call to getValue would return a different result for the same time.

forwardExtrapolationDuration : number

获取或设置属性变为未定义之前向前推断的时间量。值为 0 将永远进行推断。 Gets or sets the amount of time to extrapolate forward before the property becomes undefined. A value of 0 will extrapolate forever.
默认值: Default Value: 0
获取或设置在任何可用样本之后每次请求值时要执行的外推类型。 Gets or sets the type of extrapolation to perform when a value is requested at a time after any available samples.
默认值: Default Value: ExtrapolationType.NONE
获取检索值时要使用的插值算法。致电 Gets the interpolation algorithm to use when retrieving a value. Call setInterpolationOptions 来设置这个。 to set this.
默认值: Default Value: LinearApproximation

readonly interpolationDegree : number

获取检索值时要执行的插值程度。致电 Gets the degree of interpolation to perform when retrieving a value. Call setInterpolationOptions 来设置这个。 to set this.
默认值: Default Value: 1
获取一个值,该值指示该属性是否为常量。如果 getValue 始终为当前定义返回相同的结果,则属性被视为常量。 Gets a value indicating if this property is constant. A property is considered constant if getValue always returns the same result for the current definition.
该属性包含的衍生品数量;即 0 表示位置,1 表示速度等。 The number of derivatives contained by this property; i.e. 0 for just position, 1 for velocity, etc.
默认值: Default Value: 0
获取定义位置的参考系。 Gets the reference frame in which the position is defined.
默认值: Default Value: ReferenceFrame.FIXED;

方法 Methods

addSample(time, position, derivatives)

添加新样本。 Adds a new sample.
名称 Name 类型 Type 说明 Description
time JulianDate 采样时间。 The sample time.
position Cartesian3 指定时间的位置。 The position at the provided time.
derivatives Array.<Cartesian3> 可选 optional 给定时间的导数值数组。 The array of derivative values at the provided time.

addSamples(times, positions, derivatives)

通过并行阵列添加多个样本。 Adds multiple samples via parallel arrays.
名称 Name 类型 Type 说明 Description
times Array.<JulianDate> JulianDate 实例的数组,其中每个索引都是采样时间。 An array of JulianDate instances where each index is a sample time.
positions Array.<Cartesian3> Cartesian3 位置实例的数组,其中每个值对应于提供的时间索引。 An array of Cartesian3 position instances, where each value corresponds to the provided time index.
derivatives Array.<Array> 可选 optional 一个数组,其中每个值都是另一个包含相应时间索引的导数的数组。 An array where each value is another array containing derivatives for the corresponding time index.
抛出: Throws:
  • DeveloperError :所有数组的长度必须相同。 : All arrays must be the same length.

addSamplesPackedArray(packedSamples, epoch)

将样本添加为单个打包数组,其中每个新样本都表示为日期,后跟相应值和导数的打包表示形式。 Adds samples as a single packed array where each new sample is represented as a date, followed by the packed representation of the corresponding value and derivatives.
名称 Name 类型 Type 说明 Description
packedSamples Array.<number> 包装样本的数组。 The array of packed samples.
epoch JulianDate 可选 optional 如果 PackedSamples 中的任何日期是数字,则它们被视为距该纪元的偏移量(以秒为单位)。 If any of the dates in packedSamples are numbers, they are considered an offset from this epoch, in seconds.
将此属性与提供的属性进行比较并返回 Compares this property to the provided property and returns true 如果它们相等, if they are equal, false otherwise.
名称 Name 类型 Type 说明 Description
other Property 可选 optional 其他财产。 The other property.
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
获取指定时间的位置。 Gets the position at the provided time.
名称 Name 类型 Type 默认值 Default 说明 Description
time JulianDate JulianDate.now() 可选 optional 检索值的时间。如果省略,则使用当前系统时间。 The time for which to retrieve the value. If omitted, the current system time is used.
result Cartesian3 可选 optional 用于存储值的对象,如果省略,则会创建并返回一个新实例。 The object to store the value into, if omitted, a new instance is created and returned.
返回: Returns:
修改后的结果参数或新实例(如果未提供结果参数)。 The modified result parameter or a new instance if the result parameter was not supplied.

getValueInReferenceFrame(time, referenceFrame, result)Cartesian3|undefined

获取在提供的时间和在提供的参考系中的位置。 Gets the position at the provided time and in the provided reference frame.
名称 Name 类型 Type 说明 Description
time JulianDate 检索值的时间。 The time for which to retrieve the value.
referenceFrame ReferenceFrame 结果所需的参考框架。 The desired referenceFrame of the result.
result Cartesian3 可选 optional 用于存储值的对象,如果省略,则会创建并返回一个新实例。 The object to store the value into, if omitted, a new instance is created and returned.
返回: Returns:
修改后的结果参数或新实例(如果未提供结果参数)。 The modified result parameter or a new instance if the result parameter was not supplied.
在给定时间移除样本(如果存在)。 Removes a sample at the given time, if present.
名称 Name 类型 Type 说明 Description
time JulianDate 采样时间。 The sample time.
返回: Returns:
true 如果当时移除了一个样本, if a sample at time was removed, false otherwise.
删除给定时间间隔内的所有样本。 Removes all samples for the given time interval.
名称 Name 类型 Type 说明 Description
time TimeInterval 删除所有样本的时间间隔。 The time interval for which to remove all samples.
设置插值位置时使用的算法和度数。 Sets the algorithm and degree to use when interpolating a position.
名称 Name 类型 Type 说明 Description
options object 可选 optional 具有以下属性的对象: Object with the following properties:
名称 Name 类型 Type 说明 Description
interpolationAlgorithm InterpolationAlgorithm 可选 optional 新的插值算法。如果未定义,现有属性将保持不变。 The new interpolation algorithm. If undefined, the existing property will be unchanged.
interpolationDegree number 可选 optional 新的插值度数。如果未定义,现有属性将保持不变。 The new interpolation degree. If undefined, the existing property will be unchanged.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.