S3MTilesLayer

new Cesium.S3MTilesLayer(options)

S3M (Spatial 3D Model) layer class, through which the 3D photogrammetric cache can be loaded, including oblique photogrammetric models, BIM models, point cloud data, man-made models, vector data, symbols, etc.

Add the published 3D service in the *.s3m format to the scene through Scene.addS3MTilesLayerByScp(url, options).
Name Type Description
options Object optional The parameter object has the following properties:
Name Type Default Description
gl WebGLRenderingContext optional webgl context.
servers Array optional An array containing server addresses.
urls Array optional An array containing xml addresses.
position Array optional The position of the layer insertion point ([Longitude, Latitude, Height]).
name Array optional The layer name.
WaterEffectSet Object optional Water surface special effects parameters.
urlType UrlType optional Entity data request form.
urlArguments String optional The parameters of the data service URL.
format Boolean optional Whether to support texture compression.
cacheEntityCount Number 0 optional The number of entities cached during LOD scheduling.
layerBounds Rectangle optional The extent of the layer.
tileSpliteType String 'LOCAL' optional The type of slice division.
volumeObj Object optional Volume rendering parameter object.
boundingSphereColc Array optional The root node boundingSphere.
MaxInstensity Number optional Maximum intensity.
MinInstensity Number optional Minimum strength.
MaxHeight Number optional maximum height.
MinHeight Number optional Minimum height.
HorizontalLine Number optional Horizontal contours.
fileType String optional File type (data type).
ProcessType String optional Processing method.
cullEnabled Boolean false optional Whether to exclude the back side (default is No, that is, double-sided rendering).
cacheKey String optional Three-dimensional cache key. This key is the 3D cache key set by the iserver to publish the 3D cache service.
keyframes Object optional Point in time.
duration Object optional Animation duration.
interpolationType Object optional The interpolation type, the default value is Linear.
emissionTextureUnit Number optional Set the self-luminous texture unit.
Example:
//new S3MTilesLayer instance
var S3MTilesLayer = new S3MTilesLayer({
 gl : gl,
 servers : ["http://localhost:8090"],
 urls : ["http://localhost:8090/data/tile_001.xml","http://localhost:8090/data/tile_002.xml"],
 position : [10,20],
 name : ["S3MTilesLayer"]
});

Members

staticCesium.S3MTilesLayer.DEFAULT_TRANSPARENT_BACK_COLOR : Color

The default color of the transparent target color of the layer is black (Color.BLACK).

staticCesium.S3MTilesLayer.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE : number

The default value of the layer transparency tolerance is 0.0, which is opaque
Default Value: 0.0

allTilesLoaded : Event

The event that all slices have been loaded in the current view. This event will be triggered when all slices are loaded.

attributeDownloaded : Event

An event to determine whether the property file has been downloaded. This event will be triggered when all properties files have been downloaded. Note: When setting the thematic map with some attribute fields, the attribute file will be downloaded after setting queryFiledNames, and there is no need to open isAttributesSave of indexedDB.
Example:
layer.queryFieldNames = ['FLOOR','HEIGHT']

readonlybloomEffect : BloomEffect

Get the floodlight effect of the scene, including floodlight intensity value, floodlight brightness threshold, etc.

bloomEnable : boolean

Get whether the floodlight effect is turned on.

bReleaseColor : Number

Release the vertex color memory and restore the vertex color.

brightness : Number

Set the layer brightness value to adjust the color.

clearMemoryImmediately : Boolean

Whether to release the memory in time, the default value is true.
Default Value: true

clipLineColor : Color

Gets or sets the color of the clipping line when BOX clipping the S3M layer.

clippingType : ClippingType

Get or set the clipping mode.

clipPlaneColor : Color

Get or set the color of the cropped section

ColorDictTableMode : String

Set the color table mode.

colorTableChanged : Event

The event when the application of the color table of all volume data slices under the current view angle is completed. This event will be triggered when the color table application of the volume data slice is completed.

