Plane

new Cesium.Plane(normal, distance)

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.
参数名称 类型 描述信息
normal Cartesian3 The plane's normal (normalized).
distance number 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.
Throws:
使用示例:
// The plane x=0
const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);

成员(属性)

static constant Cesium.Plane.ORIGIN_XY_PLANE : Plane

A constant initialized to the XY plane passing through the origin, with normal in positive Z.

static constant Cesium.Plane.ORIGIN_YZ_PLANE : Plane

A constant initialized to the YZ plane passing through the origin, with normal in positive X.

static constant Cesium.Plane.ORIGIN_ZX_PLANE : Plane

A constant initialized to the ZX plane passing through the origin, with normal in positive Y.

distance : number

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.
The plane's normal.

方法

static Cesium.Plane.clone(plane, result)Plane

Duplicates a Plane instance.
参数名称 类型 描述信息
plane Plane The plane to duplicate.
result Plane 可选 The object onto which to store the result.
返回值:
The modified result parameter or a new Plane instance if one was not provided.

static Cesium.Plane.equals(left, right)boolean

Compares the provided Planes by normal and distance and returns true if they are equal, false otherwise.
参数名称 类型 描述信息
left Plane The first plane.
right Plane The second plane.
返回值:
true if left and right are equal, false otherwise.

static Cesium.Plane.fromCartesian4(coefficients, result)Plane

Creates a plane from the general equation
参数名称 类型 描述信息
coefficients Cartesian4 The plane's normal (normalized).
result Plane 可选 The object onto which to store the result.
返回值:
A new plane instance or the modified result parameter.
Throws:

static Cesium.Plane.fromPointNormal(point, normal, result)Plane

Creates a plane from a normal and a point on the plane.
参数名称 类型 描述信息
point Cartesian3 The point on the plane.
normal Cartesian3 The plane's normal (normalized).
result Plane 可选 The object onto which to store the result.
返回值:
A new plane instance or the modified result parameter.
Throws:
使用示例:
const point = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
const normal = ellipsoid.geodeticSurfaceNormal(point);
const tangentPlane = Cesium.Plane.fromPointNormal(point, normal);

static Cesium.Plane.getPointDistance(plane, point)number

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.
参数名称 类型 描述信息
plane Plane The plane.
point Cartesian3 The point.
返回值:
The signed shortest distance of the point to the plane.

static Cesium.Plane.projectPointOntoPlane(plane, point, result)Cartesian3

Projects a point onto the plane.
参数名称 类型 描述信息
plane Plane The plane to project the point onto
point Cartesian3 The point to project onto the plane
result Cartesian3 可选 The result point. If undefined, a new Cartesian3 will be created.
返回值:
The modified result parameter or a new Cartesian3 instance if one was not provided.

static Cesium.Plane.transform(plane, transform, result)Plane

Transforms the plane by the given transformation matrix.
参数名称 类型 描述信息
plane Plane The plane.
transform Matrix4 The transformation matrix.
result Plane 可选 The object into which to store the result.
返回值:
The plane transformed by the given transformation matrix.