Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Automatically generated - do not modify!
@file:Suppress(
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* A plane in Hessian Normal Form defined by
* ```
* ax + by + cz + d = 0
* ```
* where (a, b, c) is the plane's `normal`, d is the signed
* `distance` to the plane, and (x, y, z) is any point on
* the plane.
* ```
* // The plane x=0
* var plane = new Plane(Cartesian3.UNIT_X, 0.0);
* ```
* @see Online Documentation
*
* @constructor
* @property [normal] The plane's normal (normalized).
* @property [distance] The shortest distance from the origin to the plane. The sign of
* `distance` determines which side of the plane the origin
* is on. If `distance` is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
* @see Online Documentation
*/
@JsName("\$cesium__Plane")
external class Plane(
var normal: Cartesian3,
var distance: Double,
) {
companion object {
/**
* Creates a plane from a normal and a point on the plane.
* ```
* var point = Cartesian3.fromDegrees(-72.0, 40.0);
* var normal = ellipsoid.geodeticSurfaceNormal(point);
* var tangentPlane = Plane.fromPointNormal(point, normal);
* ```
* @param [point] The point on the plane.
* @param [normal] The plane's normal (normalized).
* @param [result] The object onto which to store the result.
* @return A new plane instance or the modified result parameter.
* @see Online Documentation
*/
fun fromPointNormal(
point: Cartesian3,
normal: Cartesian3,
result: Plane? = definedExternally,
): Plane
/**
* Creates a plane from the general equation
* @param [coefficients] The plane's normal (normalized).
* @param [result] The object onto which to store the result.
* @return A new plane instance or the modified result parameter.
* @see Online Documentation
*/
fun fromCartesian4(
coefficients: Cartesian4,
result: Plane? = definedExternally,
): Plane
/**
* Computes the signed shortest distance of a point to a plane.
* The sign of the distance determines which side of the plane the point
* is on. If the distance is positive, the point is in the half-space
* in the direction of the normal; if negative, the point is in the half-space
* opposite to the normal; if zero, the plane passes through the point.
* @param [plane] The plane.
* @param [point] The point.
* @return The signed shortest distance of the point to the plane.
* @see Online Documentation
*/
fun getPointDistance(
plane: Plane,
point: Cartesian3,
): Double
/**
* Projects a point onto the plane.
* @param [plane] The plane to project the point onto
* @param [point] The point to project onto the plane
* @param [result] The result point. If undefined, a new Cartesian3 will be created.
* @return The modified result parameter or a new Cartesian3 instance if one was not provided.
* @see Online Documentation
*/
fun projectPointOntoPlane(
plane: Plane,
point: Cartesian3,
result: Cartesian3? = definedExternally,
): Cartesian3
/**
* Transforms the plane by the given transformation matrix.
* @param [plane] The plane.
* @param [transform] The transformation matrix.
* @param [result] The object into which to store the result.
* @return The plane transformed by the given transformation matrix.
* @see Online Documentation
*/
fun transform(
plane: Plane,
transform: Matrix4,
result: Plane? = definedExternally,
): Plane
/**
* Duplicates a Plane instance.
* @param [plane] The plane to duplicate.
* @param [result] The object onto which to store the result.
* @return The modified result parameter or a new Plane instance if one was not provided.
* @see Online Documentation
*/
fun clone(
plane: Plane,
result: Plane? = definedExternally,
): Plane
/**
* Compares the provided Planes by normal and distance and returns
* `true` if they are equal, `false` otherwise.
* @param [left] The first plane.
* @param [right] The second plane.
* @return `true` if left and right are equal, `false` otherwise.
* @see Online Documentation
*/
fun equals(
left: Plane,
right: Plane,
): Boolean
/**
* A constant initialized to the XY plane passing through the origin, with normal in positive Z.
* @see Online Documentation
*/
val ORIGIN_XY_PLANE: Plane
/**
* A constant initialized to the YZ plane passing through the origin, with normal in positive X.
* @see Online Documentation
*/
val ORIGIN_YZ_PLANE: Plane
/**
* A constant initialized to the ZX plane passing through the origin, with normal in positive Y.
* @see Online Documentation
*/
val ORIGIN_ZX_PLANE: Plane
}
}