Struct LayeredPoint<TPoint>
A point that represent cells in a LayeredGrid.
[Version(1, 8, 0)]
public struct LayeredPoint<TPoint> : IGridPoint<LayeredPoint<TPoint>>, IEquatable<LayeredPoint<TPoint>>, IGridPoint where TPoint : IGridPoint<TPoint>
Type Parameters
TPoint
- Implements
-
IGridPoint<LayeredPoint<TPoint>>IEquatable<LayeredPoint<TPoint>>
- Inherited Members
- Extension Methods
Constructors
LayeredPoint(TPoint, int)
public LayeredPoint(TPoint point, int layer)
Parameters
point
TPointlayer
int
Properties
Layer
public int Layer { get; }
Property Value
Point
public TPoint Point { get; }
Property Value
- TPoint
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(LayeredPoint<TPoint>)
The lattice distance between two points.
Two points should have a distance of 1 if and only if they are neighbors.
public int DistanceFrom(LayeredPoint<TPoint> other)
Parameters
other
LayeredPoint<TPoint>
Returns
Equals(LayeredPoint<TPoint>)
public bool Equals(LayeredPoint<TPoint> other)
Parameters
other
LayeredPoint<TPoint>
Returns
ToString()
public override string ToString()