English中文

Plane

new Cesium.Plane(normal, distance)

Hessian 范式中的平面定义为 A plane in Hessian Normal Form defined by
ax + by + cz + d = 0
其中 (a, b, c) 是飞机的 where (a, b, c) is the plane's normal, d 是有符号的 , d is the signed distance 到平面,(x, y, z) 是平面上的任意点。 to the plane, and (x, y, z) is any point on the plane.
名称 Name 类型 Type 说明 Description
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:
示例: Example:
// The plane x=0
const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);

成员 Members

static constant Cesium.Plane.ORIGIN_XY_PLANE : Plane

初始化为穿过原点的 XY 平面的常量,法线为正 Z。 A constant initialized to the XY plane passing through the origin, with normal in positive Z.

static constant Cesium.Plane.ORIGIN_YZ_PLANE : Plane

一个常量,初始化为穿过原点的 YZ 平面,法线为正 X。 A constant initialized to the YZ plane passing through the origin, with normal in positive X.

static constant Cesium.Plane.ORIGIN_ZX_PLANE : Plane

一个常数,初始化为穿过原点的 ZX 平面,法线为正 Y。 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.

方法 Methods

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

Duplicates a Plane instance.
名称 Name 类型 Type 说明 Description
plane Plane 要复制的飞机。 The plane to duplicate.
result Plane 可选 optional 用于存储结果的对象。 The object onto which to store the result.
返回: Returns:
修改后的结果参数或新的 Plane 实例(如果未提供)。 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.
名称 Name 类型 Type 说明 Description
left Plane 第一架飞机。 The first plane.
right Plane 第二架飞机。 The second plane.
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.

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

根据一般方程创建一个平面 Creates a plane from the general equation
名称 Name 类型 Type 说明 Description
coefficients Cartesian4 飞机处于正常状态(标准化)。 The plane's normal (normalized).
result Plane 可选 optional 用于存储结果的对象。 The object onto which to store the result.
返回: Returns:
新的平面实例或修改后的结果参数。 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.
名称 Name 类型 Type 说明 Description
point Cartesian3 平面上的点。 The point on the plane.
normal Cartesian3 飞机处于正常状态(标准化)。 The plane's normal (normalized).
result Plane 可选 optional 用于存储结果的对象。 The object onto which to store the result.
返回: Returns:
新的平面实例或修改后的结果参数。 A new plane instance or the modified result parameter.
抛出: Throws:
示例: Example:
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.
名称 Name 类型 Type 说明 Description
plane Plane 飞机。 The plane.
point Cartesian3 重点是。 The point.
返回: Returns:
点到平面的有符号最短距离。 The signed shortest distance of the point to the plane.

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

将点投影到平面上。 Projects a point onto the plane.
名称 Name 类型 Type 说明 Description
plane Plane 将点投影到的平面 The plane to project the point onto
point Cartesian3 投影到平面上的点 The point to project onto the plane
result Cartesian3 可选 optional 结果点。如果未定义,将创建一个新的 Cartesian3。 The result point. If undefined, a new Cartesian3 will be created.
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 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.
名称 Name 类型 Type 说明 Description
plane Plane 飞机。 The plane.
transform Matrix4 变换矩阵。 The transformation matrix.
result Plane 可选 optional 用于存储结果的对象。 The object into which to store the result.
返回: Returns:
由给定变换矩阵变换的平面。 The plane transformed by the given transformation matrix.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.