Documentation - v20.0.0-dev
    Preparing search index...

    Controller of the measure lines: its objects are their MeasureLineAnchors, each an engine object of the scene's MeshController (its head and the segment before it), and their sprites engine sprites. Made by the MeasureLinePlugin; makes the lines and anchors (createMeasureLine, createAnchor), added by their commands. Adding or removing an anchor inserts it in its line or takes it out (at its saved index, for undo), the ends of the line drawn as arrows. Sizes the sprites from the camera, as it moves.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _objects: Map<string, MeasureLineAnchor> = ...
    _viewer: Viewer
    ignoreViewportRenderMode: false

    Indicates whether the mesh controller should ignore the render mode changes of the viewport

    isMeasureLineController: true
    isSceneMeshController: true
    isSceneObjectController: true
    signals: {
        onObjectAdded: Signal<(object: MeasureLineAnchor) => void>;
        onObjectRemoved: Signal<(object: MeasureLineAnchor) => void>;
        onObjectSelectedChanged: Signal<(object: MeasureLineAnchor) => void>;
        onObjectUpdated: Signal<(object: MeasureLineAnchor) => void>;
        onObjectVisibilityChanged: Signal<(object: MeasureLineAnchor) => void>;
        onVisibilityChanged: Signal<() => void>;
    } = ...

    Type Declaration

    Accessors

    • get count(): number

      Controller objects count

      Returns number

    • get firstObject(): TObject | null

      Returns TObject | null

    • get renderState(): MeshRenderState

      How all its objects are drawn, over each one's own state (see MeshRenderState).

      Returns MeshRenderState

    • get uuids(): MapIterator<string>

      Iterator over all the uuids contained in the controller.

      Returns MapIterator<string>

    • get visible(): boolean

      Returns boolean

    • set visible(value: boolean): void

      Controller visibility (independant from object own visibility).

      Hiding a controller will hide all its children without modifying their own visibility.

      Parameters

      • value: boolean

      Returns void

    Methods

    • Shows or hides the anchors and the sprites.

      Parameters

      • value: boolean

      Returns void

    • Adds back a whole line removed by removeMeasureLine, its anchors kept.

      Parameters

      Returns void

    • Inserts the anchor in its line (at its saved index, else last), then adds it.

      Parameters

      Returns void

    • Whether count objects more can be added: always, but where a limit holds (e.g. planes).

      Parameters

      • count: number

      Returns boolean

    • Clears all objects from the controller

      Returns void

    • A new anchor of measureLine, not added: its command adds it (addObject).

      Parameters

      • measureLine: MeasureLine
      • Optionalindex: number

        Where it is inserted in its line; last by default.

      Returns MeasureLineAnchor

    • A new measure line, without anchors.

      Returns MeasureLine

    • Removes its objects' engine objects from the engine scene, then disposes them.

      Returns void

    • The uuids of the hidden objects of this controller.

      Returns string[]

    • The uuids of the objects of this controller: the iterator of its map, no copy.

      Returns MapIterator<string>

    • The uuids of the visible objects of this controller.

      Returns string[]

    • Returns whether the controller has the given uuid

      Parameters

      • uuid: string

      Returns boolean

    • Appends where a ray hits its objects drawn outside the engine to target, those options.filter keeps; none by default. Its engine objects (meshes, sprites, planes) are hit by ViewerRaycaster.raycast, which calls it: a controller drawing objects of its own overrides it.

      Parameters

      • ray: Ray

        World frame.

      • camera: Camera

        The camera the ray goes through, its world matrices as last drawn.

      • options: ViewerRaycastOptions

        The query's options.

      • target: SceneIntersection[]

        The hits of the query, appended to (the raycaster sorts them).

      Returns void

    • Removes a whole line, its anchors kept in it to add it back (addMeasureLine).

      Parameters

      Returns void

    • Draws all its objects as renderState says, combined with each one's own state, kept (see MeshRenderState); nothing when it is unchanged.

      Parameters

      Returns void

    • Sizes every sprite from the camera: called as it moves.

      Returns void