main.cesium.DistanceDisplayCondition.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
@file:Suppress(
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* Determines visibility based on the distance to the camera.
* ```
* // 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);
* ```
* @see Online Documentation
*
* @constructor
* @property [near] The smallest distance in the interval where the object is visible.
* Default value - `0.0`
* @property [far] The largest distance in the interval where the object is visible.
* Default value - [Number.MAX_VALUE]
* @see Online Documentation
*/
@JsName("\$cesium__DistanceDisplayCondition")
external class DistanceDisplayCondition(
var near: Double = definedExternally,
var far: Double = definedExternally,
) {
/**
* Duplicates this instance.
* @param [result] The result onto which to store the result.
* @return The duplicated instance.
* @see Online Documentation
*/
fun clone(result: DistanceDisplayCondition? = definedExternally): DistanceDisplayCondition
companion object : Packable {
/**
* The number of elements used to pack the object into an array.
* @see Online Documentation
*/
override val packedLength: Int
/**
* Stores the provided instance into the provided array.
* @param [value] The value to pack.
* @param [array] The array to pack into.
* @param [startingIndex] The index into the array at which to start packing the elements.
* Default value - `0`
* @return The array that was packed into
* @see Online Documentation
*/
override fun pack(
value: DistanceDisplayCondition,
array: Array,
startingIndex: Int?,
): Array
/**
* Retrieves an instance from a packed array.
* @param [array] The packed array.
* @param [startingIndex] The starting index of the element to be unpacked.
* Default value - `0`
* @param [result] The object into which to store the result.
* @return The modified result parameter or a new DistanceDisplayCondition instance if one was not provided.
* @see Online Documentation
*/
override fun unpack(
array: Array,
startingIndex: Int?,
result: DistanceDisplayCondition?,
): DistanceDisplayCondition
/**
* Determines if two distance display conditions are equal.
* @param [left] A distance display condition.
* @param [right] Another distance display condition.
* @return Whether the two distance display conditions are equal.
* @see Online Documentation
*/
fun equals(
left: DistanceDisplayCondition,
right: DistanceDisplayCondition,
): Boolean
/**
* Duplicates a distance display condition instance.
* @param [value] The distance display condition to duplicate.
* @param [result] The result onto which to store the result.
* @return The duplicated instance.
* @see Online Documentation
*/
fun clone(
value: DistanceDisplayCondition? = definedExternally,
result: DistanceDisplayCondition? = definedExternally,
): DistanceDisplayCondition
}
}