DynamicPolygonWithArbitraryPoints <Point>
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
publicconstructor
Type parameters
- Point: ArbitraryShapePoint<Point> = ArbitraryShapePoint
Parameters
_polygonPointsFactory: (controlPoints: Vertex3[]) => Vertex3[]
_polygonPointsValidator: undefined | (linePoints: Vertex3[]) => DynamicPolygonPointValidationResult
name: string
_api: BimCoreApi
pointFactory: DynamicPolygonPointFactoryHandler<DynamicPolygonPoint>
_controlPointFactory: ArbitraryShapePointFactoryHandler<Point>
recalculate2DEachFrame: boolean = false
optionalparent: TransformNode
optional_dragPointPositioningFunctionOrIndex: DragPointPositioningFunctionOrIndex
Returns DynamicPolygonWithArbitraryPoints<Point>
Properties
optional_head
publicoptionaldragPoint
isEnabled
publicreadonlyname
publicreadonlyonPointTrackableScreen
Accessors
publicmesh
Returns Mesh
the babylonjs mesh
Methods
publicapply
Applies changes which may have occured since the last time apply or build was called. When a control point is moved and then called, the shape of the polygon will be recalculated using the factory method provided in the constructor.
Returns void
publicbuild
Similar to build in DynamicPolygon, but instead of providing the points that define every edge of the polygon, this method takes in control points which when used in together with the factory method can create arbitrary sets of points to define polygons
Parameters
initialControlPoints: Vertex3[]
The control points used by the factory method provided in the constructor, for example the centre and radius point of a circle
transformPointsToLocal: boolean = true
Wheter to transform the points to the DynamicPolygon’s parent local space before using them to build
includeVirtualPoints: boolean = true
Wheter to create virtual points or not
Returns DynamicPolygonPointValidationResult
The DynamicPolygonPointValidationResult,
publicclear
Clears the polygon of all current polygon points and control points.
Returns void
publiccontrolPoints
Parameters
optionalpredicate: (p: DynamicPolygonPoint) => boolean
Returns Generator<DynamicPolygonPoint, void, unknown>
publicdispose
Disposes the DynamicPolygonWithArbitraryPoints. It is no longer useable after this call.
Returns void
publicsetMaterial
Sets the material of the underlying DynamicPolygon
Parameters
material: Material
Returns void
worldMatrix
Returns Matrix
Wrapper of DynamicPolygon to be able to create polygons that are any arbitrary shape such as circles, arrows etc.