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

Search Results for

    Edit this page

    Interface IGrid<T>

    A 3D spatial grid that maps 3D coordinates to stored values.

    Inherited Members
    IGridMeta.Meta
    Namespace: ZLab.Discrete.Grids
    Assembly: ZLab.Discrete.dll
    Syntax
    public interface IGrid<T> : IGridMeta
    Type Parameters
    Name Description
    T

    The type of values stored in the grid.

    Methods

    Name Description
    GetArrayUnsafe()

    Get internal data array.

    GetBuffer()

    Gets a span of the underlying buffer storing the grid values for direct manipulation.

    GetReadOnlyBuffer()

    Gets a read-only span of the underlying buffer storing the grid values.

    GetReadOnlyMemory()

    Gets a read-only memory representation of the underlying buffer storing the grid values.

    GetValue((int x, int y, int z))

    Gets the value stored at the specified 3D index.

    SetValue(ReadOnlySpan<T>)

    Updates the entire grid's values using a read-only span. The length of the input span must match the expected size based on the grid metadata.

    SetValue((int x, int y, int z), T)

    Sets the value at the specified 3D index.

    Extension Methods

    GridEnumeratorExtension.ForEachVoxelParallel<T>(IGrid<T>, Action<Vector3, T>, int?)
    GridEnumeratorExtension.ForEachVoxel<T>(IGrid<T>, Action<Vector3, T>)
    GridSerializer.SerializeJson<T>(IGrid<T>)
    GridSerializer.SerializeMetadataOnly<T>(IGrid<T>)