Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDrawingToolsApi

Hierarchy

  • IDrawingToolsApi

Implemented by

Index

Properties

closed: boolean

Check if the drawing tool is closed.

pointsData: PointsData

The points data of the drawing tool.

restrictions: {}

The restrictions of the drawing tool.

Type declaration

showDistanceLabels: boolean

Show the distance labels of the drawing tool.

showPointLabels: boolean

Show the point labels of the drawing tool.

Methods

  • addPoint(index: number, position?: vec3): void
  • Add a point to the drawing tool.

    Parameters

    • index: number

      The index of the point in the position array.

    • Optional position: vec3

      The position of the point.

    Returns void

  • Add a ray tracing intersection restriction to the drawing tool.

    Parameters

    Returns undefined | IRestrictionApi

    The api of the restriction.

  • canRedo(): boolean
  • Check if the drawing tool can redo the last action.

    Returns boolean

  • canUndo(): boolean
  • Check if the drawing tool can undo the last action.

    Returns boolean

  • cancel(): void
  • Cancel the drawing tool.

    Returns void

  • close(): void
  • Close the drawing tool.

    Returns void

  • redo(): void
  • Redo the last action of the drawing tool.

    Returns void

  • removePoint(index: number): void
  • Remove a point from the drawing tool.

    Parameters

    • index: number

      The index of the point in the position array.

    Returns void

  • removeRestriction(id: string): void
  • Remove a restriction from the drawing tool.

    Parameters

    • id: string

    Returns void

  • undo(): void
  • Undo the last action of the drawing tool.

    Returns void

  • Receive an update of the drawing tool.

    Returns undefined | PointsData

    The points data of the drawing tool.