GraphicDescriptionBuilder Namespace

Function

Name Description
GraphicDescriptionBuilder.create Create a GraphicDescriptionBuilder using the specified options.

Defined in

GraphicDescriptionBuilder Interface

An equivalent of a GraphicBuilder that is designed for use on a Worker. Unlike GraphicBuilder.finish, which produces a RenderGraphic, GraphicDescriptionBuilder.finish produces a GraphicDescription. The GraphicDescription can be returned from the Worker to the main thread, where createGraphicFromDescription can be used to quickly convert it to a RenderGraphic. Produce graphics using GraphicDescriptionBuilder on a Worker instead of using GraphicBuilder when you have graphics that may take a non-trivial amount of time to create, to avoid blocking the main JavaScript event loop.

@see GraphicDescriptionBuilder.create to instantiate this type.

Extends

Methods

Name Description
finish(): GraphicDescription Processes the accumulated symbology and geometry to produce a description of a renderable graphic.  

Inherited methods

Name Inherited from Description
activateFeature(feature: Feature): void GraphicAssembler Change the Feature to be associated with subsequently-added geometry.
activateGraphicParams(graphicParams: GraphicParams): void GraphicAssembler Sets the current active symbology for this builder.
activatePickableId(id: string): void GraphicAssembler Change the pickable Id to be associated with subsequently-added geometry.
add(geom: Geometry): void GraphicAssembler  
addArc(ellipse: Arc3d, isEllipse: boolean, filled: boolean): void GraphicAssembler Appends a 3d open arc or closed ellipse to the builder.
addArc2d(ellipse: Arc3d, isEllipse: boolean, filled: boolean, zDepth: number): void GraphicAssembler Appends a 2d open arc or closed ellipse to the builder.
addCurvePrimitive(curve: AnyCurvePrimitive): void GraphicAssembler Append a CurvePrimitive to the builder.
addFrustum(frustum: Frustum): void GraphicAssembler Add Frustum edges.
addFrustumSides(frustum: Frustum): void GraphicAssembler Add Frustum sides.
addLineString(points: Point3d[]): void GraphicAssembler Appends a 3d line string to the builder.
addLineString2d(points: Point2d[], zDepth: number): void GraphicAssembler Appends a 2d line string to the builder.
addLoop(loop: Loop): void GraphicAssembler Append a 3d planar region to the builder.
addPath(path: Path): void GraphicAssembler Append a 3d open path to the builder.
addPointString(points: Point3d[]): void GraphicAssembler Appends a 3d point string to the builder.
addPointString2d(points: Point2d[], zDepth: number): void GraphicAssembler Appends a 2d point string to the builder.
addPolyface(meshData: Polyface, _filled: booleanfalse): void GraphicAssembler Append a mesh to the builder.
addPrimitive(primitive: GraphicPrimitive): void GraphicAssembler Append any primitive to the builder.
addRangeBox(range: Range3d, solid: booleanfalse): void GraphicAssembler Add a box representing a volume of space.
addRangeBoxFromCorners(p: Point3d[]): void GraphicAssembler Add range edges from corner points
addRangeBoxSidesFromCorners(p: Point3d[]): void GraphicAssembler Add range sides from corner points
addShape(points: Point3d[]): void GraphicAssembler Appends a closed 3d planar region to the builder.
addShape2d(points: Point2d[], zDepth: number): void GraphicAssembler Appends a closed 2d region to the builder.
addSolidPrimitive(primitive: SolidPrimitive): void GraphicAssembler Append a solid primitive to the builder.
setBlankingFill(fillColor: ColorDef): void GraphicAssembler Set the current active symbology for this builder to be a blanking fill before adding a planar region.
setSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels: LinePixelsLinePixels.Solid): void GraphicAssembler Sets the current active symbology for this builder.

Inherited properties

Name Type Inherited from Description
pickable Readonly Readonly<PickableGraphicOptions> | undefined GraphicAssembler If the graphic is to be interactive, specifies its Id and other options.
placement Readonly Transform GraphicAssembler The local-to-world transform in which the builder's geometry is to be defined.
preserveOrder Readonly boolean GraphicAssembler If true, the order in which geometry is added to the builder is preserved.
type Readonly GraphicType GraphicAssembler The type of graphic to be produced.
wantEdges Readonly boolean GraphicAssembler If true, edges are generated for surfaces, to be drawn if edge display is enabled for the view in which the graphic is drawn.
wantNormals Readonly boolean GraphicAssembler If true, normal vectors will be generated for surfaces, allowing 3d geometry to receive lighting and reduce z-fighting.
isOverlay Accessor ReadOnly boolean GraphicAssembler True if the builder produces a graphic of WorldOverlay or ViewOerlay.
isSceneGraphic Accessor ReadOnly boolean GraphicAssembler True if the builder produces a graphic of GraphicType.Scene.
isViewBackground Accessor ReadOnly boolean GraphicAssembler True if the builder produces a graphic of ViewBackground.
isViewCoordinates Accessor ReadOnly boolean GraphicAssembler Whether the builder's geometry is defined in CoordSystem.View coordinates.
Only graphics of type ViewBackground or ViewOverlay are defined in view coordinates.
isWorldCoordinates Accessor ReadOnly boolean GraphicAssembler Whether the builder's geometry is defined in CoordSystem.World coordinates - the inverse of isViewCoordinates.

Defined in

Last Updated: 06 September, 2024