Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MarkupModel

This class can be used to add markup items to a visualization.

Hierarchy

Index

Constructors

constructor

Accessors

ignoreViewClipping

ignoreViewClipping: boolean

Enable or disable option to ignore view clipping in this model

name

name: string

Name of the markup model.

Readonly partCount

partCount: number

The number of parts in the model.

Methods

addArrowsPart

  • Adds a part for drawing points. Use the returned PartPoints to add points to the new part.

    Returns PartArrows

addImageLabelPart

  • Add a part with an image attached to a 3d coordinate

    Returns PartImageLabel

addIndexedTrianglesPart

addLabelsPart

  • Adds a part containing positioned text labels to the markup model. Use the returned PartLabels to add text labels to the new part.

    Returns PartLabels

addPointsPart

  • Adds a part for drawing points. Use the returned PartPoints to add points to the new part.

    Returns PartPoints

addTexturedIndexedTrianglesPart

deleteAllParts

  • deleteAllParts(): void
  • Deletes all parts in model

    Returns void

deletePart

  • deletePart(part: Part): boolean
  • Delete the given part if present.

    Returns true if the part was found and deleted, false if not.

    Parameters

    Returns boolean

deletePartAt

  • deletePartAt(partIndex: number): void
  • Deletes the part at the given (zero-based) index.

    Parameters

    • partIndex: number

    Returns void

getBoundingBox

getPartAt

  • getPartAt(partIndex: number): Part
  • Returns an active reference to the part at the given (zero-based) index.

    Parameters

    • partIndex: number

    Returns Part

rayIntersect

  • rayIntersect(ray: Ray, ignoreLabels?: boolean): HitItem
  • Performs picking on the model.

    If something was hit, returns a HitItem containing information about the part and primitive that was hit.

    If nothing was hit, returns null.

    Labels have a "special treatment" ray intersect where hitting the label will cause a hit on the label attachment point. This is not always what is intended, e.g. when doing zoom to cursor. Set ignoreLabels to true to skip labels when doing ray intersect.

    Parameters

    • ray: Ray
    • Default value ignoreLabels: boolean = false

    Returns HitItem

Generated using TypeDoc