Click or drag to resize

IGridPointTPoint Interface

Represents a "point" that is used to access a cell in a Grid. For built-in 2D grids, these points are often 2D integer vectors, or spliced vectors, and hence they implement additional interfaces such as IVectorPoint, ISplicedPoint, andISplicedVectorPoint.These points supports arithmetic, [colorings](http://gamelogic.co.za/2013/12/18/what-are-grid-colorings/), and some other geometric operations. In general, points do not "know" their neighbors.Use the grid methods IGrid<TCell, TPoint>.GetNeighbors and IGrid<TCell, TPoint>.GetAllNeighbors to make queries about a point's neighbors. GridPoint base classes must be immutable for many of the algorithms to work correctly.In particular, GridPoints are used as keys in dictionaries and sets. It is also a good idea to overload the `==` and `!=` operators.

Namespace:  Gamelogic.Grids
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
[VersionAttribute(1, 0, 0)]
public interface IGridPoint<TPoint> : IEquatable<TPoint>, 
	IGridPoint
where TPoint : Object, IGridPoint<TPoint>

Type Parameters

TPoint

The IGridPointTPoint type exposes the following members.

Properties
  NameDescription
Public propertySpliceCount
For spliced grids, this is the number of slices for all points. For Uniform grids, this is always 1.
Public propertySpliceIndex
For spliced grids, this is the index of the splice. For Uniform grids, this is always 0.
Top
Methods
  NameDescription
Public methodDistanceFrom
The lattice distance between two points. Two points should have a distance of 1 if and only if they are neighbors.
Public methodEquals (Inherited from IEquatableTPoint.)
Top
See Also