@equinor/videx-3d
    Preparing search index...

    Type Alias OceanBoxFromSurfaceOptions

    type OceanBoxFromSurfaceOptions = {
        fillDepth?: number;
        maxError?: number;
        nullValue?: number;
        referenceDepth?: number;
        rimSmoothing?: number;
        surfaceSegments?: number | Vec2;
    }
    Index

    Properties

    fillDepth?: number

    Depth used to fill internal holes (invalid samples fully enclosed by valid data) so the box stays watertight. Invalid samples connected to the grid border are treated as outside the surface footprint (the outer rim) and are left as holes, so the sea bed follows the true surface outline. Defaults to the deepest (maximum) valid sample in values.

    maxError?: number

    Sea-bed TIN simplification error (meters) passed to the triangulator. Default 5.

    nullValue?: number

    Value marking missing/hole samples in values. Default -1.

    referenceDepth?: number

    Reference depth (datum) of the input values, in meters. Surface grids are often stored depth-normalized — e.g. as referenceDepth - trueDepth (the convention used by this repo's IRAP parser, where referenceDepth is the surface's maximum/deepest sample) — so the shallowest sample sits at 0 instead of its true depth below sea level. When set, the true positive-down depth of each sample is recovered as referenceDepth - value before the bed and walls are built, so the sea bed sits at its real depth (matching the Surface component). Leave undefined when values already hold true, positive-down depths (the bed is then built directly from them).

    rimSmoothing?: number

    Optional rim smoothing strength. 0 (default) keeps the grid-aligned rim, which can look pixelated since the surface follows a regular grid; 13 progressively smooth it. The outline (rim) vertices of the water surface and sea bed are filtered with a windowed moving average whose window grows with this value, so long staircase runs collapse onto their straight centre line and the rim reads as one continuous curve (rather than a chain of small arcs). Only the X/Z position of the existing boundary vertices is moved — their depth (Y), the sea-bed TIN and every interior vertex are left untouched, so bathymetry detail (and the triangulator's efficiency) is preserved.

    surfaceSegments?: number | Vec2

    Target water-surface tessellation (a single number for both axes, or [X, Z]). The default 0 builds the surface from the same simplified triangulation as the sea bed, flattened to y = 0 — the fewest triangles that still trace the surface outline (the waves are shaded per-pixel, so no interior grid is needed). A positive value instead lays down a regular grid at that density, clipped to and stitched to the exact data outline (which is kept intact), so the interior is uniform — useful only when the surface is vertex-displaced. The rim is shared with the walls and bed either way. Default 0.