/** * BIM feature-picking epic, Phase 2 — glTF scene-graph walk. `ScenegraphLayer` * (via the undocumented `@luma.gl/gltf` `createScenegraphsFromGLTF`) is what * actually renders 3D-Tiles glTF/glb/b3dm/i3dm content in this repo — NOT * the I3S-only `MeshLayer`/`content.featureIds` path (verified against * `@loaders.gl/3d-tiles`'s `getTileType()`: gltf/glb/b3dm/i3dm all map to * `TILE_TYPE.SCENEGRAPH`, and `@loaders.gl/i3s` isn't even installed here). * `pick-features` therefore only fast-paths the realistic single-element * case — one node, one mesh, one primitive — and walks that node's actual * transform (glTF node placement is independent of the tile's own 3D-Tiles * transform); anything else falls back to a plain, unmodified * `ScenegraphLayer` with zero rendering regression. */ import { Matrix4 } from "@math.gl/core"; interface GltfNode { mesh?: { primitives?: unknown[]; }; children?: GltfNode[]; matrix?: number[]; translation?: [number, number, number]; rotation?: [number, number, number, number]; scale?: [number, number, number]; } interface GltfScene { nodes?: GltfNode[]; } interface GltfLike { scene?: number | GltfScene; scenes?: GltfScene[]; } export interface ResolvedSinglePrimitive { primitive: unknown; /** This node's transform composed down from the scene root — glTF-internal placement, independent of the tile's own 3D-Tiles transform. */ worldMatrix: Matrix4; } /** * Walks the glTF's node hierarchy (starting at its default/only scene) and * returns EVERY {primitive, worldMatrix} pair, each carrying its own node's * transform composed down from the scene root. * * Multi-primitive content is the norm, not the exception: glTF allows exactly * one material per primitive, so a mesh with five materials is five * primitives. Real IFC exports split much further still — the Building- * Architecture sample converts to 14 nodes/14 primitives. Only single-material * content (photogrammetry tiles, for instance) resolves to one. */ export declare function resolvePrimitiveNodes(gltf: GltfLike): ResolvedSinglePrimitive[]; /** * The single-primitive special case, kept as its own entry point because * "exactly one primitive" is still a meaningful question (a caller that cannot * fan out wants to know). Returns null for anything more complex. */ export declare function resolveSinglePrimitiveNode(gltf: GltfLike): ResolvedSinglePrimitive | null; export {};