IFClite TypeScript API
    Preparing search index...

    Class CoordinateHandler

    Index
    • Calculate bounding box from all meshes (filtering out corrupted values)

      Parameters

      • meshes: MeshData[]

        Meshes to calculate bounds from

      • OptionalmaxCoord: number

        Optional max coordinate threshold (default: MAX_REASONABLE_COORD). NOTE: Not applied on the established sampling path (see below).

      Returns AABB

    • Calculate centroid (center point) from bounds

      Parameters

      Returns Vec3

    • Get current origin shift

      Returns Vec3

    • Check if coordinate shift is needed

      Parameters

      Returns boolean

    • Process a batch using authoritative WASM metadata when available.

      Native buffer streaming and adaptive native processing have no pre-pass decision and retain the legacy first-vertex vote. WASM callers set their authoritative frame first through setWasmMetadata.

      Parameters

      Returns void

    • Fast incremental path for trusted native batches.

      Desktop native streaming already emits site-local coordinates, so the JS layer does not need to re-run RTC detection, outlier filtering, or position shifting for every vertex. We only need lightweight bounds accumulation so the viewport can fit the camera while streaming.

      Parameters

      Returns void

    • Reset incremental state (for new file)

      Returns void

    • Record the world→render metadata the WASM pre-pass resolved for this model (issue #945): the length-unit scale and the RTC offset the mesh path actually subtracted. Pass rtcOffset: null when no shift was applied. Surfaced on the returned CoordinateInfo so external viewers can map externally-resolved geometry into the render frame. Exact provenance is strict. For compatibility, a legacy two-argument call with a non-finite offset remains non-throwing but publishes no wasmRtcFrame.

      Parameters

      • lengthUnitScale: number | undefined
      • rtcOffset: Vec3 | null
      • OptionalexactFrame: RtcFrame

      Returns void

    • Shift bounds by subtracting origin shift

      Parameters

      Returns AABB

    • Shift positions in-place by subtracting origin shift Corrupted values are set to 0 (center of shifted coordinate system)

      Parameters

      • positions: Float32Array

        Position array to modify

      • shift: Vec3

        Origin shift to subtract

      • Optionalthreshold: number

        Optional threshold for valid coordinates (defaults to MAX_REASONABLE_COORD)

      Returns void

    • Convert world coordinates to local (shifted) coordinates

      Parameters

      Returns Vec3

    • Convert local (shifted) coordinates back to world coordinates

      Parameters

      Returns Vec3