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