Table of Contents

Namespace Gamelogic.Grids2

Classes

AbstractBounds<TPoint>

Represents a axis-aligned bounding space. Concrete implementations for 1D (GridInterval), 2D (GridRect) and 3D (GridRect) is provided.

AbstractGrid<TPoint, TCell>

Base class of concrete implementations of the IGrid interface.

Algorithms

This class provide generic functions for common grid operations, such as finding the shortest path or connected shapes.

Array<T>

Base class for arrays used to configure nested arrays in the inspector.

This class provides all the implementation needed. Base classes are provided only so that the generic parameter is specified so that the base classes can be used in the inspector.

BlockPoint

Provides constants and methods for working with points in block grids.

ColorFunction

This is an inspectable presentation of a grid coloring, using three parameters as explained here: http://gamelogic.co.za/2013/12/18/what-are-grid-colorings/

ColorFunction3

This is an inspectable presentation of a grid coloring, using six parameters.

DebugMesh

A component to draw gizmos at vertices that makes it easier to debug meshes.

EnumerableExtensions

Extensions for IEnumerable.

EqualsComparer<T>

Use this class in constructors of HashSets and Dictionaries that take point types(such as PointyHexPoint) as keys.

ExplicitShape

Class for creating and manipulating explicit shapes.

ExplicitShape.ExplicitShape1

Concrete implementation of a 1D ExplicitShape.

ExplicitShape.ExplicitShape2

Concrete implementation of a 2D ExplicitShape.

ExplicitShape.ExplicitShape3

Concrete implementation of a 3D ExplicitShape.

ExplicitShape.Hex

Class with methods for hex grid shapes.

ExplicitShape.Rect

Class with methods for rect grid shapes.

FloatArray

An Array of float.

Grid1<TCell>

1D implementation of a IGrid<TPoint, TCell>.

Grid2<TCell>

A 2D implementation of a IGrid<TPoint, TCell>.

Grid3<TCell>

3D implementation of a IGrid<TPoint, TCell>.

GridBehaviour<TCell>

Base class of grid behaviours that is not generic in the point type.

GridBehaviour<TPoint, TCell>

A grid behaviour is a GLMonoBehaviour that can be used next to a GridBuilder and provides easy access to the grid and map of the grid builder.

GridBounds

Discrete version of the U:Bounds class. Represents a axis-aligned cuboid with with vertices at grid points.

GridBuilderUtils

Class that provides utility methods for working with grids.

GridBuilder<TCell>

Base class for grid builders. A grid builder builds a visual presentation of a grid.

GridColors

A class that can be used to color a tile grid with a color function.

GridEvent

Use for displaying events of the GridEventTrigger in the inspector.

GridEventTrigger

This is a simple event trigger for 2D grids. To use it, add it on your grid builder, and link in the methods you want to trigger in the respective fields.

GridExtensions

Provides extension methods for grids.

GridInterval

Represents a discrete interval. This is the 1D version of GridRect and GridBounds.

GridMap<TDiscreteType>

A grid map is used to convert from grid space to world space.

The map is composed from two separate maps. The space map takes a point in grid space, and positions it in world space. The points from grid space need not be discrete. For example, in a rect grid, the point (0.5, 0.5) represents the top right vertex of the cell at (0,0).

The round map makes continuous grid points discrete. I a rect grid, for example, the point (0.3, 0.3) is rounded to (0, 0).

GridPoint1

Provides constants and methods for points of 1D Grids, that is, integers.

GridRect

Represents an axis-aligned rectangle. This is the discrete version of U:Rect.

GridShapeGraph

Class for selecting the grid type and setting an associated graph.

GridTypeExtensions

Contains extension methods for the GridType enum.

GridUtils

Class with utility methods for grids.

HexBlockPoint

Class with methods for working with hex block points.

ImplicitShape

Provides methods for creating and manipulating implicit shapes.

IntArray

An Array of int.

Interval

Represents an interval. This is the 1D analog of U:Rect and U:Bounds.

Map

Provides methods for creating and manipulating maps.

MatrixExtensions

Provides extension methods for matrices.

MeshCell

A cell that can be used in mesh grids.

MeshData

This class provides methods that can be used to construct a mesh for a grid, and is used in mesh builders.

MeshDataFromMesh

Uses a mesh for an actual cell to generate full mesh data for a grid.

MeshGridBuilder

A grid builder that uses a single mesh for the entire grid.

MeshStripMeshData

