Struct SplicedPoint<TBasePoint>
A point that can be use that access a generic SplicedGrid. It has two components, a base point (which is another grid point), and a splice index. Note that for these points to be truly immutable, the base point on which they are based must also be immutable.
public struct SplicedPoint<TBasePoint> : IGridPoint<SplicedPoint<TBasePoint>>, IEquatable<SplicedPoint<TBasePoint>>, IGridPoint where TBasePoint : IGridPoint<TBasePoint>
Type Parameters
TBasePoint
- Implements
-
IGridPoint<SplicedPoint<TBasePoint>>IEquatable<SplicedPoint<TBasePoint>>
- Inherited Members
- Extension Methods
Constructors
SplicedPoint(TBasePoint, int, int)
public SplicedPoint(TBasePoint basePoint, int index, int spliceCount)
Parameters
Properties
BasePoint
public TBasePoint BasePoint { get; }
Property Value
- TBasePoint
I
public int I { get; }
Property Value
SpliceCount
For spliced grids, this is the number of slices for all points.
For Uniform grids, this is always 1.
public int SpliceCount { get; }
Property Value
SpliceIndex
For spliced grids, this is the index of the splice.
For Uniform grids, this is always 0.
public int SpliceIndex { get; }
Property Value
Methods
DistanceFrom(SplicedPoint<TBasePoint>)
This method is not implemented for generic grids.
You have to override this method in a base class, and provide a suitable implementation for your grid.
public int DistanceFrom(SplicedPoint<TBasePoint> other)
Parameters
other
SplicedPoint<TBasePoint>
Returns
Equals(SplicedPoint<TBasePoint>)
public bool Equals(SplicedPoint<TBasePoint> other)
Parameters
other
SplicedPoint<TBasePoint>
Returns
ToString()
public override string ToString()