Scene3D describes the contents in the scene and provides a number of ways to change them.
A Scene3D object is created internally when Viewer3D is initialized. It can be obtained by call Viewer3DBase.getScene().
Signature:
export default class Scene3D extends Scene
Extends: Scene
Property | Modifiers | Description |
---|---|---|
core | ||
cores |
Method | Description |
---|---|
addMap(options) | add map imagery of certain LOD level |
addPawn(pawn, changeCamera, batch) | Pawn is a small object which can be inserted into the scene. It can be out of another model or created dynamically. |
addText3D(text, changeCamera) | add 3D text to scene |
addVisualize(visualize) | Add a visualization to the scene. |
getClippingData() | Get the current scene's clipping data. |
getElementBBox(elementName) | Get the bounding box of single element. |
getElementGuid(elementName) | Get GUID of the element by its name. |
getElementMaterialNames(elementName) | Get materials' names of the given element. |
getElementMaterials(elementName) | |
getElementNameByGuid(guid) | Get the element ID of element by specifying its GUID. |
getElementNamesByMaterialName(materialName) | Get elementNames by given material name. |
getElementsBBox(elementNames) | Get the bounding box of elements. |
getElementsNames(elementType, inverted) | Return the element names of element of certain type. |
getMaterialType(materialName) | Get material type. Currently there are only two types of material, "MaterialPbr" and "MaterialAdhoc". |
getModelMaterialNames() | Get all material names of all models. |
getModelTransform(modelId) | |
getPawnMaterialNames(pawn) | Get matrerials' names of the given pawn. |
getVisualize(visualizeName, index) | |
getVisualizes(visualizeName) | Get the visualize objects by its name. |
hasContours() | Check if the scene has contour lines. |
isElementVisible(elementName) | Check the visibility of element. |
removeMap(map) | remove map |
removePawn(pawn, batch) | Remove pawn object from the scene. |
removeText3D(text) | remove 3D text from scene |
removeVisualize(visualize) | Remove visualize from the scene. |
setElementsColor(elementNames, color) | Change the element colors by given element names. |
setElementsVisibility(elementNames, surfaceVisible, lineVisible) | Change the elements visibility. |
setModelVisibility(modelId, surfaceVisible, lineVisible) | Change the visibility of model. |
updateBBox() | 手动更新场景boundingBox,并更新远近截面 |