IFClite TypeScript API
    Preparing search index...

    Interface ViewpointOptions

    interface ViewpointOptions {
        bounds?: AABB;
        camera?: {
            mode: "perspective" | "orthographic";
            position?: [number, number, number];
            target?: [number, number, number];
            up?: [number, number, number];
        };
        components?: {
            coloring?: { color: string; components: { GlobalId: string }[] }[];
            selection?: { GlobalId: string }[];
            visibility?: {
                defaultVisibility?: boolean;
                exceptions?: { GlobalId: string }[];
            };
        };
        sectionPlane?: {
            axis: "x"
            | "y"
            | "z";
            enabled: boolean;
            flipped: boolean;
            position: number;
        };
        sectionPlanes?: {
            axis: "x"
            | "y"
            | "z";
            enabled: boolean;
            flipped: boolean;
            position: number;
        }[];
    }
    Index
    bounds?: AABB

    The model's overall axis-aligned bounding box, REQUIRED when sectionPlane.enabled is true — @ifc-lite/bcf needs it to convert a percentage-along-axis section plane into an absolute clipping-plane location, and nothing in the SDK's public surface (bim.viewer.*, bim.spatial.*) can compute a model's bounds (bim.spatial.queryBounds does the reverse: it queries entities inside an already-known box). Omitting bounds while sectionPlane.enabled is true throws MissingSectionBoundsError instead of silently dropping the clipping plane (#4251).

    camera?: {
        mode: "perspective" | "orthographic";
        position?: [number, number, number];
        target?: [number, number, number];
        up?: [number, number, number];
    }

    Camera state from bim.viewer.getCamera(). position/target/up are REQUIRED if camera is passed at all — createViewpoint() throws IncompleteCameraStateError rather than building a viewpoint with missing coordinates (#4251). bim.viewer.getCamera() returns only { mode } when no viewport is mounted (headless, or before first paint); callers in that situation must supply position/target/up themselves or omit camera.

    The SDK's CameraState carries no field-of-view (the renderer's real FOV isn't part of its public surface), so the viewpoint's FOV is always written as a fixed default (Math.PI / 4), matching the placeholder @ifc-lite/bcf itself uses for orthographic cameras.

    components?: {
        coloring?: { color: string; components: { GlobalId: string }[] }[];
        selection?: { GlobalId: string }[];
        visibility?: {
            defaultVisibility?: boolean;
            exceptions?: { GlobalId: string }[];
        };
    }

    Component selection/visibility

    sectionPlane?: {
        axis: "x" | "y" | "z";
        enabled: boolean;
        flipped: boolean;
        position: number;
    }

    Section plane from bim.viewer.getSection(). Requires bounds (below) when enabled is true — see bounds.

    sectionPlanes?: {
        axis: "x" | "y" | "z";
        enabled: boolean;
        flipped: boolean;
        position: number;
    }[]

    Every cutting plane from bim.viewer.getSections() (#7545): each enabled one becomes an entry of the viewpoint's ClippingPlanes, in order. Takes the place of sectionPlane when given, and needs bounds for the same reason.