Class DSparseGrid3<ElemType>
Dynamic sparse 3D grid. Idea is that we have grid of some type of object
and we don't want to pre-allocate full grid of them. So we allocate on-demand.
This can be used to implement multi-grid schemes, eg for example the GridElement
type could be Bitmap3 of a fixed dimension.
Inheritance
DSparseGrid3<ElemType>
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class DSparseGrid3<ElemType> : IGrid3 where ElemType : class, IGridElement3
Type Parameters
Name |
Description |
ElemType |
|
Constructors
DSparseGrid3(ElemType)
Must provide a sample instance of the element type that we can Duplicate()
to make additional copies. Should be no data in here
Declaration
public DSparseGrid3(ElemType toDuplicate)
Parameters
Type |
Name |
Description |
ElemType |
toDuplicate |
|
Properties
BoundsInclusive
returns integer-aabb where indices range from min,max
Declaration
public AxisAlignedBox3i BoundsInclusive { get; }
Property Value
Count
Declaration
public int Count { get; }
Property Value
Density
Declaration
public double Density { get; }
Property Value
Dimensions
Declaration
public Vector3i Dimensions { get; }
Property Value
Methods
Allocated()
Declaration
public IEnumerable<KeyValuePair<Vector3i, ElemType>> Allocated()
Returns
AllocatedIndices()
Declaration
public IEnumerable<Vector3i> AllocatedIndices()
Returns
Free(Vector3i)
Declaration
public bool Free(Vector3i index)
Parameters
Returns
FreeAll()
Declaration
Get(Vector3i, Boolean)
Declaration
public ElemType Get(Vector3i index, bool allocateIfMissing = true)
Parameters
Returns
Type |
Description |
ElemType |
|
Has(Vector3i)
Declaration
public bool Has(Vector3i index)
Parameters
Returns
Implements