Creates mesh data from a quad that is subdivided a number of times to make a horizontal strip for each cell.

MeshTileCell

A tile cell that uses a mesh for its visual presentation.

MeshTileGridBuilder

A builder that uses separate objects for each cell of a grid.

PeriodicGridMeshData

Used to specify mesh data for periodic grids.

PointyHexPoint

Provides constants and methods for working with points in pointy hex grids.

PolygonPartition

Class that provides methods for working woth polygons partitions.

Polyominoes

Contains functions for making polyomino shape grids.

Polyominoes.Hexomino

Contains functions for making hexomino shapes (six connected squares).

Polyominoes.Pentomino

Contains functions for making pentomino shapes (five connected squares).

Polyominoes.Tetromino

Contains functions for making tetromino shapes (four connected squares).

Polyominoes.Triomino

Contains functions for making triomino shapes (three connected squares).

RectPoint

Provides constants and methods for working with points in rect grids.

RoundTypeExtensions

Class that defines extension methods for enum RoundType.

SpriteCell

A cell that is rendered as a sprite.

StructList<T>

An implementation of IList for grid points that is safe to use with the AOT compiler.

TileCell

The base class of all tile cells.

TileGridBuilder

A builder that uses separate objects for each cell of a grid.

UVCell

Similar to a sprite cell, but with custom UV coordinates. This type of cell is useful when placing a single texture across multiple cells.

UniformGridMeshData

Used to specify mesh data for uniform grids.

Vector2Array

An Array of Vector2.

Vector3Array

An Array of Vector3.

VertexColors

A grid behaviour that can be used with a mesh grid builder to set vertex colors based on a color function.

Structs

GridPoint2

A discrete 2D vector, used to index into 2D grids.

GridPoint3

A discrete 3D vector, used to index into 3D grids.

InspectableGridPoint2

Grid points are immutable, and cannot be used in the inspector. This class can be used instead.

InspectableGridPoint3

Grid points are immutable, and cannot be used in the inspector. This class can be used instead.

InspectableMatrixf2x2

Matrices are immutable, and cannot be used in the inspector. This class can be used instead.

InspectableMatrixf3x3

Matrices are immutable, and cannot be used in the inspector. This class can be used instead.

InspectableMatrixi2x2

Matrices are immutable, and cannot be used in the inspector. This class can be used instead.

InspectableMatrixi3x3

Matrices are immutable, and cannot be used in the inspector. This class can be used instead.

Matrixf22

Represents a 2x2 matrices with float values.

Matrixf33

Represents a 3x3 matrices with float values.

Matrixi22

Represents a 2x2 matrices with integer values.

Matrixi33

Represents a 3x3 matrices with integer values.

PointCellPair<TPoint, TCell>

Simple struct that holds a read-only TPoint and TCell. This is the type over which grids are enumerable.

Interfaces

IColorableCell

Represents a cell whose color can be set.

IExplicitShape<TPoint>

Represents a point set that is an implicit shape, and in addition, can generate all the points it contains.

IForwardMap<TInput, TOutput>

Represents a function.

IGridMap<TDiscreteInputType, TContinuousInputType, TOutput>

A grid map is used to convert from grid space to world space.

IGrid<TPoint>

An explicit shape that has for each of its points a value associated.

IGrid<TPoint, TCell>

An explicit shape that has for each of its points a value, called a cell, associated.

IImplicitShape<TPoint>

An implicit shape is a representation of a (discrete) point set that can determine whether a given point is in the shape or not.

IMap<TInput, TOutput>

Represents a function and its inverse.

IPointPartition2

A partition of a 2D point set, with each partition denoted by a 0-based index.

IPointSet2

Represents a set of points with a method to determine whether a given point is in the set.

IReverseMap<TInput, TOutput>

Represents the inverse of a function.

Enums

GridType

The type of built-in grids.

HorizontalAlignment

How an object (such as a grid) is aligned horizontally within a rectangle.

MapPlane

An enumeration of the two basic types of 2D planes (in 3D space) used in the library.

Polyominoes.Hexomino.Type

Represents the hexomino types by their standard names.

Polyominoes.Pentomino.Type

Represents the pentomino types by their standard names.

Polyominoes.Tetromino.Type

Represents the tetromino types by their standard names.

Polyominoes.Triomino.Type

Represents the triomino type by their standard names.

RoundType

Types of rounding.

VerticalAlignment

How an object (such as a grid) is aligned vertically within a rectangle.