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

Search Results for

    Edit this page

    Class DataGrid<T>

    Generic 3D grid structure storing non-semantic per-voxel data of an unmanaged type.

    Inheritance
    object
    LicensedBase
    GridBase
    DataGrid<T>
    Implements
    IGrid<T>
    IGridMeta
    Inherited Members
    GridBase.Meta
    GridBase.Bounds
    GridBase.UpdateMeta(GridMeta)
    GridBase.TryGetLinearIndex((int x, int y, int z), out int)
    GridBase.Contains((int x, int y, int z))
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ZLab.Discrete.Grids
    Assembly: ZLab.Discrete.dll
    Syntax
    public sealed class DataGrid<T> : GridBase, IGrid<T>, IGridMeta where T : unmanaged
    Type Parameters
    Name Description
    T

    The type of values stored in the grid.

    Constructors

    Name Description
    DataGrid(Vector3, BBox, int)

    Constructs a DataGrid with the specified voxel size and bounds.

    DataGrid(GridMeta)

    Initialize an empty DataGrid with the existing metadata.

    DataGrid(GridMeta, ReadOnlySpan<T>)

    Constructs a DataGrid wrapping an existing data buffer.

    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 at the specified 3D index in the grid.

    SetValue(ReadOnlySpan<T>)

    Updates the entire grid's values using a read-only span.

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

    Sets the value at the specified 3D index in the grid.

    Extension Methods

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