ZLab.Discrete ZLab.Discrete
ZLab.Discrete ZLab.Discrete
Developed by Zeke Zhang

Search Results for

    Edit this page

    Method ForEachVoxel

    | Edit this page View Source

    ForEachVoxel<T>(IGrid<T>, Action<Vector3, T>)

    Enumerate all voxels in the grid, invoking the given action for each voxel.

    Declaration
    public static void ForEachVoxel<T>(this IGrid<T> g, Action<Vector3, T> action)
    Parameters
    Type Name Description
    IGrid<T> g

    The grid to enumerate.

    Action<Vector3, T> action

    Action to invoke for each voxel, with parameters (position, value)

    Type Parameters
    Name Description
    T
    Remarks

    x-fastest iteration order.

    grid.ForEachVoxel((pos, val) => {/* ... */});