Table of Contents

Class CompoundMap<TPoint>

Namespace
Gamelogic.Grids
Assembly
Assembly-CSharp.dll

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>
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

leftMap IMap<TPoint>
transform Func<Vector2, Vector2>
inverseTransform Func<Vector2, Vector2>

Fields

inverseTransform

protected readonly Func<Vector2, Vector2> inverseTransform

Field Value

Func<Vector2, Vector2>

leftMap

protected readonly IMap<TPoint> leftMap

Field Value

IMap<TPoint>

transform

protected readonly Func<Vector2, Vector2> transform

Field Value

Func<Vector2, Vector2>

Methods

GetCellDimensions(TPoint)

Overrides this method to get custom Grid dimension calculations

public override Vector2 GetCellDimensions(TPoint point)

Parameters

point TPoint

Returns

Vector2

GridToWorld(TPoint)

This method maps a grid point to a world point.

public override Vector2 GridToWorld(TPoint point)

Parameters

point TPoint

Returns

Vector2

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