Class RectMap
Maps between RectPoints grid points and Vector2 world points.
[Version(1, 0, 0)]
public class RectMap : AbstractMap<RectPoint>, IMap<RectPoint>, IGridToWorldMap<RectPoint>
- Inheritance
-
RectMap
- Implements
- Inherited Members
- Extension Methods
Constructors
RectMap(Vector2)
public RectMap(Vector2 cellDimensions)
Parameters
cellDimensions
Vector2
Methods
GridToWorld(RectPoint)
This method maps a grid point to a world point.
public override Vector2 GridToWorld(RectPoint point)
Parameters
point
RectPoint
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 RectPoint RawWorldToGrid(Vector2 point)
Parameters
point
Vector2