Class SplicedMap<TBasePoint>
A one-way map that can be used to make maps for arbitrary spliced grids, where each point is mapped to the base point location, plus an offset, where each index has a different offset.
For example, if the spliced grid is a diamond grid, with each cell spliced into a top and bottom triangle, then the two offsets will be above and below the origin (for example, (0, 1) and(0, -1)).
[Version(1, 8, 0)]
public class SplicedMap<TBasePoint> : IGridToWorldMap<SplicedPoint<TBasePoint>> where TBasePoint : IGridPoint<TBasePoint>
Type Parameters
TBasePoint
- Inheritance
-
SplicedMap<TBasePoint>
- Implements
-
IGridToWorldMap<SplicedPoint<TBasePoint>>
- Inherited Members
- Extension Methods
Constructors
SplicedMap(IGridToWorldMap<TBasePoint>, IEnumerable<Vector2>)
public SplicedMap(IGridToWorldMap<TBasePoint> baseMap, IEnumerable<Vector2> offsets)
Parameters
baseMapIGridToWorldMap<TBasePoint>offsetsIEnumerable<Vector2>
Properties
this[SplicedPoint<TBasePoint>]
Gets a world point given a grid point.
public Vector2 this[SplicedPoint<TBasePoint> point] { get; }
Parameters
pointSplicedPoint<TBasePoint>