根据与摄像机的距离确定可见性。 Determines visibility based on the distance to the camera.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
near |
number |
0.0
|
可选 optional 物体可见区间内的最小距离。 The smallest distance in the interval where the object is visible. |
far |
number |
Number.MAX_VALUE
|
可选 optional 物体可见区间内的最大距离。 The largest distance in the interval where the object is visible. |
示例: Example:
// Make a billboard that is only visible when the distance to the camera is between 10 and 20 meters.
billboard.distanceDisplayCondition = new Cesium.DistanceDisplayCondition(10.0, 20.0);
成员 Members
用于将对象打包到数组中的元素数量。 The number of elements used to pack the object into an array.
物体可见区间内的最大距离。 The largest distance in the interval where the object is visible.
-
默认值: Default Value:
Number.MAX_VALUE
物体可见区间内的最小距离。 The smallest distance in the interval where the object is visible.
-
默认值: Default Value:
0.0
方法 Methods
static Cesium.DistanceDisplayCondition.clone(value, result) → DistanceDisplayCondition
复制距离显示条件实例。 Duplicates a distance display condition instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
value |
DistanceDisplayCondition | 可选 optional 要复制的距离显示条件。 The distance display condition to duplicate. |
result |
DistanceDisplayCondition | 可选 optional 用于存储结果的结果。 The result onto which to store the result. |
返回: Returns:
重复的实例。 The duplicated instance.
确定两个距离显示条件是否相等。 Determines if two distance display conditions are equal.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
DistanceDisplayCondition | 可选 optional 距离显示条件。 A distance display condition. |
right |
DistanceDisplayCondition | 可选 optional 另一种距离显示条件。 Another distance display condition. |
返回: Returns:
两个距离显示条件是否相等。 Whether the two distance display conditions are equal.
将提供的实例存储到提供的数组中。 Stores the provided instance into the provided array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
value |
DistanceDisplayCondition | 包装的价值。 The value to pack. | |
array |
Array.<number> | 要打包到的数组。 The array to pack into. | |
startingIndex |
number |
0
|
可选 optional 开始打包元素的数组索引。 The index into the array at which to start packing the elements. |
返回: Returns:
被打包成的数组 The array that was packed into
static Cesium.DistanceDisplayCondition.unpack(array, startingIndex, result) → DistanceDisplayCondition
从打包数组中检索实例。 Retrieves an instance from a packed array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
array |
Array.<number> | 打包的数组。 The packed array. | |
startingIndex |
number |
0
|
可选 optional 要解包的元素的起始索引。 The starting index of the element to be unpacked. |
result |
DistanceDisplayCondition | 可选 optional 用于存储结果的对象。 The object into which to store the result. |
返回: Returns:
修改后的结果参数或新的 DistanceDisplayCondition 实例(如果未提供)。 The modified result parameter or a new DistanceDisplayCondition instance if one was not provided.
复制此实例。 Duplicates this instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
DistanceDisplayCondition | 可选 optional 用于存储结果的结果。 The result onto which to store the result. |
返回: Returns:
重复的实例。 The duplicated instance.
确定此距离显示条件是否等于另一个。 Determines if this distance display condition is equal to another.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
other |
DistanceDisplayCondition | 可选 optional 另一种距离显示条件。 Another distance display condition. |
返回: Returns:
此距离显示条件是否与其他距离显示条件相同。 Whether this distance display condition is equal to the other.
