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

Search Results for

    Edit this page

    Class ChannelGrid

    A multi-layered grid that associates multiple typed buffers (channels) with a single spatial domain.

    Inheritance
    object
    LicensedBase
    GridBase
    ChannelGrid
    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)
    Namespace: ZLab.Discrete.Grids
    Assembly: ZLab.Discrete.dll
    Syntax
    public sealed class ChannelGrid : GridBase
    Remarks

    Provides spatial organization and metadata, while granting typed access to its constituent buffers.

    Constructors

    Name Description
    ChannelGrid(Vector3, BBox)

    Constructs a ChannelGrid with the specified voxel size and bounds.

    ChannelGrid(Vector3, BBox, int)

    Constructs a ChannelGrid with the specified voxel size, bounds, and padding.

    ChannelGrid(GridMeta)

    Constructs a ChannelGrid from an existing GridMeta.

    Properties

    Name Description
    ChannelCount

    Get the number of channels in the grid

    Methods

    Name Description
    AddChannel<T>(string)

    Adds a new empty channel to the grid. Length equals grid count.

    AddChannel<T>(string, ReadOnlySpan<T>)

    Adds a new channel to the grid with initialized data.

    Clone()

    Deep copy of the grid, including all channels and their data.

    GetChannel(string)

    Retrieve untyped channel for inspection/serialization

    GetChannelNames()

    Get all channel names in the grid

    GetChannel<T>(string)

    Retrieve typed channel

    GetChannels()

    Get all channels in the grid

    HasChannel(string)

    Checks if a channel with the specified name exists in the grid.

    RemoveChannel(string)

    Removes the channel with the specified name from the grid, if it exists.

    ToString()

    String representation of the ChannelGrid.

    TryGetChannel(string, out IGridBuffer?)

    Retrieves an untyped channel by name. Returns false if missing.

    TryGetChannel<T>(string, out GridBuffer<T>?)

    Retrieves a typed channel by name. Returns false if missing or type mismatch.

    Extension Methods

    ChannelGridConversionExtensions.SetChannel(ChannelGrid, string, DistanceGrid)
    ChannelGridConversionExtensions.SetChannel(ChannelGrid, string, OccupancyGrid)
    ChannelGridConversionExtensions.SetChannel<T>(ChannelGrid, string, DataGrid<T>)
    ChannelGridConversionExtensions.SetChannel<T>(ChannelGrid, string, T)
    ChannelGridConversionExtensions.ToDataGrid<T>(ChannelGrid, string)
    ChannelGridConversionExtensions.ToDistanceGrid(ChannelGrid, string)
    ChannelGridConversionExtensions.ToOccupancyGrid(ChannelGrid, string)
    GridSerializer.SerializeBinary(ChannelGrid)
    GridSerializer.SerializeChannelDataOnly(ChannelGrid)
    GridSerializer.SerializeChannelMetadataOnly(ChannelGrid)