ProtoTwin API
    Preparing search index...

    Class Selection

    Entity selection.

    Hierarchy (View Summary)

    Implements

    Index

    Accessors

    • get empty(): boolean

      Whether the selection is empty.

      Returns boolean

    • get length(): number

      The number of entities selected.

      Returns number

    • get subscribed(): boolean

      Whether there are any subscribers.

      Returns boolean

    Methods

    • Iterator for selected entities.

      Returns Iterator<Entity>

    • Selects the specified entity.

      Parameters

      Returns boolean

      True if the entity was selected, false otherwise.

    • Retrieves the selected entity at the specified index.

      Parameters

      • index: number

        The index.

      Returns Entity

      The selected entity.

    • Calculates the world bounding box for the selection.

      Returns Aabb

      The world bounding box.

    • Clears the selection, deselecting all entities.

      Returns void

    • Determines whether the specified entity is selected.

      Parameters

      Returns boolean

      True if the entity is selected, false otherwise.

    • Deselects the specified entity.

      Parameters

      Returns boolean

      True if the entity was deselected, false otherwise.

    • Sets the selection to the specified list of entities.

      Parameters

      • entities: readonly Entity[]

        The entities to be selected.

      Returns void

      Any entities currently selected will first be deselected.