Table of Contents

Class VoronoiMap<TPoint>

Namespace
Gamelogic.Grids
Assembly
Assembly-CSharp.dll

A map that uses a Voronoi diagram to map points.

[Version(1, 8, 0)]
public class VoronoiMap<TPoint> : AbstractMap<TPoint>, IMap<TPoint>, IGridToWorldMap<TPoint> where TPoint : IGridPoint<TPoint>

Type Parameters

TPoint
Inheritance
AbstractMap<TPoint>
VoronoiMap<TPoint>
Implements
IMap<TPoint>
Inherited Members
Extension Methods

Constructors

VoronoiMap(IEnumerable<TPoint>, IGridToWorldMap<TPoint>)

public VoronoiMap(IEnumerable<TPoint> points, IGridToWorldMap<TPoint> map)

Parameters

points IEnumerable<TPoint>
map IGridToWorldMap<TPoint>

Methods

GridToWorld(TPoint)

This method maps a grid point to a world point.

public override Vector2 GridToWorld(TPoint gridPoint)

Parameters

gridPoint TPoint

Returns

Vector2

MakeMap(IEnumerable<Vector2>)

public static VoronoiMap<LinePoint> MakeMap(IEnumerable<Vector2> pointList)

Parameters

pointList IEnumerable<Vector2>

Returns

VoronoiMap<LinePoint>

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

Parameters

worldPoint Vector2

Returns

TPoint