@twinfinity/core
    Preparing search index...

    Class DynamicPolygonWithArbitraryPoints<Point>

    Wrapper of DynamicPolygon to be able to create polygons that are any arbitrary shape such as circles, arrows etc.

    Type Parameters

    Implements

    Index

    Constructors

    Properties

    dragPoint?: Point
    isEnabled: boolean
    name: string
    onPointTrackableScreen: Observable<TrackCoordinate2D<Point>>

    Accessors

    • get mesh(): Mesh

      Returns Mesh

      the babylonjs mesh

    Methods

    • 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

    • 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,

    • Clears the polygon of all current polygon points and control points.

      Returns void

    • Sets the material of the underlying DynamicPolygon

      Parameters

      • material: Material

      Returns void