[go: up one dir, main page]

tzbm123456 发表于 2022-6-23 09:56:36

Plane类说明

<Plane类说明>
2022年6月23日

tzbm123456 发表于 2022-6-23 10:01:00

本帖最后由 tzbm123456 于 2022-6-23 22:31 编辑

new Cesium.Plane(normal, distance)Core/Plane.js 34

A plane in Hessian Normal Form defined byax + by + cz + d = 0where (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.

参数名称类型描述信息
normalCartesian3The plane's normal (normalized).
distanceNumberThe 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:
[*]DeveloperError : Normal must be normalized
使用示例:// The plane x=0const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);
成员(属性)static constant Cesium.Plane.ORIGIN_XY_PLANE : PlaneCore/Plane.js 295

A constant initialized to the XY plane passing through the origin, with normal in positive Z.
static constant Cesium.Plane.ORIGIN_YZ_PLANE : PlaneCore/Plane.js 303

A constant initialized to the YZ plane passing through the origin, with normal in positive X.
static constant Cesium.Plane.ORIGIN_ZX_PLANE : PlaneCore/Plane.js 311

A constant initialized to the ZX plane passing through the origin, with normal in positive Y.
distance : NumberCore/Plane.js 65

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.
normal : Cartesian3Core/Plane.js 54

The plane's normal.

tzbm123456 发表于 2022-7-12 08:28:32

本帖最后由 tzbm123456 于 2022-7-12 08:40 编辑

<ClippingPlaneCollection类>2022年7月12日
案例:
clippingPlanes = new Cesium.ClippingPlaneCollection({
    planes: [
      new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 0.0, -0.1), 0.0)
    ],
    unionClippingRegions: true,
    edgeColor: Cesium.Color.RED,
    edgeWidth: 1
})
注释:

1、ClippingPlaneCollection
    指定一组剪裁平面 。
   通常,剪裁平面的坐标是相对于它们所附着的对象,因此距离设置为0的平面将剪切穿过对象的中心。
   平面的法向,如果法线向下,以平面为界限,相反方向都是外部,如图所示:

2、平面法向所在坐标系是以正东方为x轴正方向,正北方为y轴正方向,正上面为z轴正方向的坐标系
3、参数
    (1)planes      用于在每个平面的外部选择性地禁用渲染的对象数组
    (2)edgeColor      应用的颜色用于突出显示剪切对象的边缘,就是测试阶段能让你看到剪切的位置
    (3)edgeWidth      应用于剪裁对象的边缘的高光的宽度(以像素为单位)
    (4)unionClippingRegions      如果为true,则所有平面外部(法向的反方向)都被剪切。否则,只有区域位于每个平面的外侧,才会剪切区域,就是所谓切片的交集



tzbm123456 发表于 2022-7-12 08:30:43

本帖最后由 tzbm123456 于 2022-7-12 09:03 编辑

<ClippingPlane类>2022年7月12日    1、创建一个裁切平面,设置平面的法线方向和从原点到平面的最短距离,裁切平面会经过原点,
    2、如果距离为正,则原点在法向的方向上;如果距离为负,则原点在法向反方向上;
    3、如果距离为零,原点在模型的正中心,如下图所示。

    4、剪切外部,保留法向区域实体

类说明:
>new Cesium.ClippingPlane(normal, distance)
(1)normal      Cartesian3      The plane's normal (归一化).
(2)distance      Number      The shortest distance from the origin to the plane.

成员(属性)
(1)distance
(2)normal
方法
(1)static Cesium.ClippingPlane.clone(clippingPlane, result)
    返回值: a clone of the input ClippingPlane
(2)static Cesium.ClippingPlane.fromPlane(plane, result)
    返回值: The ClippingPlane generated from the plane's parameters.

页: [1]
查看完整版本: Plane类说明