Class FlatHexShapeInfo<TCell>
Provides the implementation for AbstractShapeInfo to be used with FlatHexGrid.
public class FlatHexShapeInfo<TCell> : AbstractShapeInfo<FlatHexShapeInfo<TCell>, FlatHexGrid<TCell>, FlatHexPoint, FlatHexPoint, FlatHexOp<TCell>>, IShapeInfo<FlatHexShapeInfo<TCell>, FlatHexGrid<TCell>, FlatHexPoint, FlatHexPoint, FlatHexOp<TCell>>
Type Parameters
TCell
- Inheritance
-
AbstractShapeInfo<FlatHexShapeInfo<TCell>, FlatHexGrid<TCell>, FlatHexPoint, FlatHexPoint, FlatHexOp<TCell>>FlatHexShapeInfo<TCell>
- Implements
-
IShapeInfo<FlatHexShapeInfo<TCell>, FlatHexGrid<TCell>, FlatHexPoint, FlatHexPoint, FlatHexOp<TCell>>
- Inherited Members
- Extension Methods
Constructors
FlatHexShapeInfo(ShapeStorageInfo<FlatHexPoint>)
public FlatHexShapeInfo(ShapeStorageInfo<FlatHexPoint> info)
Parameters
info
ShapeStorageInfo<FlatHexPoint>
Methods
ArrayPointFromGridPoint(FlatHexPoint)
protected override ArrayPoint ArrayPointFromGridPoint(FlatHexPoint point)
Parameters
point
FlatHexPoint
Returns
EndGroup(FlatHexOp<TCell>)
Only call this method from within a FlatHexOp method (usually, in client code, this will be in an extension).
Since 1.1
public FlatHexShapeInfo<TCell> EndGroup(FlatHexOp<TCell> op)
Parameters
op
FlatHexOp<TCell>The operator on which this shape is defined.
Returns
- FlatHexShapeInfo<TCell>
GridPointFromArrayPoint(ArrayPoint)
protected override FlatHexPoint GridPointFromArrayPoint(ArrayPoint point)
Parameters
point
ArrayPoint
Returns
MakeOp(ShapeStorageInfo<FlatHexPoint>, Func<ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>>)
protected override FlatHexOp<TCell> MakeOp(ShapeStorageInfo<FlatHexPoint> shapeInfo, Func<ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>> combineInfo)
Parameters
shapeInfo
ShapeStorageInfo<FlatHexPoint>combineInfo
Func<ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>>
Returns
- FlatHexOp<TCell>
MakePoint(int, int)
protected override FlatHexPoint MakePoint(int x, int y)
Parameters
Returns
MakeShape(int, int, Func<FlatHexPoint, bool>, FlatHexPoint)
protected override FlatHexGrid<TCell> MakeShape(int x, int y, Func<FlatHexPoint, bool> isInside, FlatHexPoint offset)
Parameters
x
inty
intisInside
Func<FlatHexPoint, bool>offset
FlatHexPoint
Returns
- FlatHexGrid<TCell>
MakeShapeInfo(ShapeStorageInfo<FlatHexPoint>)
protected override FlatHexShapeInfo<TCell> MakeShapeInfo(ShapeStorageInfo<FlatHexPoint> shapeStorageInfo)
Parameters
shapeStorageInfo
ShapeStorageInfo<FlatHexPoint>
Returns
- FlatHexShapeInfo<TCell>