Scene3D class

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 Viewer3D.getScene().

Signature:

export default class Scene3D extends Scene 

Properties

PropertyModifiersDescription
_viewer
core
cores

Methods

MethodDescription
addPawn(pawn, changeCamera)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)
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.
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.
removePawn(pawn)Remove pawn object from the scene.
removeText3D(text)
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.