computeHeight : Boolean

Used to specify whether to automatically calculate the height of the model on the front end, the default value is false and the height is not calculated. Specifying true for data without height can ensure the normal operation of operations such as flood analysis and contour setting.
Default Value: false

contrast : Number

Set the layer contrast value to adjust the color.

coverImageryLayer : ImageryLayer

Get or set the overlay image layer or MVT layer (used to be pasted to the inclined model surface).

cullEnabled : Boolean

Get or set single and double-sided rendering (default double-sided rendering).

customRequestHeaders : Object

Get or set a custom request header.

dataMaxValue : Number

Get the maximum height value or maximum intensity value of the data. For point cloud data, this attribute is the height value or intensity value (the default is the intensity value); for other 3D data, this attribute is the height value.
Example:
//Get the maximum value of data
var dataMaxValue = S3MTilesLayer.DataMaxValue;

dataMinValue : Number

Get the minimum height value or minimum intensity value of the data. For point cloud data, this attribute is the height value or intensity value (the default is the intensity value); for other 3D data, this attribute is the height value.
Example:
//Get the minimum value of data
var dataMinValue = S3MTilesLayer.DataMinValue;
Gets or sets the line symbol of the S3M layer.

gamma : Number

Set the layer gamma value to adjust the color.

readonlygroupName : String

Get the group name of the layer

hasLight : Boolean

Gets or sets whether the layer has lighting effects enabled.

readonlyhasWireframe : Boolean

Gets whether the layer is framed.

heading : Number

Gets or sets the heading angle of the camera (unit: radians).

horizontalColor : Color

Gets or sets the color of the horizontal line.

horizontalline : Number

Gets or sets the height of the horizontal line.

hue : Number

Set the layer tone value to adjust the color.

hypsometricSetting : Object

Gets or sets the layered color expression of the layer.
Example:
//Set layer layering and coloring properties
var hypsometricSetting = new Cesium.HypsometricSetting();
hypsometricSetting.MinVisibleValue = 30;
hypsometricSetting.MaxVisibleValue = 150;
var colorTable = new Cesium.ColorTable();
colorTable.insert(150, new Cesium.Color(1, 0, 0));
colorTable.insert(30, new Cesium.Color(0, 0, 1));
hypsometricSetting.ColorTable= colorTable;
S3MTilesLayer.hypsometricSetting = {
hypsometricSetting : hypsometricSetting,
analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL
}
//Get layer layering and coloring properties
var hyp = S3MTilesLayer.hypsometricSetting ;

iconRelatedTextLayerID : Number|Undefined

Get or set the ID of the text layer. This interface specifies a text layer based on the ID, and allows the icon layer to follow the layer to avoid. Note: Only when overlapDisplayOptions.allowIconWithTextDisplay is true will it take effect.
Default Value: undefined

readonlyid : Number

Get the layer id.

ignoreNormal : Boolean

Gets or sets whether to automatically calculate the normal in the GPU, the default value is false. When the value is true, the normals are automatically calculated in the GPU, and the normals of the data are not used. When the value is false, the normals are not automatically calculated in the GPU, and the normals that come with the data are used.

indexedDBSetting : Object

Get or set indexedDB attribute information (not supported by IE browser). Among them, when setting the indexeDB attribute, There are three Boolean type branch attributes: isGeoTilesSave-whether to save the slice; isAttributesSave--Whether to save the attributes; isGeoTilesRootNodeSave--Whether to save the root node.
Example:
//Open the Config layer of the oblique photogrammetric data
var layer = scene.layers.find('Config');
//Set whether to save oblique photogrammetric cache
layer.indexedDBSetting.isGeoTilesSave = true

isOverlapDisplayed : Boolean

Gets or sets whether the overlapping part of the layer is displayed. When set to true, the overlapping part is still displayed, that is, it does not participate in avoidance. The default value is false.
Default Value: false

