Appearance
KBE3D / KBCore / Cesium / DistanceDisplayCondition
类: DistanceDisplayCondition
Determines visibility based on the distance to the camera.
示例
ts
// 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);参数
The smallest distance in the interval where the object is visible.
参数
The largest distance in the interval where the object is visible.
属性
packedLength
staticpackedLength:number
The number of elements used to pack the object into an array.
near
near:
number
The smallest distance in the interval where the object is visible.
far
far:
number
The largest distance in the interval where the object is visible.
方法
pack()
staticpack(value:DistanceDisplayCondition,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
DistanceDisplayCondition
The value to pack.
array
number[]
The array to pack into.
startingIndex?
number
The index into the array at which to start packing the elements.
返回
number[]
The array that was packed into
unpack()
staticunpack(array:number[],startingIndex?:number,result?:DistanceDisplayCondition):DistanceDisplayCondition
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
DistanceDisplayCondition
The object into which to store the result.
返回
DistanceDisplayCondition
The modified result parameter or a new DistanceDisplayCondition instance if one was not provided.
equals()
staticequals(left?:DistanceDisplayCondition,right?:DistanceDisplayCondition):boolean
Determines if two distance display conditions are equal.
参数
left?
DistanceDisplayCondition
A distance display condition.
right?
DistanceDisplayCondition
Another distance display condition.
返回
boolean
Whether the two distance display conditions are equal.
clone()
staticclone(value?:DistanceDisplayCondition,result?:DistanceDisplayCondition):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.
返回
DistanceDisplayCondition
The duplicated instance.
clone()
clone(
result?:DistanceDisplayCondition):DistanceDisplayCondition
Duplicates this instance.
参数
result?
DistanceDisplayCondition
The result onto which to store the result.
返回
DistanceDisplayCondition
The duplicated instance.
equals()
equals(
other?:DistanceDisplayCondition):boolean
Determines if this distance display condition is equal to another.
参数
other?
DistanceDisplayCondition
Another distance display condition.
返回
boolean
Whether this distance display condition is equal to the other.
构造函数
构造函数
new DistanceDisplayCondition(
near?:number,far?:number):DistanceDisplayCondition
参数
near?
number
far?
number
返回
DistanceDisplayCondition
