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 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
-
staticCesium.DistanceDisplayCondition.clone(value, result) → DistanceDisplayCondition
-
Duplicates a distance display condition instance.
Name Type Description valueDistanceDisplayCondition optional The distance display condition to duplicate. resultDistanceDisplayCondition optional The result onto which to store the result. Returns:
The duplicated instance. -
Determines if two distance display conditions are equal.
Name Type Description leftDistanceDisplayCondition A distance display condition. rightDistanceDisplayCondition 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 valueDistanceDisplayCondition The value to pack. arrayArray.<Number> The array to pack into. startingIndexNumber 0optional The index into the array at which to start packing the elements. Returns:
The array that was packed into -
staticCesium.DistanceDisplayCondition.unpack(array, startingIndex, result) → DistanceDisplayCondition
-
Retrieves an instance from a packed array.
Name Type Default Description arrayArray.<Number> The packed array. startingIndexNumber 0optional The starting index of the element to be unpacked. resultDistanceDisplayCondition optional The object into which to store the result. Returns:
The modified result parameter or a new DistanceDisplayCondition instance if one was not provided. -
clone(result) → DistanceDisplayCondition
-
Duplicates this instance.
Name Type Description resultDistanceDisplayCondition 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 otherDistanceDisplayCondition Another distance display condition. Returns:
Whether this distance display condition is equal to the other.
