IFClite TypeScript API
    Preparing search index...

    Interface ViewerBackendMethods

    interface ViewerBackendMethods {
        addSection?(section: SectionPlane): string | null;
        colorize(refs: EntityRef[], color: RGBAColor): void;
        colorizeAll(batches: { color: RGBAColor; refs: EntityRef[] }[]): void;
        flyTo(refs: EntityRef[]): void;
        getCamera(): CameraState;
        getRenderFrameOffset?(): [number, number, number];
        getSection(): SectionPlane | null;
        getSections?(): SectionPlane[];
        removeSection?(id: string): boolean;
        resetColors(refs?: EntityRef[]): void;
        setCamera(state: Partial<CameraState>): void;
        setSection(section: SectionPlane | null): void;
        setSections?(sections: SectionPlane[]): void;
    }
    Index
    • Translation from the frame getCamera()/setCamera() work in to the IFC world coordinates of the loaded model(s), [x, y, z] in IFC Z-up metres. A viewer shifts large-coordinate (georeferenced) models towards the origin before drawing them, so its camera is not in world coordinates; bim.bcf.createViewpoint() adds this offset and bim.bcf.extractViewpointState() subtracts it, so BCF viewpoints are in world coordinates as the BCF standard requires (#4879). Optional: a backend without a shifted frame omits it, which means no offset.

      Returns [number, number, number]

    • Parameters

      • id: string

      Returns boolean

    • Omitted refs reset all overrides; an explicit empty list is a no-op.

      Parameters

      Returns void

    • Several cutting planes; optional, bim.viewer falls back to setSection / getSection.

      Parameters

      Returns void