DecorateContext Class

Provides context for a ViewportDecorator to add Decorations to be rendered within a Viewport.

Extends

Methods

Name Description
addCanvasDecoration(decoration: CanvasDecoration, atFront: booleanfalse): void Add a CanvasDecoration to be drawn in this context's ScreenViewport.  
addDecoration(type: GraphicType, decoration: RenderGraphic): void Adds a graphic to the set of Decorations to be drawn in this context's ScreenViewport.  
addDecorationFromBuilder(builder: GraphicBuilder): void Calls GraphicBuilder.finish on the supplied builder to obtain a RenderGraphic, then adds the graphic to the appropriate list of  
addHtmlDecoration(decoration: HTMLElement): void Add an HTMLElement to be drawn as a decoration in this context's ScreenViewport.  
createGraphic(options: Omit<ViewportGraphicBuilderOptions, "viewport">): GraphicBuilder Create a builder for producing a RenderGraphic appropriate for rendering within this context's Viewport.  
createGraphicBuilder(type: GraphicType, transform?: Transform, id?: string): GraphicBuilder Create a builder for creating a RenderGraphic of the specified type appropriate for rendering within this context's Viewport.  
setSkyBox(graphic: RenderGraphic): void Display skyBox graphic that encompasses entire scene and rotates with camera.  
setViewBackground(graphic: RenderGraphic): void Set the graphic to be displayed behind all other geometry as the background of this context's ScreenViewport.  
create(args: DecorateContextCreateArgs): DecorateContext Static Create a new DecorateContext.  

Inherited methods

Name Inherited from Description
createBranch(branch: GraphicBranch, location: Transform): RenderGraphic Inherited RenderContext Create a RenderGraphic which groups a set of graphics into a node in a scene graph, applying to each a transform and optional clip volume and symbology overrides.
createGraphicBranch(branch: GraphicBranch, location: Transform, opts?: GraphicBranchOptions): RenderGraphic Inherited RenderContext Create a graphic from a GraphicBranch.
createSceneGraphicBuilder(transform?: Transform): GraphicBuilder Inherited RenderContext Create a builder for creating a GraphicType.Scene RenderGraphic for rendering within this context's Viewport.
getPixelSizeAtPoint(inPoint?: Point3d): number Inherited RenderContext Given a point in world coordinates, determine approximately how many pixels it occupies on screen based on this context's frustum.

Properties

Name Type Description
viewport Accessor ReadOnly ScreenViewport The ScreenViewport in which this context's Decorations will be drawn.  

Inherited properties

Name Type Inherited from Description
frustum Readonly Inherited Frustum RenderContext Frustum extracted from the context's Viewport.
frustumPlanes Readonly Inherited FrustumPlanes RenderContext Frustum planes extracted from the context's Viewport.
renderSystem Accessor Inherited ReadOnly RenderSystem RenderContext The RenderSystem being used to produce graphics for this context.
viewFlags Readonly Inherited ViewFlags RenderContext ViewFlags extracted from the context's Viewport.

Defined in

Last Updated: 14 November, 2024