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

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

// Automatically generated - do not modify!

@file:Suppress(
    "EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)

package cesium

/**
 * A plane tangent to the provided ellipsoid at the provided origin.
 * If origin is not on the surface of the ellipsoid, it's surface projection will be used.
 * If origin is at the center of the ellipsoid, an exception will be thrown.
 * @see Online Documentation
 *
 * @constructor
 * @property [origin] The point on the surface of the ellipsoid where the tangent plane touches.
 * @property [ellipsoid] The ellipsoid to use.
 *   Default value - [Ellipsoid.WGS84]
 * @see Online Documentation
 */
@JsName("\$cesium__EllipsoidTangentPlane")
external class EllipsoidTangentPlane(
    var origin: Cartesian3,
    var ellipsoid: Ellipsoid = definedExternally,
) {
    /**
     * Gets the plane which is tangent to the ellipsoid.
     * @see Online Documentation
     */
    val plane: Plane

    /**
     * Gets the local X-axis (east) of the tangent plane.
     * @see Online Documentation
     */
    val xAxis: Cartesian3

    /**
     * Gets the local Y-axis (north) of the tangent plane.
     * @see Online Documentation
     */
    val yAxis: Cartesian3

    /**
     * Gets the local Z-axis (up) of the tangent plane.
     * @see Online Documentation
     */
    val zAxis: Cartesian3

    /**
     * Computes the projection of the provided 3D position onto the 2D plane, radially outward from the [EllipsoidTangentPlane.ellipsoid] coordinate system origin.
     * @param [cartesian] The point to project.
     * @param [result] The object onto which to store the result.
     * @return The modified result parameter or a new Cartesian2 instance if none was provided. Undefined if there is no intersection point
     * @see Online Documentation
     */
    fun projectPointOntoPlane(
        cartesian: Cartesian3,
        result: Cartesian2? = definedExternally,
    ): Cartesian2

    /**
     * Computes the projection of the provided 3D positions onto the 2D plane (where possible), radially outward from the global origin.
     * The resulting array may be shorter than the input array - if a single projection is impossible it will not be included.
     * @param [cartesians] The array of points to project.
     * @param [result] The array of Cartesian2 instances onto which to store results.
     * @return The modified result parameter or a new array of Cartesian2 instances if none was provided.
     * @see Online Documentation
     */
    fun projectPointsOntoPlane(
        cartesians: Array,
        result: Array? = definedExternally,
    ): Array

    /**
     * Computes the projection of the provided 3D position onto the 2D plane, along the plane normal.
     * @param [cartesian] The point to project.
     * @param [result] The object onto which to store the result.
     * @return The modified result parameter or a new Cartesian2 instance if none was provided.
     * @see Online Documentation
     */
    fun projectPointToNearestOnPlane(
        cartesian: Cartesian3,
        result: Cartesian2? = definedExternally,
    ): Cartesian2

    /**
     * Computes the projection of the provided 3D positions onto the 2D plane, along the plane normal.
     * @param [cartesians] The array of points to project.
     * @param [result] The array of Cartesian2 instances onto which to store results.
     * @return The modified result parameter or a new array of Cartesian2 instances if none was provided. This will have the same length as `cartesians`.
     * @see Online Documentation
     */
    fun projectPointsToNearestOnPlane(
        cartesians: Array,
        result: Array? = definedExternally,
    ): Array

    /**
     * Computes the projection of the provided 2D position onto the 3D ellipsoid.
     * @param [cartesian] The points to project.
     * @param [result] The Cartesian3 instance to store result.
     * @return The modified result parameter or a new Cartesian3 instance if none was provided.
     * @see Online Documentation
     */
    fun projectPointOntoEllipsoid(
        cartesian: Cartesian2,
        result: Cartesian3? = definedExternally,
    ): Cartesian3

    /**
     * Computes the projection of the provided 2D positions onto the 3D ellipsoid.
     * @param [cartesians] The array of points to project.
     * @param [result] The array of Cartesian3 instances onto which to store results.
     * @return The modified result parameter or a new array of Cartesian3 instances if none was provided.
     * @see Online Documentation
     */
    fun projectPointsOntoEllipsoid(
        cartesians: Array,
        result: Array? = definedExternally,
    ): Array

    companion object {
        /**
         * Creates a new instance from the provided ellipsoid and the center
         * point of the provided Cartesians.
         * @param [cartesians] The list of positions surrounding the center point.
         * @param [ellipsoid] The ellipsoid to use.
         *   Default value - [Ellipsoid.WGS84]
         * @return The new instance of EllipsoidTangentPlane.
         * @see Online Documentation
         */
        fun fromPoints(
            cartesians: Array,
            ellipsoid: Ellipsoid? = definedExternally,
        ): EllipsoidTangentPlane
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy