Class ChannelGrid
A multi-layered grid that associates multiple typed buffers (channels) with a single spatial domain.
Inherited Members
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. |