labelStyle : Boolean

Gets or sets the label style of the layer text.

layerBounds : Rectangle

Get or set the layer range.

LoadingMode : Number

Get or set the loading mode.

LoadingPriority : LoadingPriorityMode

Get or set the priority mode of loading.
Default Value: Child_Priority : 1

loadVolumeData : Boolean

Get or set whether to load body data, the default value is true.
Default Value: true

lodRangeScale : Number

Gets or sets the zoom factor of the layer's LOD level switching distance.

maximumMemoryUsage : Number

The maximum amount of memory that can be used by the slice dataset (unit: MB), the default value is 512MB.
Default Value: 512

maxTransparentAlpha : number

Get or set the maximum transparency threshold (foreground color transparency set to [0,maxTransparentAlpha] will be considered the same transparent effect, and [maxTransparentAlpha,1] will have a transparent transition effect).
Default Value: 0.98

maxVisibleAltitude : Number

Gets or sets the maximum visible height of the layer.

minTransparentAlpha : number

Get or set the minimum transparency threshold (less than this value will be filtered out)
Default Value: 0.1

minVisibleAltitude : Number

Gets or sets the minimum visible height of the layer.

mixColorType : Number

Set the texture display mode (mix, replace)

multiChoose : Boolean

Gets or sets whether the layer supports multiple selection.

readonlyname : String

Get the layer name

orderIndependentTranslucency : Boolean

Gets or sets whether to enable the transparent sorting function, the default is true.
Default Value: true

partlyTransparent : Boolean

Get and set whether the display effect of transparent material is optimized when OIT is turned on.
Default Value: false

pointCloudShading : Object

Get the encapsulated point cloud rendering parameter object pointCloudShading

priorityScale : Number

Get or set the update priority coefficient, which can control the order of update priority among multiple layers.

rasterPerFrame : Boolean

Whether to draw rasterized vector lines in real time to ensure that the line thickness is consistent at different levels, the default value is false.
Default Value: false

receiveObjectClamp : Boolean

Gets or sets whether the layer accepts the pasted object. The default setting is true. When set to false, the pasted object will not be pasted.
Default Value: true

residentRootTile : boolean

Set whether the root node resides in memory without deleting. The default value is false.

S3MTileLoadedEvent : Event

Get the event that is triggered when the S3M slice is loaded. The processing function of this event will be passed into the BoundingSphere of the slice as a parameter.

saturation : Number

Set the layer saturation value to adjust the color.

selectBound : Rectangle

Get and set the frame selection range.

selectColorType : SelectColorType

Gets or sets the display style of the selected object, and the model texture and color are displayed in a mixed or pure color.

selectedColor : Color

Gets or sets the highlight color of the selected layer.

selectedLineColor : Color

Gets or sets the highlight color of the wireframe of the selected object in the layer
Default Value: new Color(1.0,1.0,1.0,1.0)

selectedSkeletonId : Number

Get or set the child object ID

selectedTranslate : Cartesian3

Gets or sets the offset position of the selected object.

selectEnabled : Boolean

Gets or sets whether the layer is optional.

selectionFiltrateByTransparency : Number

Gets or sets the transparent selection filter threshold.

shadowType : ShadowType

Gets or sets the range type that the model in the layer participates in displaying the shadow.

shadowVolumeBottomHeight : Number

Gets and sets the minimum height of the drop shadow body.

shadowVolumeTopHeight : Number

Gets and sets the maximum height of the shadow body to pull up.

showCallout : Boolean

Gets or sets whether to display the leader line.

showIcon : Boolean

Get or set whether to display the icon.

showLabel : Boolean

Get or set whether to display the label.

constantsilhouetteColor : Color

Set or get the edge contour color, the default is blue

constantsilhouetteSize : Number

Set or get the edge contour size, the default is 2, the unit pixel
Default Value: 2.0

skeletonSelectedColor : Color

Gets or sets the selected highlight color of the child object

