All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.cesium.Polyline.kt Maven / Gradle / Ivy

The newest version!
// Automatically generated - do not modify!

@file:JsModule("cesium")

package cesium

/**
 * A renderable polyline. Create this by calling [PolylineCollection.add]
 * @see Online Documentation
 *
 * @constructor
 * @param [polylineCollection] The renderable polyline collection.
 * @see Online Documentation
 */
external class Polyline(
    options: ConstructorOptions,
    polylineCollection: PolylineCollection,
) {
    /**
     * @property [show] `true` if this polyline will be shown; otherwise, `false`.
     *   Default value - `true`
     * @property [width] The width of the polyline in pixels.
     *   Default value - `1.0`
     * @property [loop] Whether a line segment will be added between the last and first line positions to make this line a loop.
     *   Default value - `false`
     * @property [material] The material.
     *   Default value - [Material.ColorType]
     * @property [positions] The positions.
     * @property [id] The user-defined object to be returned when this polyline is picked.
     * @property [distanceDisplayCondition] The condition specifying at what distance from the camera that this polyline will be displayed.
     */
    interface ConstructorOptions {
        var show: Boolean?
        var width: Double?
        var loop: Boolean?
        var material: Material?
        var positions: Array?
        var id: Any?
        var distanceDisplayCondition: DistanceDisplayCondition?
    }

    /**
     * Determines if this polyline will be shown.  Use this to hide or show a polyline, instead
     * of removing it and re-adding it to the collection.
     * @see Online Documentation
     */
    var show: Boolean

    /**
     * Gets or sets the positions of the polyline.
     * ```
     * polyline.positions = Cartesian3.fromDegreesArray([
     *     0.0, 0.0,
     *     10.0, 0.0,
     *     0.0, 20.0
     * ]);
     * ```
     * @see Online Documentation
     */
    var positions: Array

    /**
     * Gets or sets the surface appearance of the polyline.  This can be one of several built-in [Material] objects or a custom material, scripted with
     * [Fabric](https://github.com/CesiumGS/cesium/wiki/Fabric).
     * @see Online Documentation
     */
    var material: Material

    /**
     * Gets or sets the width of the polyline.
     * @see Online Documentation
     */
    var width: Double

    /**
     * Gets or sets whether a line segment will be added between the first and last polyline positions.
     * @see Online Documentation
     */
    var loop: Boolean

    /**
     * Gets or sets the user-defined value returned when the polyline is picked.
     * @see Online Documentation
     */
    var id: Any

    /**
     * Gets or sets the condition specifying at what distance from the camera that this polyline will be displayed.
     * @see Online Documentation
     */
    var distanceDisplayCondition: DistanceDisplayCondition
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy