A
Property 其评估结果为 which evaluates to a Cartesian3 基于所提供的速度的矢量 vector based on the velocity of the provided PositionProperty.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
position |
PositionProperty | 可选 optional 用于计算速度的位置属性。 The position property used to compute the velocity. | |
normalize |
boolean |
true
|
可选 optional 是否对计算的速度矢量进行归一化。 Whether to normalize the computed velocity vector. |
示例: Example:
//Create an entity with a billboard rotated to match its velocity.
const position = new Cesium.SampledProperty();
position.addSamples(...);
const entity = viewer.entities.add({
position : position,
billboard : {
image : 'image.png',
alignedAxis : new Cesium.VelocityVectorProperty(position, true) // alignedAxis must be a unit vector
}
}));
成员 Members
readonly definitionChanged : Event
获取每当此属性的定义更改时引发的事件。 Gets the event that is raised whenever the definition of this property changes.
获取一个值,该值指示该属性是否为常量。 Gets a value indicating if this property is constant.
获取或设置是否对该属性生成的向量进行归一化。 Gets or sets whether the vector produced by this property will be normalized or not.
position : Property|undefined
获取或设置用于计算速度矢量的位置属性。 Gets or sets the position property used to compute the velocity vector.
方法 Methods
将此属性与提供的属性进行比较并返回 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.
getValue(time, result) → Cartesian3
获取指定时间的属性值。 Gets the value of the property 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.
