Interface IVim<T>

Interface for a Vim object.

interface IVim<T extends IVimElement> {
    getAllElements(): T[];
    getBoundingBox(): Promise<Box3>;
    getElementFromIndex(element: number): T;
    getElementFromInstanceIndex(instance: number): T;
    getElementsFromId(id: number): T[];
}

Type Parameters

  • T extends IVimElement

    The type of element contained in the Vim.

Implemented by

Methods

  • Retrieves the element associated with the given index.

    Parameters

    • element: number

      The index of the element.

    Returns T

    The element corresponding to the element index, or undefined if not found.

  • Retrieves the element associated with the specified instance index.

    Parameters

    • instance: number

      The instance index of the of one of the instance included in the element.

    Returns T

    The object corresponding to the instance, or undefined if not found.

  • Retrieves the element associated with the specified id.

    Parameters

    • id: number

      The element ID to retrieve objects for.

    Returns T[]

    An array of element corresponding to the given id.