Skip to main content

DynamicPolygonWithArbitraryPoints <Point>

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

Implements

Index

Constructors

publicconstructor

Properties

optional_head

publicoptionaldragPoint

dragPoint?: Point

isEnabled

isEnabled: boolean

publicreadonlyname

name: string

publicreadonlyonPointTrackableScreen

onPointTrackableScreen: Observable<TrackCoordinate2D<Point>>

Accessors

publicmesh

  • get mesh(): Mesh

  • Returns Mesh

    the babylonjs mesh

Methods

publicapply

  • apply(): void
  • 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

  • clear(): void
  • Clears the polygon of all current polygon points and control points.


    Returns void

publiccontrolPoints

publicdispose

  • dispose(): void

publicsetMaterial

  • setMaterial(material: Material): void
  • Sets the material of the underlying DynamicPolygon


    Parameters

    • material: Material

    Returns void

worldMatrix

  • worldMatrix(): Matrix
  • Returns Matrix