DistanceDisplayCondition

new Cesium.DistanceDisplayCondition(near, far)

Determines visibility based on the distance to the camera.
参数名称 类型 默认值 描述信息
near number 0.0 可选 The smallest distance in the interval where the object is visible.
far number Number.MAX_VALUE 可选 The largest distance in the interval where the object is visible.
使用示例:
// 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);

成员(属性)

static Cesium.DistanceDisplayCondition.packedLength : number

The number of elements used to pack the object into an array.
The largest distance in the interval where the object is visible.
默认值: Number.MAX_VALUE
The smallest distance in the interval where the object is visible.
默认值: 0.0

方法

static Cesium.DistanceDisplayCondition.clone(value, result)DistanceDisplayCondition

Duplicates a distance display condition instance.
参数名称 类型 描述信息
value DistanceDisplayCondition 可选 The distance display condition to duplicate.
result DistanceDisplayCondition 可选 The result onto which to store the result.
返回值:
The duplicated instance.

static Cesium.DistanceDisplayCondition.equals(left, right)boolean

Determines if two distance display conditions are equal.
参数名称 类型 描述信息
left DistanceDisplayCondition A distance display condition.
right DistanceDisplayCondition Another distance display condition.
返回值:
Whether the two distance display conditions are equal.

static Cesium.DistanceDisplayCondition.pack(value, array, startingIndex)Array.<number>

Stores the provided instance into the provided array.
参数名称 类型 默认值 描述信息
value DistanceDisplayCondition The value to pack.
array Array.<number> The array to pack into.
startingIndex number 0 可选 The index into the array at which to start packing the elements.
返回值:
The array that was packed into

static Cesium.DistanceDisplayCondition.unpack(array, startingIndex, result)DistanceDisplayCondition

Retrieves an instance from a packed array.
参数名称 类型 默认值 描述信息
array Array.<number> The packed array.
startingIndex number 0 可选 The starting index of the element to be unpacked.
result DistanceDisplayCondition 可选 The object into which to store the result.
返回值:
The modified result parameter or a new DistanceDisplayCondition instance if one was not provided.
Duplicates this instance.
参数名称 类型 描述信息
result DistanceDisplayCondition 可选 The result onto which to store the result.
返回值:
The duplicated instance.
Determines if this distance display condition is equal to another.
参数名称 类型 描述信息
other DistanceDisplayCondition Another distance display condition.
返回值:
Whether this distance display condition is equal to the other.