skeletonSelectEnable : Boolean

Get or set whether the sub-objects in the layer can be selected

splitDirection : SplitDirection

Get or set the direction of the rolling shutter.

splitPosition : Number

Get or set the shutter position.

style3D : Style3D

Get or set the layer style.
Example:
//Get layer style
var style = S3MTilesLayer.style3D;
//Set layer style
var style3D = new Cesium.Style3D();
var color = new Cesium.Color(1.0, 0.0, 0.0);
style3D.fillForeColor = color;
S3MTilesLayer.style3D = style3D;
//Need to refresh the layer after setting
S3MTilesLayer.refresh();

subdomains : String

Get or set the subdomain name. Through this interface, you can request data from the specified subdomain.

swipeEnabled : Boolean

Get or set whether to turn on the shutter function.

swipeRegion : Rectangle

Gets or sets the quadrilateral area of the rolling shutter.

textureUVSpeed : Number

Get or set the movement speed of the model texture on the UV coordinates

themeStyle : Cesium3DTileStyle

Get or set the thematic map style. Currently, it supports the thematic map with the ground vector cache and the filling color and texture set according to the ID at the front end.

transparentBackColor : Color

Gets or sets the transparent target color of the layer.

transparentBackColorTolerance : Number

Get or set the layer transparency tolerance.

triangleFiltratePixel : Number

Get and set the size of filtered pixels.

urlType : UrlType

Get or set the request form of layer data.

visible : Boolean

Gets or sets the visibility of the layer.
Example:
//Get visibility
var isVisible = S3MTilesLayer.visible;
//Settings are not visible
S3MTilesLayer.visible = false;

visibleDistanceMax : Number

Gets or sets the maximum visible distance value of the layer, in meters. This distance value is used for the distance filtering function. When the distance between the camera and the layer is greater than this distance value, the layer will not be visible.

visibleDistanceMin : Number

Gets or sets the minimum visible distance value of the layer, in meters. This distance value is used for the distance filtering function. When the distance between the camera and the layer is less than this distance value, the layer will not be visible.

volName : String

Get or set the name of the body data.

waterColor : Color

Get or set the color of the water surface.

waterSpeed : Cartesian2

Get or set the water surface speed and water flow direction. This quantity is a two-dimensional quantity. The magnitude of the value is used to indicate the speed, and the positive and negative values of x and y are used to indicate the direction of water flow.

waterWaveScale : Number

Get or set the strength of the water surface ripple.

wireFrameMode : Number

Gets or sets the wireframe mode of the layer.

Methods

addExcavationRegion(options)Boolean

Add excavation plane.
Name Type Description
options Object Excavation area parameters:
Name Type Description
position Array Location information of the excavation area.
name String The name of the excavation area.
Returns:
bool returns true on success, false on failure.

addFlattenRegion(options)Boolean

Add a flattened plane to flatten the plane of the model.
Name Type Description
options Object Flattening area parameters:
Name Type Description
position Array Specify the location information of the flattening area.
name String The name of the flattening area.
Returns:
Return true on success, false on failure.
Example:
S3MTilesLayer.addFlattenRegion({
    position : [13.0500640714, 47.8279189759, 400.0,
                13.0500640714, 47.8230189759, 400.0,
                13.0530640714, 47.8260189759, 400.0,
                13.0538640714, 47.8230189759, 400.0,
                13.0538640714, 47.8279189759, 400.0],
       name : 'flatten2'});

AddImageArray(imgArray)

Use a set of texture pictures to perform volume rendering on the S3M layer. The volume rendering range needs to be set during volume rendering.
Name Type Description
imgArray Promise.<Image> Texture array.

addOverlayImage(options)Boolean

The S3M layer superimposes pictures in the specified range.
Name Type Description
options Object The object has the following properties:
Name Type Description
name String Specifies the name of the range.
bounds Array The point set array of the specified range.
image Element html image element, used for overlay texture image.
Returns:
bool returns true on success, false on failure.

