Table of Contents

Class Map

Namespace
Gamelogic.Grids2
Assembly
Assembly-CSharp.dll

Provides methods for creating and manipulating maps.

public static class Map
Inheritance
Map
Inherited Members

Methods

AddForward<TInput, TOutput>(IReverseMap<TInput, TOutput>, IForwardMap<TInput, TOutput>)

Creates a Combined Map. This map use the forward map to call the Forward method and the base map to call the Reverse Map.

AddReverse<TInput, TOutput>(IForwardMap<TInput, TOutput>, IReverseMap<TInput, TOutput>)

Creates a Combined Map. This map use the reverse map to call the Reverse method and the base map to call the Forward Map.

AlignGridHorizontal(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds, HorizontalAlignment)

Returns a Map that translate in such a way that it is aligned horizontally according to the given alignment.

AlignGridInRect<TPoint>(IMap<Vector3, Vector3>, IExplicitShape<TPoint>, Func<TPoint, Vector3>, Func<TPoint, Vector3>, Bounds, HorizontalAlignment, VerticalAlignment)

It returns a Map that translate in such a way that it is aligned horizontally and vertically according to the given alignment.

AlignGridVertical(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds, VerticalAlignment)

It returns a Map that translate in such a way that it is aligned vertically according to the given alignment.

AnchorPivotHorizontal(IMap<Vector3, GridPoint3>, IExplicitShape<GridPoint3>, Func<GridPoint3, Vector3>, HorizontalAlignment)

It returns a Map that translate in such a way that it is aligned horizontally according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.

AnchorPivotInRect(IMap<Vector3, GridPoint3>, IExplicitShape<GridPoint3>, Func<GridPoint3, Vector3>, HorizontalAlignment, VerticalAlignment)

It returns a Map that translate in such a way that it is aligned horizontally and vertically according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.

AnchorPivotInRect<TPoint>(IMap<Vector3, Vector3>, IExplicitShape<TPoint>, Func<TPoint, Vector3>, HorizontalAlignment, VerticalAlignment)

It returns a Map that translate in such a way that it is aligned horizontally and vertically according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.

AnchorPivotVertical(IMap<Vector3, GridPoint3>, IExplicitShape<GridPoint3>, Func<GridPoint3, Vector3>, VerticalAlignment)

It returns a Map that translate in such a way that it is aligned vertically according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.

Block(Vector3)

Equivalent to a scale map.

BlockRound()

Creates a map that block rounds from Vector3 to GridPoint3

CalculateBounds<TPoint>(IMap<Vector3, Vector3>, IExplicitShape<TPoint>, Func<TPoint, Vector3>, Func<TPoint, Vector3>)

Calculates the world bounds of an explicit shape.

ComposeWith<TInput, TInter, TOutput>(IForwardMap<TInput, TInter>, IForwardMap<TInter, TOutput>)

Creates a Composition Map based only on the CompositionForwardMap. This map pass the map1 Forward call as a parameter of the map2 Forward call making a composition of such methods. There is no Reverse call from this Map.

ComposeWith<TInput, TInter, TOutput>(IMap<TInput, TInter>, IMap<TInter, TOutput>)

Creates a Composition Map. This map pass the map1 Forward call as a parameter of the map2 Forward call making a composition of such methods. For the Reverse the process is the other way around, calling the Reverse of map2 passing the return value to the Reverse of the map1.

ComposeWith<TInput, TInter, TOutput>(IReverseMap<TInput, TInter>, IReverseMap<TInter, TOutput>)

Creates a Composition Map based only on the CompositionReverseMap. This map pass the map2 Reverse call as a parameter of the map1 Reverse call making a composition of such methods. There is no Forward call from this Map.

FuncXOnX(Func<float, float>)

Creates a FuncX on X Map that given a function it alter the X value of the coordinates of the map.

FuncXOnY(Func<float, float>)

Creates a map that applies a function on the X coordinate and sets the Y coordinate to the result.

Func<TInput, TOutput>(Func<TInput, TOutput>)

Creates a FuncForwardMap. This map saves a function to be used in a Forward call.

Func<TInput, TOutput>(Func<TInput, TOutput>, Func<TOutput, TInput>)

Creates a Func Map that calls a forward and reverse function in is Forward and Reverse calls.

