DecorateContext Class
Provides context for a ViewportDecorator to add Decorations to be rendered within a Viewport.
Extends
Methods
| Name | Description | |
|---|---|---|
| addCanvasDecoration(decoration: CanvasDecoration, atFront: boolean = false): 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. |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| createBranch(branch: GraphicBranch, location: Transform): RenderGraphic | 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 | RenderContext | Create a graphic from a GraphicBranch. |
| createSceneGraphicBuilder(transform?: Transform): GraphicBuilder | RenderContext | Create a builder for creating a GraphicType.Scene RenderGraphic for rendering within this context's Viewport. |
| getPixelSizeAtPoint(inPoint?: Point3d): number | 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 | Frustum | RenderContext | Frustum extracted from the context's Viewport. |
| frustumPlanes Readonly | FrustumPlanes | RenderContext | Frustum planes extracted from the context's Viewport. |
| renderSystem Accessor ReadOnly | RenderSystem | RenderContext | The RenderSystem being used to produce graphics for this context. |
| viewFlags Readonly | ViewFlags | RenderContext | ViewFlags extracted from the context's Viewport. |
Defined in
- core/frontend/src/ViewContext.ts Line 134
Last Updated: 30 November, 2023