clearCustomClipBox()

Clear the custom clipping plane.
Example:
S3MTilesLayer.clearCustomClipBox();

clearModifyRegions()

Clear the polygon object and crop the S3M layer.

datasetInfo()Promise.Array

Get the name of the layer dataset and the corresponding Id range (applicable to multi-dataset generation cache).
Returns:
The array contains all dataset related information, and each dataset object contains the dataset name, start Id, and end Id.
Example:
var data =  layer.datasetInfo();
Cesium.when(data,function(dataSet){
       var length = dataSet.length;
       .......
        });

destroy()

Destroy the layer, release memory, release webgl resources

fillStyleChange()

The border line does not disappear after setting the fill mode

getAttributesById(id)

Get local object attribute information (scvd in indexedDB, IE browser does not support).
Name Type Description
id Number Index.

getClipRegion()

Get the range of section clipping.

getLodRangeScale()Number

Get the lOD level switching distance zoom factor of the layer.
Returns:
The LOD level switches the distance scaling factor.
Example:
var num = S3MTilesLayer.getLodRangeScale();

getObjsColor()Color

Obtain the color table of the corresponding primitive object according to the ID.
Returns:
对应ID的颜色。

getObjsVisible(id)Boolean

Get the visibility of the object with the specified ID.
Name Type Description
id Number The specified object ID.
Returns:
Visibility of object (optional)
Example:
var id = 12;
S3MTilesLayer.getObjsVisible(id);

getPointCloudClassificationInfos()

Get the point cloud classification information array.
Returns:
The first request for data returns a promise.

getPointCloudGroupBounds(name)undefined|*

Get the corresponding range of the point cloud grouping.
Name Type Description
name String The name of the corresponding range
Returns:
Example:
layer.getPointCloudGroupBounds(name);

getPointCloudGroupInfos()

Get grouping information of point cloud
Example:
layer.getPointCloudGroupInfos();

getQueryParameter()Object

Get attribute query parameters.
Returns:
Property query parameter object.

getSelection()AssociativeArray

Get the selection set.
Returns:
A relational array containing all selected IDs.
Example:
S3MTilesLayer.getSelection();

getVisibleInViewport(index)Boolean

Get the visibility of the viewport corresponding to the layer.
Name Type Description
index Number Index.
Returns:
visiblility (optional)
Throws:

getVolNames()Array

Get all the body data names.
Returns:
An array of all body data names.

refresh()

Refresh the layer.

releaseSelection()

Release the selection set.
Example:
S3MTilesLayer.releaseSelection();

removeAllExcavationRegion()

Remove all excavation area.

removeAllFlattenRegion()

Remove all pressure planes.
Example:
S3MTilesLayer. removeAllFlattenRegion();

removeAllObjectsOperation()

The operation of removing all primitives.

removeAllObjsColor()

Remove the color set by all primitives.

removeAllObjsExtendHeight()

Remove all set stretch heights.

removeAllObjsOffset()

Clear all object offsets.

removeAllObjsTranslate()

Remove the offset of all objects.

removeExcavationRegion(name)Boolean

Remove the excavation face with the specified name.
Name Type Description
name String The name of the excavation area.
Returns:
bool returns true on success, false on failure.

removeFlattenRegion(name)Boolean

Remove the pressure plane with the specified name.
Name Type Description
name String The name of the pressure plane to be removed.
Returns:
If the removal is successful, it returns true, and if it fails, it returns false.
Example:
S3MTilesLayer. removeFlattenRegion(regionName);

removeObjectsOperation(ids)

According to the list of primitive IDs, the operation (clipping or offset) of the specified primitive is removed.
Name Type Description
ids Array List of primitive IDs.

removeObjsColor(ids)

Remove the set color of the corresponding graphic element according to the graphic element ID list.
Name Type Description
ids Array List of primitive IDs.

