Overlay
-
class
cee.Overlay() Manages 2d overlay items in a View.
Overlay items are 2d items drawn in the view together with the 3d model, for example color legends, navigation cube, step text and info box.
You can access the overlay object with the
View.overlayproperty.
Accessors
-
cee.Overlay.autoAppendModelInfoToInfoBox() - get autoAppendModelInfoToInfoBox(): boolean
Whether information from the models should be appended to the info box
Returns: boolean
set autoAppendModelInfoToInfoBox(enable: boolean): voidParameters
enable: booleanReturns: void
-
cee.Overlay.infoBoxPosition() - get infoBoxPosition():
OverlayItemPositionThe position of the info box.
Returns:
OverlayItemPositionset infoBoxPosition(position:OverlayItemPosition): voidParameters
position:OverlayItemPositionReturns: void
-
cee.Overlay.infoBoxVisible() - get infoBoxVisible(): boolean
The visibility of the info box (the blue box in the bottom right corner) in the view
Returns: boolean
set infoBoxVisible(show: boolean): voidParameters
show: booleanReturns: void
-
cee.Overlay.legendsPosition() - get legendsPosition():
OverlayItemPositionThe position of the legends.
Returns:
OverlayItemPositionset legendsPosition(position:OverlayItemPosition): voidParameters
position:OverlayItemPositionReturns: void
-
cee.Overlay.maximumLegendHeight() - get maximumLegendHeight(): number
The maximum height of the legends (color legends and category legends).
Legends are sized to fit the view, depending on the view height and the number of legends. This property controls the maximum height a legend can have.
The value of this property is in device pixels, so it’s multiplied by the display’s pixelScaleFactor to give the native (full resolution) pixel height.
Returns: number
set maximumLegendHeight(height: number): voidParameters
height: numberReturns: void
-
cee.Overlay.modelColorLegendsVisible() - get modelColorLegendsVisible(): boolean
The visibility of the color legend overlay items for models (currently only for RemoteModel).
Returns: boolean
set modelColorLegendsVisible(show: boolean): voidParameters
show: booleanReturns: void
- get navigationCubeHomeDirection():
Vec3The view direction to set when the “Home” button on the navigation cube is pressed
Returns:
Vec3set navigationCubeHomeDirection(direction:Vec3): voidParameters
direction:Vec3Returns: void
- get navigationCubeHomeEye():
Vec3The view eye position to set when the “Home” button on the navigation cube is pressed If undefined then eye position is set automatically to fit view
Returns:
Vec3set navigationCubeHomeEye(eye:Vec3): voidParameters
eye:Vec3Returns: void
- get navigationCubeHomeUp():
Vec3The up direction to set when the “Home” button on the navigation cube is pressed
Returns:
Vec3set navigationCubeHomeUp(up:Vec3): voidParameters
up:Vec3Returns: void
- get navigationCubePosition():
OverlayItemPositionThe position of the navigation cube.
Returns:
OverlayItemPositionset navigationCubePosition(position:OverlayItemPosition): voidParameters
position:OverlayItemPositionReturns: void
- get navigationCubeVisible(): boolean
The visibility of the navigation cube in the view
Returns: boolean
set navigationCubeVisible(show: boolean): voidParameters
show: booleanReturns: void
-
cee.Overlay.stepTextVisible() - get stepTextVisible(): boolean
The visibility of the step text (the text at the bottom of the view displaying the current step for RemoteModels)
Returns: boolean
set stepTextVisible(show: boolean): voidParameters
show: booleanReturns: void
Methods
-
cee.Overlay.addCustomCategoryLegend() - addCustomCategoryLegend(categories: string[], colors: ArrayLike, legendTitle: string, resultId: number): void
Adds a category legend to the view.
The category legend shows each color with its corresponding descriptive text.
Note that the categories and colors arrays must have the same length.
Legends can be removed with the
removeAllCustomLegendsmethod.Parameters
categories: string[]
colors: ArrayLike
legendTitle: string
resultId: number
Returns: void
-
cee.Overlay.addCustomColorLegend() - addCustomColorLegend(legend:
OverlayColorLegendContinuousDomain): voidAdds a color legend displaying the settings of the given scalar mapper.
Legends can be removed with the
removeAllCustomLegendsmethod.Parameters
Returns: void
-
cee.Overlay.addCustomColorLegendForScalarMapper() - addCustomColorLegendForScalarMapper(scalarMapper:
ScalarMapperContinuousDomain, legendTitle: string, resultId: number): voidAdds a color legend displaying the settings of the given scalar mapper.
Legends can be removed with the
removeAllCustomLegendsmethod.The resultId parameter is an optional user defined id identifying the scalar mapper. This id will be passed to the legend picked handler when the user clicks on the color legend. See
Viewer.setColorLegendClickHandlerandColorLegendClickedHandlerfor more information.Parameters
Returns: void
- configureNavigationCube(faceNames: string[], faceColors:
Color3Like[], axisLabels: string[]): voidConfigure the navigation cube
- faceNames: Must contain 6 values, names for: Pos_X, Neg_X, Pos_Y, Neg_Y, Pos_Z, Neg_Z
- faceColors: null or 6 values, colors for: Pos_X, Neg_X, Pos_Y, Neg_Y, Pos_Z, Neg_Z axisLabels: null (defaults to x,y,z) or 3 values, names for X_AXIS, Y_AXIS, Z_AXIS
Parameters
Returns: void
-
cee.Overlay.removeAllCustomLegends() - removeAllCustomLegends(): void
Removes all custom legends from the view.
This method will remove all legends added with the
addCustomColorLegendForScalarMapperandaddCustomCategoryLegendmethods.Returns: void
-
cee.Overlay.setInfoBoxAppearance() - setInfoBoxAppearance(backgroundColor:
Color4Like, textColor:Color3Like, borderColor:Color3Like): voidSets the appearance of the info box.
Parameters
Returns: void
-
cee.Overlay.setInfoBoxContent() - setInfoBoxContent(content: string): void
Sets the text to show in the info box.
Note that any information from the models will be appended to the given string unless
autoAppendModelInfoToInfoBoxis set to false.Parameters
content: stringReturns: void
-
cee.Overlay.setStepTextContent() - setStepTextContent(content: string): void
Sets the text to show in as the step info.
This will remove any automatic step info from the Remote Model.
Parameters
content: stringReturns: void
- viewConfigurationFromNavigationCubeItem(item:
NavigationCubeItem):NavigationCubeViewConfigurationGet the view direction and up vector based on the navigation cube item
Parameters
item:NavigationCubeItemReturns:
NavigationCubeViewConfiguration