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

    Class BimMeshImportController<TViewer>

    Makes the scene's objects from the files a SceneLoader loads (see the engine's ObjectImportController): a BimMesh per uuid read, with or without geometry, under its parent (InputMesh.parentUuid, a root without one), and links to it each engine object added, as the geometry type of its input's tag (see GeometryType). Leaves out the duplicates: an object read in a geometry type its uuid has in the scene, or that a load kept and did not add yet. Subclass it to change the objects read (e.g. their uuid, their tag), calling the base methods.

    An object read before its parent (e.g. in another page of the same model) waits out of the scene, its engine objects linked but hidden, until its parent is added, which adds it under it (and its own waiting children). A loading carries a whole hierarchy: those whose parent never came are dropped once it is over (endLoading).

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _viewer: TViewer
    onMeshLoaded: MeshLoadedCallback | null

    Called while each object loads (see MeshLoadedCallback); null: none.

    Methods

    • Releases what it holds (see endLoading); called by the SceneLoader when disposed.

      Returns void

    • Called by the SceneLoader once a loading is over: forgets the objects kept and never added (their files failed, or the loading was stopped), and drops those still waiting for their parent, their engine objects removed (logged).

      Returns void

    • The objects without geometry to add before the files are read (e.g. the nodes of a hierarchy the files do not hold), parents first; told read (see onObjectRead).

      Returns Iterable<InputMesh>

    • Links the engine object to its BimMesh (see BimMesh.setGeometryProxy), then calls onMeshLoaded. An object whose BimMesh is no longer there (deleted while it loaded) has its engine object removed.

      Parameters

      Returns void

    • Makes the object's BimMesh at its uuid's first (onMeshLoaded then): added under its parent, or waiting for it (see the class); with geometry, keeps the object until added.

      Parameters

      Returns void

    • Called when the loader's checks leave out a kept object (invalid, missingGeometry, see SkipReason), e.g. to forget it was kept. Not called for the objects shouldKeepObject rejects, nor for those of a file that fails (see LoadProgress.errors). Do not keep input: its parts hold the geometry buffers. Default: nothing.

      Parameters

      Returns void

    • Called by the SceneLoader before the loading starts.

      Parameters

      • Optionalsignal: AbortSignal

        Aborted when the loading is stopped.

      Returns Promise<void>

    • Whether the object is added to the scene; false leaves it out, listed in LoadProgress.skipped with the reason rejected. Default: true.

      Parameters

      Returns boolean

    • Changes the object before it is checked, e.g. its uuid, its name or its parts' materials. Default: nothing.

      Parameters

      Returns void