removeObjsExtendHeight(ids)

Remove the set stretch height of the object according to the primitive ID list.
Name Type Description
ids Array List of primitive IDs.

removeObjsOffset(ids)

Clear the object offset according to the object ID list.
Name Type Description
ids Array List of object IDs.

removeObjsTranslate(ids)

Remove the offset of the specified id object.
Name Type Description
ids Array The id collection of the object whose offset is to be removed.

removeOverlayImage(name)Boolean

Remove the overlay area with the specified name
Name Type Description
name String Covering area name
Returns:
Return true on success, false on failure

removePBRMaterial()

Used to remove PBR material.

setAnimation(keyframes, duration, InterpolationType)

Set up the animation of the layer.
Name Type Description
keyframes Object Point in time.
duration Object Animation duration.
InterpolationType Object Represents the interpolation type, the default value is Linear.
Throws:
Example:
var promise = layer.setAnimation({
keyframes: {
0%’: { // 时间点
translation: Cesium.Cartesian3.fromDegrees(121, 30, 0),
rotation: new HeadingPitchRoll(0, 0, 0),
scale: new Cesium.Cartesian3(1, 1, 1),
interpolationType: Cesium.InterpolationType.SmoothStep // 这个时间点到下一时间点这段时间的插值类型,没有设置就用keyframes同级的InterpolationType。
},
‘20%’: {
...
},
‘100%’: {
translation: Cesium.Cartesian3.fromDegrees(121, 30, 100),
rotation: new HeadingPitchRoll(90, 0, 0),
scale: new Cesium.Cartesian3(5, 5, 5)
},
},
duration: 5, // 动画持续几秒
interpolationType: Cesium.InterpolationType.Linear // 插值类型,默认值Linear
})

SetBound3D(left, bottom, right, top, minHeight, maxHeight)

Set a bounding box for the layer, the model in the box area has a volume rendering effect, and the model outside the area remains as it is.
Name Type Description
left Number The longitude on the left side of the bounding box, in degrees.
bottom Number The latitude below the bounding box, degrees is the range.
right Number The longitude on the right side of the bounding box, in degrees.
top Number The latitude above the bounding box, in degrees.
minHeight Number The minimum height of the bounding box, in meters.
maxHeight Number The maximum height of the bounding box, in meters.

setCategoriesVisible(categories, mode)

Hide and display objects according to W-bit feature value
Name Type Description
categories Array.<Number> | Number Eigenvalue array, or eigenvalue
mode CategoryVisibleMode Hide, show, reset

setClipSection(firstPoint, secondPoint, thirdPoint, renderClipSection)

Set the clipping plane.
Name Type Description
firstPoint Cartesian3 Draw the first point of the clipping plane.
secondPoint Cartesian3 Draw the second point of the clipping plane.
thirdPoint Cartesian3 Draw the third point of the clipping plane.
renderClipSection Boolean Draw the clipped section.
Example:
var p1 =  new Cesium.Cartesian3(-8787.4,2084.7,7021.04335128);
 var p2 =  new Cesium.Cartesian3(-8786.3,2081.8,7024.90146083);
 var p3 =  new Cesium.Cartesian3(-8783.2,2086.8,7021.04335128);
 for(var i = 0;i < layers.length;i++){
    layers[i].setClipSection(p1,p2,p3,true);
  }

setCustomClipBox(options)Boolean

Add a custom clipped plane.
Name Type Description
options Object Clippinged plane parameters:
Name Type Description
dimensions Cartesian3 Specify the length, width, and height of the crop box.
position Cartesian3 Specify the clipping plane position.
clipMode String Specify the clip mode. Clip mode includes the following categories:

clip_behind_any_plane:Cut out the part behind any clipped plane.

clip_behind_all_plane:Cut out the part behind all the clipped plane。

only_keep_line:Only keep the cutting line and cut out the other parts.
Returns:
It returns true if successful, false if it fails.
Throws:
  • DeveloperError : options and options.dimensions and options.position are required.
