黑森法线形式的平面,由
ax + by + cz + d = 0其中(a,b,c)是飞机的
normal
,d是有符号的
distance
到平面,(x,y,z)是
飞机。Name | Type | Description |
---|---|---|
normal |
Cartesian3 | 平面的法线(规格化)。 |
distance |
Number | 从原点到飞机最短的distance 。标志
distance 确定原点位于平面的哪一侧
开启。如果距离为正,则原点位于半空间中
在法线方向;如果为负,原点在半空间中
与法线相反;如果为零,则平面穿过原点。 |
Throws:
-
DeveloperError :Normal必须规范化
Example:
// The plane x=0
var plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);
Members
static constant Cesium.Plane.ORIGIN_XY_PLANE : Plane
初始化为穿过原点的XY平面的常数,法线为正Z。
static constant Cesium.Plane.ORIGIN_YZ_PLANE : Plane
初始化为穿过原点的YZ平面的常数,法线为正X。
static constant Cesium.Plane.ORIGIN_ZX_PLANE : Plane
初始化为穿过原点的ZX平面的常数,法线为正Y。
从原点到飞机最短的
distance
。标志
distance
确定原点位于平面的哪一侧
开启。如果距离为正,则原点位于半空间中
在法线方向;如果为负,原点在半空间中
与法线相反;如果为零,则平面穿过原点。normal : Cartesian3
飞机正常。
Methods
static Cesium.Plane.clone(plane, result) → Plane
复制平面实例。
Name | Type | Description |
---|---|---|
plane |
Plane | 要复制的飞机。 |
result |
Plane | optional 要将结果存储到的对象。 |
Returns:
如果未提供修改的结果参数或新平面实例。
按法线和距离比较提供的平面,然后返回
如果相等,则为
true
,否则为false
。Name | Type | Description |
---|---|---|
left |
Plane | 第一架飞机。 |
right |
Plane | 第二架飞机。 |
Returns:
如果左右相等,则为
true
,否则为false
。static Cesium.Plane.fromCartesian4(coefficients, result) → Plane
从常规表达式创建平面
Name | Type | Description |
---|---|---|
coefficients |
Cartesian4 | 平面的法线(规格化)。 |
result |
Plane | optional 要将结果存储到的对象。 |
Returns:
新平面实例或修改后的结果参数。
Throws:
-
DeveloperError :Normal必须规范化
static Cesium.Plane.fromPointNormal(point, normal, result) → Plane
从法线和平面上的点创建平面。
Name | Type | Description |
---|---|---|
point |
Cartesian3 | 飞机上的点。 |
normal |
Cartesian3 | 平面的法线(规格化)。 |
result |
Plane | optional 要将结果存储到的对象。 |
Returns:
新平面实例或修改后的结果参数。
Throws:
-
DeveloperError :Normal必须规范化
Example:
var point = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
var normal = ellipsoid.geodeticSurfaceNormal(point);
var tangentPlane = Cesium.Plane.fromPointNormal(point, normal);
计算点到平面的有符号最短距离。
距离的符号决定了该点位于平面的哪一侧
开启。如果距离为正,则点位于半空间中
在法线方向;如果为负,则点位于半空间中
与法线相反;如果为零,则平面通过该点。
Name | Type | Description |
---|---|---|
plane |
Plane | 飞机。 |
point |
Cartesian3 | 重点。 |
Returns:
点到平面的有符号最短距离。
static Cesium.Plane.projectPointOntoPlane(plane, point, result) → Cartesian3
将点投影到平面上。
Name | Type | Description |
---|---|---|
plane |
Plane | 要将点投影到的平面 |
point |
Cartesian3 | 投影到平面上的点 |
result |
Cartesian3 | optional 结果点。如果未定义,将创建一个新的Cartesian3。 |
Returns:
修改后的result参数或新的Cartesian3实例(如果未提供实例)。
static Cesium.Plane.transform(plane, transform, result) → Plane
根据给定的变换矩阵变换平面。
Name | Type | Description |
---|---|---|
plane |
Plane | 飞机。 |
transform |
Matrix4 | 变换矩阵。 |
result |
Plane | optional 要将结果存储到其中的对象。 |
Returns:
由给定变换矩阵变换的平面。