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

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

There is a newer version: 1.90.0-10
Show newest version
// Automatically generated - do not modify!

@file:Suppress(
    "NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE",
)

package cesium

/**
 * A description of a wall outline. A wall is defined by a series of points,
 * which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
 * ```
 * // create a wall outline that spans from ground level to 10000 meters
 * var wall = new WallOutlineGeometry({
 *   positions : Cartesian3.fromDegreesArrayHeights([
 *     19.0, 47.0, 10000.0,
 *     19.0, 48.0, 10000.0,
 *     20.0, 48.0, 10000.0,
 *     20.0, 47.0, 10000.0,
 *     19.0, 47.0, 10000.0
 *   ])
 * });
 * var geometry = WallOutlineGeometry.createGeometry(wall);
 * ```
 * @see Online Documentation
 */
@JsName("\$cesium__WallOutlineGeometry")
external class WallOutlineGeometry(options: ConstructorOptions) {
    /**
     * @property [positions] An array of Cartesian objects, which are the points of the wall.
     * @property [granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
     *   Default value - [Math.RADIANS_PER_DEGREE]
     * @property [maximumHeights] An array parallel to `positions` that give the maximum height of the
     *   wall at `positions`. If undefined, the height of each position in used.
     * @property [minimumHeights] An array parallel to `positions` that give the minimum height of the
     *   wall at `positions`. If undefined, the height at each position is 0.0.
     * @property [ellipsoid] The ellipsoid for coordinate manipulation
     *   Default value - [Ellipsoid.WGS84]
     */
    interface ConstructorOptions {
        var positions: Array
        var granularity: Double?
        var maximumHeights: Array?
        var minimumHeights: Array?
        var ellipsoid: Ellipsoid?
    }

    /**
     * The number of elements used to pack the object into an array.
     * @see Online Documentation
     */
    val packedLength: Int

    companion object {
        /**
         * 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
         */
        fun pack(
            value: WallOutlineGeometry,
            array: Array,
            startingIndex: Int? = definedExternally,
        ): 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 WallOutlineGeometry instance if one was not provided.
         * @see Online Documentation
         */
        fun unpack(
            array: Array,
            startingIndex: Int? = definedExternally,
            result: WallOutlineGeometry? = definedExternally,
        ): WallOutlineGeometry

        /**
         * A description of a walloutline. A wall is defined by a series of points,
         * which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
         * ```
         * // create a wall that spans from 10000 meters to 20000 meters
         * var wall = WallOutlineGeometry.fromConstantHeights({
         *   positions : Cartesian3.fromDegreesArray([
         *     19.0, 47.0,
         *     19.0, 48.0,
         *     20.0, 48.0,
         *     20.0, 47.0,
         *     19.0, 47.0,
         *   ]),
         *   minimumHeight : 20000.0,
         *   maximumHeight : 10000.0
         * });
         * var geometry = WallOutlineGeometry.createGeometry(wall);
         * ```
         * @see Online Documentation
         */
        fun fromConstantHeights(options: FromConstantHeightsOptions): WallOutlineGeometry

        /**
         * @property [positions] An array of Cartesian objects, which are the points of the wall.
         * @property [maximumHeight] A constant that defines the maximum height of the
         *   wall at `positions`. If undefined, the height of each position in used.
         * @property [minimumHeight] A constant that defines the minimum height of the
         *   wall at `positions`. If undefined, the height at each position is 0.0.
         * @property [ellipsoid] The ellipsoid for coordinate manipulation
         *   Default value - [Ellipsoid.WGS84]
         */
        interface FromConstantHeightsOptions {
            var positions: Array
            var maximumHeight: Double?
            var minimumHeight: Double?
            var ellipsoid: Ellipsoid?
        }

        /**
         * Computes the geometric representation of a wall outline, including its vertices, indices, and a bounding sphere.
         * @param [wallGeometry] A description of the wall outline.
         * @return The computed vertices and indices.
         * @see Online Documentation
         */
        fun createGeometry(wallGeometry: WallOutlineGeometry): Geometry?
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy