Class: SolidModelsProfile

SolidModelsProfile

new SolidModelsProfile(scene)

实体模型剖面类。

Name Type Description
scene Object 可选

进行实体模型剖切的场景。

Throws:

场景是必需的。

Type
DeveloperError
Example
var solidModelsProfile = new SuperMap3D.SolidModelsProfile(scene);

Members

addedEventEvent

addModels函数添加的模型加载完成后触发的事件。

clippingTypenumber

获取或者设置剖切的裁剪方式,是内部裁剪还是外部裁剪,默认是外部裁剪。

Default Value:
KeepInside

mixColorTypeMixColorType

用于指定颜色混合模式。

readonly selectedModelIDsArray

获取剖面上被选中的模型的id。

volumeObject

获取或者设置体元栅格数据集瓦片。

Methods

addModels(models)

添加实体模型。

Name Type Description
models Array

拟添加的模型,为数组类型。其元素结构为:

Name Type Description
Id string

元素的ID,为大于等于0且不能重复的值。

model string

modelUrl 被剖切的数据服务的地址。

texture string 可选

模型剖切面上使用的纹理地址。

textureMapParameter:{UTiling:1.0 VTiling:1.0} Object 可选

纹理映射参数。其中UTiling表示纹理在U方向代表的实际尺寸是多少米,VTiling表示纹理在V方向代表的实际尺寸是多少米

color Color 可选

剖切面上使用的颜色,如果已经指定了纹理则优先使用纹理。

addProfileGeometry(geometry)

添加用于封边的几何体。

Name Type Description
geometry Array | Object

添加的用于封边的几何体,支持四种类型: (1)、顶点坐标数组,用来设置封边的平面; (2)、GeoCylinder对象,用一个柱体做封边分析对象,可用来做钻孔分析; (3)、GeoRegion3D对象,用三维GeoRegion3D对象的底面来封边。 (4)、GeoBox对象,用GeoBox对象来封边。

build()

执行剖切分析。在设置好addModels和addProfilePlane方法后执行此方法进行剖切分析。此时被剖切的模型将不再显示,场景中只显示模型的剖切面。 如果在执行build方法后需要修改剖切面或者被剖切的模型,则需先执行clear,再执行build。

clear()

清除剖切分析结果。

clearProfile()

清除剖面分析结果,但不会清除被剖切的模型对象。

getVisibleInViewport(index){boolean}

获得图层对应视口可见性

Name Type Description
index number

索引

Throws:

the index is 0~3

Type
DeveloperError
Returns:
Type Description
boolean visible 可见性

setClipGeometry(geometry)

设置用于剖切的几何体。可以是GeographicRegion3D

Name Type Description
geometry Array | Object

添加的用于剖切的几何体,支持四种类型: (1)、顶点坐标数组,用来设置剖切的平面; (2)、GeoCylinder对象,用一个柱体做剖切分析对象; (3)、GeoRegion3D对象,用三维GeoRegion3D对象的底面来剖切。 (4)、GeoBox对象,用GeoBox对象来剖切。 (5)、支持GeoModel对象

setModelTexture(options)

设置自定义纹理,用于添加或替换地质体纹理。(需要模型带纹理坐标)

Name Type Description
options Object

传入参数,其结构如下:

Name Type Description
modelUrl String

地质体模型地址

imageUrl String

自定义纹理地址

Example
solidModelsProfile.setModelTexture({
        modelUrl : 'xxx.stream',
        imageUrl : 'xxx.jpg'
    })

setVisibleInViewport(index)

设置图层对应视口可见

Name Type Description
index number

索引

Throws:

the index is 0~8

Type
DeveloperError