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

    Function buildMaskedGridPlane

    • Build a flat plane at y = 0 covering the cells of a regular grid for which a present predicate holds at all four corners, so the plane follows the outline of an arbitrary (possibly holed) footprint rather than a plain rectangle. Unused grid vertices are dropped (compacted) so the result can be cheaply subdivided afterwards. UVs span [0, 1] across the full grid extent.

      Parameters

      • nx: number

        number of columns of grid vertices

      • ny: number

        number of rows of grid vertices

      • cellW: number

        column spacing in world units

      • cellH: number

        row spacing in world units

      • present: (c: number, r: number) => boolean

        (c, r) => boolean, whether the grid vertex at column c, row r lies inside the footprint

      • originX: number = 0

        world X of column 0 (default 0)

      • originZ: number = 0

        world Z of row 0 (default 0)

      Returns BufferGeometry