Click or drag to resize

PolygonGridMapTPoint, TBasePoint Constructor

Constructor of a PolygonGridMap

Namespace:  Gamelogic.Grids
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
protected PolygonGridMap(
	Vector2 cellDimensions,
	Vector2 rectDimensions,
	Vector2 zeroShapeOffset,
	IEnumerable<IEnumerable<Vector2>> polies,
	IEnumerable<TPoint> offsets,
	IEnumerable<Vector2> rectOffsets,
	Func<int, int, int, TPoint> pointFactory,
	Func<TBasePoint, Vector2> baseMap,
	Func<VectorPoint, TBasePoint> rectPointMap
)

Parameters

cellDimensions
Type: Vector2
size of the cells in world coordinates
rectDimensions
Type: Vector2
size of the rectangle in world coodrinates
zeroShapeOffset
Type: Vector2
normalized world coordinates of the shape(0, 0, 0) relative to the rectangle bottom left corner
polies
Type: System.Collections.GenericIEnumerableIEnumerableVector2
each item in the list corresponds to a polygon, andd each polygon is a list of vertices in order(each vertice needs to be included only once).
offsets
Type: System.Collections.GenericIEnumerableTPoint
offsets in grid coordinates for each poly relative to(0, 0, 0) in the same order as the polies list
rectOffsets
Type: System.Collections.GenericIEnumerableVector2
the offsets in normalised world coordinates for each splice index
pointFactory
Type: SystemFuncInt32, Int32, Int32, TPoint
returns a new spliced point with the given coordinates
baseMap
Type: SystemFuncTBasePoint, Vector2
returns the world coordinate for the given base point
rectPointMap
Type: SystemFuncVectorPoint, TBasePoint
maps the rectangular patches with the correct base point(that corresponds to (0, 0, 0) in that rectangle).
See Also