Example:
var boxOptions = {
      dimensions : new Cesium.Cartesian3(10, 10, 10)
      position : Cesium.Cartesian3.fromDegrees(120, 40, 20),
      clipMode : "clip_behind_all_plane"
};
S3MTilesLayer.setCustomClipBox(boxOptions);

setCustomClipCross(options)

Set the area clippiing parameters.
Name Type Description
options Object The parameter object contains the following properties:
Name Type Description
position Cartesian3 optional The coordinates of the center point.
dimensions Cartesian2 optional The width and height of the crop area, unit: meter.
heading Number optional The rotation angle of the clipping plane around the Z axis, unit: degree.
pitch Number optional The rotation angle of the cutting plane around the X axis, unit: degree.
roll Number optional The rotation angle of the clipping plane around the Y axis, unit: degree.
extrudeDistance Number optional The stretching distance of the center point of the clipping area, unit: meter.

setCustomClipGeometry(options)

Set polyhedron clipping parameters.
Name Type Description
options Object The parameter object contains the following properties:
Name Type Description
geometry Geometry3D optional Geometry object (currently only supports convex polyhedrons).
clippingType ClippingType optional Clipping type.
spatialQuery SpatialQuery3D optional Spatial query object.
Example:
var geometry = new Geometry3D(pts)
geometry.extrudeHeight = 100;
var spatialQuery = new SpatialQuery3D();
spatialQuery.build();
layer.setCustomClipGeometry({
 geometry : geometry;
 clippingType : ClippingType.KeepOutside;
 spatialQuery : spatialQuery
 })

setCustomClipPlane(firstPoint, secondPoint, thirdPoint, clipPlaneMode)

Profile analysis.
Name Type Description
firstPoint Cartesian3 Draw the first point of the profile.
secondPoint Cartesian3 Draw the second point of the profile.
thirdPoint Cartesian3 Draw the third point of the profile.
clipPlaneMode clipPlaneMode Clipping section mode.
Example:
var p1 =  new Cesium.Cartesian3(-8787.4,2084.7,7021.04335128);
 var p2 =  new Cesium.Cartesian3(-8786.3,2081.8,7024.90146083);
 var p3 =  new Cesium.Cartesian3(-8783.2,2086.8,7021.04335128);
 for(var i = 0;i < layers.length;i++){
    layers[i].setCustomClipPlane(p1,p2,p3);
  }

setFlattenRegionVisibleInViewport(index)Boolean

Set the flattening area to split the screen.
Name Type Description
index Number index.
Returns:
Visibility.
Throws:

setLodRangeScale(lodrange)

Set the lOD level switching distance zoom factor of the layer.
Name Type Description
lodrange Number The LOD level switches the distance scaling factor.
Example:
S3MTilesLayer.setLodRangeScale();

setModifyRegions(regions, mode)

Clip the S3M layer according to the polygon object.
Name Type Description
regions Array Polygon array.
mode mode Clip mode, set the inner or outer range of the clipping polygon object. When the value is CLIP_INSIDE, the inner range is clipped, and when the value is CLIP_OUTSIDE, the outer range is clipped.

setObjectsOperationByID(ids, operationType)

Perform functional operations on the specified ID object.
Name Type Description
ids Array List of object IDs.
operationType Number Function operation type, the value is CLIP, which takes effect for the clipping function.

setObjsColor(ids, color)

Set the color of the corresponding graphic element according to the graphic element IDS list.
Name Type Description
ids Array List of primitive IDs.
color Color The color of the primitive.

setObjsExtendHeight(ids, height)

According to the IDS list, set the stretch height of the object.
Name Type Description
ids Array List of primitive IDs.
height Number The object stretch height value.

setObjsOffset(ids)

Set the object offset according to the object ID list.
Name Type Description
ids Array List of object IDs.

setObjsTranslate(ids, translate)

