Class DataGrid<T>
Generic 3D grid structure storing non-semantic per-voxel data of an unmanaged type.
Inherited Members
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. |