请选择 进入手机版 | 继续访问电脑版

01BIM社区

 找回密码
 立即注册

扫一扫,访问微社区

查看: 3423|回复: 3

Plane类说明

[复制链接]

155

主题

643

帖子

2531

积分

金牌会员

Rank: 6Rank: 6

积分
2531
发表于 2022-6-23 09:56:36 | 显示全部楼层 |阅读模式
<Plane类说明>

2022年6月23日


回复

使用道具 举报

155

主题

643

帖子

2531

积分

金牌会员

Rank: 6Rank: 6

积分
2531
 楼主| 发表于 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.
[td]
参数名称
类型
描述信息
normal
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=0const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);

成员(属性)[backcolor=rgb(119, 156, 52) !important]static [backcolor=rgb(119, 156, 52) !important]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.
[backcolor=rgb(119, 156, 52) !important]static [backcolor=rgb(119, 156, 52) !important]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.
[backcolor=rgb(119, 156, 52) !important]static [backcolor=rgb(119, 156, 52) !important]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.

回复 支持 反对

使用道具 举报

155

主题

643

帖子

2531

积分

金牌会员

Rank: 6Rank: 6

积分
2531
 楼主| 发表于 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的平面将剪切穿过对象的中心。
     平面的法向,如果法线向下,以平面为界限,相反方向都是外部,如图所示:
231f5cf4d9b64f9bbcf83be9b6154854.png
2、平面法向所在坐标系是以正东方为x轴正方向,正北方为y轴正方向,正上面为z轴正方向的坐标系
3、参数
    (1)planes        用于在每个平面的外部选择性地禁用渲染的对象数组
    (2)edgeColor        应用的颜色用于突出显示剪切对象的边缘,就是测试阶段能让你看到剪切的位置
    (3)edgeWidth        应用于剪裁对象的边缘的高光的宽度(以像素为单位)
    (4)unionClippingRegions        如果为true,则所有平面外部(法向的反方向)都被剪切。否则,只有区域位于每个平面的外侧,才会剪切区域,就是所谓切片的交集



回复 支持 反对

使用道具 举报

155

主题

643

帖子

2531

积分

金牌会员

Rank: 6Rank: 6

积分
2531
 楼主| 发表于 2022-7-12 08:30:43 | 显示全部楼层
本帖最后由 tzbm123456 于 2022-7-12 09:03 编辑

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

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|01BIM社区 - 最专业的BIM技术交流平台 ( 渝ICP备15000873号 )

GMT+8, 2024-3-28 18:50 , Processed in 0.062060 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表