Set the offset of the object according to the specified id.
Name Type Description
ids Array Specify the id of the object whose offset is to be set.
translate Cartesian3 Specify the offset.

setObjsVisible(ids, isVisible)

According to the list of primitive IDs, set the visibility of the corresponding primitives, and establish a mutually exclusive visibility relationship with other primitives of the layer.
Name Type Description
ids Array List of primitive IDs.
isVisible Boolean Visible (optional).
Example:
//Set the layer id to 1 to display the primitives, and all other primitives are invisible.
layer.setObjsVisible([1],true);
//Set the hidden element with id=1, and all other elements are visible.
layer.setObjsVisible([1],false);

setOnlyObjsVisible(ids, isVisible)

According to the element ID list, set the visibility of the corresponding element (manual setting), if ids is empty, isVisible is to set the visibility of all layers.
Name Type Description
ids Array List of primitive IDs.
isVisible Boolean Visibility (optional)
Example:
//Set the primitives with id 1 and 2 to be invisible, and the visible state of the remaining primitives remains unchanged.
layer.setOnlyObjsVisible([1,2],false);
//Set the primitives with id 1 and 2 to be visible, and the visible state of the remaining primitives remains unchanged.
layer.setOnlyObjsVisible([1,2],true);

setPBRMaterial()

Used to set the PBR material type
Example:
PBR_MATERIAL_TYPE.EMISSION second texture self-illumination
PBR_MATERIAL_TYPE.ROUGHNESS texture transparency is roughness

setPBRMaterialFromJSON()

Used to import PBR material from JSON file, the parameter is the URL of the JSON file.

setPointCloudGroupsVisible(groupNames, isVisible)

Set the visibility of the point cloud grouping.
Name Type Description
groupNames Array The name of the layer group.
isVisible Boolean Visibility (optional)
Example:
//Set the object named "group1" of the layer group to be visible
layer.setPointCloudGroupsVisible(["group1"],true);

setPolygonoffset(factor, units)

Set the polygon offset.
Name Type Description
factor Number Offset slope factor, the default is 0.
units Number The offset unit, the default is 0.
Example:
layer.setPolygonoffset(-1,-1);

setQueryParameter(options)

Set attribute query parameters.
Name Type Description
options Object The object has the following properties:
Name Type Default Description
url String optional Data service url.
dataSourceName String optional The name of the datasource.
dataSetName String optional The name of the dataset.
isMerge Boolean optional Whether the layer is a merged dataset, if it is, there is no need to specify the dataset name.
hasGeometry Boolean false optional Whether the returned result of attribute query contains geometric information.
Example:
layer.setQueryParameter({
                    url: 'localhost:8090/services/realspace/services/xxx/rest/data',
                    dataSourceName: 'xxx',
                    dataSetName: 'xxx'
});

setSelection(ids)

Set the selection set for selection in scene.pick.
Name Type Description
ids Array Set of primitive IDs.

setTextureEmissive()

Used to set the self-illuminating unit, the type is Number
See:

setVisibleInViewport(index, visible)

Set the visibility of the corresponding viewport of the layer.
Name Type Description
index Number Index.
visible Boolean Visibility.
Throws:

updateAllObjsVisible(visible)

Update all object visibility
Name Type Description
visible Boolean Visibility (optional)

updateObjsColor(ids)

Traverse all primitives and update the corresponding primitive colors according to the ID list.
Name Type Description
ids AssociativeArray The relationship array between the primitive ID list and the color.

updateObjsVisible(ids, visible)

Traverse all primitives, and update the visibility of corresponding primitives according to the ID list, and mutually exclusive visibility relationships. If you set [1,2] to be visible, the rest of the primitives are invisible, if you set [1,2] to be invisible. Then the rest of the primitives are visible.
Name Type Description
ids AssociativeArray The relationship array between the primitive ID list and the color.
visible Boolean Visibility (optional)

updateRenderState()

Update the rendering status.