Class CompoundMap<TPoint>
A maps that combines two maps through function composition.
[Version(1, 0, 0)]
public class CompoundMap<TPoint> : AbstractMap<TPoint>, IMap<TPoint>, IGridToWorldMap<TPoint> where TPoint : IGridPoint<TPoint>
Type Parameters
TPoint
- Inheritance
-
AbstractMap<TPoint>CompoundMap<TPoint>
- Implements
-
IMap<TPoint>IGridToWorldMap<TPoint>
- Derived
- Inherited Members
- Extension Methods
Constructors
CompoundMap(IMap<TPoint>, Func<Vector2, Vector2>, Func<Vector2, Vector2>)
public CompoundMap(IMap<TPoint> leftMap, Func<Vector2, Vector2> transform, Func<Vector2, Vector2> inverseTransform)
Parameters
Fields
inverseTransform
protected readonly Func<Vector2, Vector2> inverseTransform
Field Value
leftMap
protected readonly IMap<TPoint> leftMap
Field Value
- IMap<TPoint>
transform
protected readonly Func<Vector2, Vector2> transform
Field Value
Methods
GetCellDimensions(TPoint)
Overrides this method to get custom Grid dimension calculations
public override Vector2 GetCellDimensions(TPoint point)
Parameters
point
TPoint
Returns
GridToWorld(TPoint)
This method maps a grid point to a world point.
public override Vector2 GridToWorld(TPoint point)
Parameters
point
TPoint
Returns
RawWorldToGrid(Vector2)
This method maps a world point to a grid point, assuming that the anchor point is centered in the cell.This will allow the index accessors[] to give correct results for any anchoring.
public override TPoint RawWorldToGrid(Vector2 point)
Parameters
point
Vector2
Returns
- TPoint