Height(Grid2<float>, float, IMap<Vector3, GridPoint2>)

Creates a HeightMap.

HexBlockRound()

Creates a map that hex-block rounds from Vector3 to GridPoint3

HexRound()

Creates a Hex Round map that hex round from Vector3 to GridPoint2

Identity<TInput>()

Creates an Identity Map where the TInput and TOutput are the same.

Linear(Matrixf33)

Creates a Linear Map that takes a matrix and multiply it with the given position in a linear way.

ParallelogramWrapX(float)

Returns a map that wraps the X coordinate around at the given width.

ParallelogramWrapXY(float, float)

Returns a map that wraps the X coordinate around at the given width and the Y coordinate around the given height.

PointRound()

Creates a map that rounds UnityEngine.Vector3 to GridPoint3 by rounding the x coordinate.

Polar(float, float)

Creates a PolarMap. This map transform a Cartesian coordinate into a polar coordinate.

PolygonOffset(IMap<Vector3, GridPoint2>, IPointPartition2, IList<GridPoint2>)
PreScale<TPoint>(IMap<float, TPoint>, float)
PreScale<TPoint>(IMap<Vector2, TPoint>, Vector2)
PreScale<TPoint>(IMap<Vector3, TPoint>, Vector3)

Creates a map that scales a vector before applying the given map.

PreTranslate<TPoint>(IMap<Vector3, TPoint>, Vector3)

Creates a map that translate before applying the given map.

RectFloor()

Creates a map that rounds vectors to GridPoint2 by flooring the coordinates.

RectRound()

Creates a map that rounds vectors to GridPoint2 by rounding the coordinates.

Reverse<TInput, TOutput>(IForwardMap<TInput, TOutput>)

Creates a Reverse Map based only on the InverseForwardMap. In other words only the Reverse is swapped, meaning that calling Reverse will do the Forward operation.

Reverse<TInput, TOutput>(IMap<TInput, TOutput>)

Creates a Reverse Map that swap the calls of Forward and Reverse, meaning that now calling Forward will do the Reverse call and vice versa.

Reverse<TInput, TOutput>(IReverseMap<TInput, TOutput>)

Creates a Reverse Map based only on the InverseReverseMap. In other words only the Forward is swapped, meaning that calling Forward will do the Reverse operation.

StretchInRect(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds)

Creates a map that Scale its height and weight in a Proportional way.

StretchInRectHeightProportional(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds)

Creates a map that Scale its height in a Proportional way.

StretchInRectToCover(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds)

It stretch the grid to cover the rect where it is.

StretchInRectToFit(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds)

It stretch the grid to fill the rect where it is.

StretchInRectWidthProportional(IMap<Vector3, Vector3>, IExplicitShape<GridPoint2>, Func<GridPoint2, Vector3>, Bounds)

Creates a map that Scale its width in a Proportional way.

To2DXY<TInput>(IMap<TInput, Vector3>)

Creates a Composed map with a 2D XYMap.

To2DXZ<TInput>(IMap<TInput, Vector3>)

Creates a Composed map with a 2D XZMap.

To3DXY<TInput>(IMap<TInput, Vector2>, float)

Creates a Composed map with a 3D XYMap.

To3DXZ<TInput>(IMap<TInput, Vector2>, float)

Creates a Composed map with a 3D XZMap.

Translate(GridPoint2)

Creates a 2D Discrete Translate Map.

Translate(GridPoint3)

Creates a 3D Discrete Translate Map.

Translate(int)

Creates a 1D Discrete Translate Map.

Translate(float)

Creates a 1D Translate Map.

Translate(Vector2)

Creates a 2D Vector Translate Map.

Translate(Vector3)

Creates a 3D Vector Translate Map.

Twirl(float)

A non-uniform rotation that proportional to the distance of a point from the center.

XYZToXZY(IMap<Vector3, Vector3>)

Creates a map that shift the axes of a map from XYZ to XZY.

XYZToYXZ(IMap<Vector3, Vector3>)

Creates a map that shift the axes of a map from XYZ to YXZ.

XYZToYZX(IMap<Vector3, Vector3>)

Creates a map that shift the axes of a map from XYZ to YZX.

See Also

IMap<TInput, TOutput>