三维模型多边形裁剪处理类
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
参数选项:
|
Example:
var Clip = new Cesium.GeoTilesetClip({
viewer:viewer,
enableGeoClipInner:true
});
// 裁剪多边形
let clipPolygonCartesian3Array=[
{x: -2272850.887608903, y: 5010028.705672912, z: 3216523.888577822},
{x: -2272917.509242004, y: 5010223.144546779, z: 3216049.841104454},
{x: -2273418.0867387606, y: 5010000.61797444, z: 3216024.275392322},
{x: -2273408.1098172977, y: 5009739.8911279645, z: 3216465.852413161},
{x: -2272850.887608903, y: 5010028.705672912, z: 3216523.888577822}
]
//裁剪多边形
let clipPolygon = new Cesium.PolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(clipPolygonCartesian3Array),
})
//添加裁剪多边形
Clip.addClipPolygon(clipPolygon);
// 绑定Cesium3DTileset
Clip.bindTileset(tileset);
Demo:
Members
是否将裁剪模式设置为内裁剪
-
Default Value:
true
是否开启裁剪
-
Default Value:
true
裁剪多边形个数
-
Default Value:
0
Methods
以polygon的形式添加裁剪多边形
Name | Type | Description |
---|---|---|
clipPloygon |
Object | 裁剪多边形 |
Returns:
返回裁剪多边形的id
绑定3DTiles
Name | Type | Description |
---|---|---|
tileset |
Object | 3DTiles模型对象 |
解除所有3DTiles模型对象绑定
解除3DTiles绑定
Name | Type | Description |
---|---|---|
tileset |
Object | 3DTiles模型对象 |
获取所有裁剪多边形
Returns:
返回裁剪多边形个数
更新裁剪模式
Name | Type | Description |
---|---|---|
clipType |
Boolean | 裁剪模式,true为内裁剪,false为外裁剪 |
移除所有裁剪多边形
移除指定id裁剪多边形的裁剪效果
Name | Type | Description |
---|---|---|
clipId |
Number | 裁剪多边形的id |