Click or drag to resize

DiamondGridTCell Class

Represents a diamond grid. At its simplest, diamond grids are square grids that are rotated 45 degrees. By using suitable dimensions in the map, DiamondGrids can be used to implement isometric grids.
Inheritance Hierarchy
SystemObject
  Gamelogic.GridsAbstractUniformGridTCell, DiamondPoint
    Gamelogic.GridsDiamondGridTCell

Namespace:  Gamelogic.Grids
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
[VersionAttribute(1, 0, 0)]
public class DiamondGrid<TCell> : AbstractUniformGrid<TCell, DiamondPoint>, 
	IEvenGrid<TCell, DiamondPoint, DiamondPoint>, IVectorGrid<TCell, DiamondPoint, DiamondPoint>, 
	IGrid<TCell, DiamondPoint>, IGrid<DiamondPoint>, IGridSpace<DiamondPoint>, 
	IEnumerable<DiamondPoint>, IEnumerable, ISupportsVertexGrid<DiamondPoint>, 
	ISupportsEdgeGrid<RectPoint>

Type Parameters

TCell

The DiamondGridTCell type exposes the following members.

Constructors
  NameDescription
Public methodDiamondGridTCell(Int32, Int32)
Construct a new grid in the default shape with the given width and height. No transformations are applied to the grid. Normally, the static factory methods or shape building methods should be used to create grids. These constructors are provided for advanced usage.
Public methodDiamondGridTCell(Int32, Int32, FuncDiamondPoint, Boolean)
Construct a new grid whose cells are determined by the given test function. The test function should only return true for points within the bounds of the default shape. No transformations are applied to the grid. Normally, the static factory methods or shape building methods should be used to create grids. These constructors are provided for advanced usage.
Public methodDiamondGridTCell(Int32, Int32, FuncDiamondPoint, Boolean, DiamondPoint)
Construct a new grid whose cells are determined by the given test function. The function should only return true for points within the bounds of the rectangle when the given transforms are applied to them. Normally, the static factory methods or shape building methods should be used to create grids. These constructors are provided for advanced usage.
Public methodDiamondGridTCell(Int32, Int32, FuncDiamondPoint, Boolean, FuncDiamondPoint, DiamondPoint, FuncDiamondPoint, DiamondPoint)
Public methodDiamondGridTCell(Int32, Int32, FuncDiamondPoint, Boolean, FuncDiamondPoint, DiamondPoint, FuncDiamondPoint, DiamondPoint, IEnumerableDiamondPoint)
Top
Properties
Methods
  NameDescription
Public methodStatic memberArrayPointFromGridPoint
Protected methodArrayPointFromPoint(DiamondPoint) (Overrides AbstractUniformGridTCell, TPointArrayPointFromPoint(TPoint).)
Protected methodArrayPointFromPoint(Int32, Int32) (Overrides AbstractUniformGridTCell, TPointArrayPointFromPoint(Int32, Int32).)
Public methodStatic memberBeginShape
Use this method to begin a shape building sequence.
Public methodStatic memberCalculateStorage
Public methodCloneStructureTNewCellType
Returns a grid in the same shape, but with contents in the new type.
(Overrides AbstractUniformGridTCell, TPointCloneStructureTNewCell.)
Public methodContains
Checks whether the given point is inside the grid, or not. This function must be consistent with the enumerator that is returned with GetEnumerator(all points returned by the enumerator must be Inside, and all points that are inside must be returned by the enumerator).
(Inherited from AbstractUniformGridTCell, TPoint.)
Public methodStatic memberDefault
Public methodStatic memberDefaultContains
Public methodStatic memberDiamond
Public methodEquals (Inherited from Object.)
Public methodStatic memberFatRectangle
Protected methodFinalize (Inherited from Object.)
Public methodGetAllNeighbors (Inherited from AbstractUniformGridTCell, TPoint.)
Public methodGetEnumerator (Inherited from AbstractUniformGridTCell, TPoint.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetLargeSet
This functions returns a large number of points around the origin. This is useful(when used with big enough n) to determine whether a grid that is missing points is doing so becuase of an incorrect test function, or an incorrect storage rectangle. Use for debugging.
(Inherited from AbstractUniformGridTCell, TPoint.)
Public methodGetNeighborDirections
The only legal cellIndex to pass to this methid is 0
(Inherited from AbstractUniformGridTCell, TPoint.)
Public methodGetPrincipleNeighborDirections
Public methodGetSpiralIterator(Int32)
Public methodGetSpiralIterator(DiamondPoint, Int32)
Public methodGetStoragePoints
This method returns all points that can be contined by the storage rectangle for this grid. This is useful for debuggong shape functions.
(Inherited from AbstractUniformGridTCell, TPoint.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberGridPointFromArrayPoint
Public methodStatic memberHorizontallyWrappedParallelogram
Returns a grid wrapped horizontally along a parallelogram. Since version 1.7
Public methodMakeEdgeGridTNewCell
Makes an edge grid for this grid.
Public methodMakeVertexGridTNewCell
Makes a vertex grid for this grid.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberParallelogram
Protected methodPointFromArrayPoint (Overrides AbstractUniformGridTCell, TPointPointFromArrayPoint(Int32, Int32).)
Public methodStatic memberRectangle
Public methodSetGridPointTransforms
Set the GridPointTransform and InverseGridPointTransform.
(Inherited from AbstractUniformGridTCell, TPoint.)
Public methodSetNeighborsDiagonals
Public methodSetNeighborsMain
Public methodSetNeighborsMainAndDiagonals
Public methodStatic memberSingle
Public methodStatic memberThinRectangle
Public methodToString (Overrides ObjectToString.)
Public methodStatic memberVerticallyWrappedParallelogram
Returns a grid wrapped vertically along a parallelogram. Since version 1.7
Public methodStatic memberWrappedParallelogram
Returns a grid wrapped along a parallelogram. Since version 1.7
Top
Fields
Extension Methods
  NameDescription
Public Extension MethodButFirstDiamondPoint
Returns an enumerable of all elements of the given list but the first, keeping them in order.
(Defined by CollectionExtensions.)
Public Extension MethodButLastDiamondPoint
Returns an enumerable of all elements in the given list but the last, keeping them in order.
(Defined by CollectionExtensions.)
Public Extension MethodCombinationsDiamondPoint
Generates all combinations of m elements selected from the list.
(Defined by Combinatorial.)
Public Extension MethodListToStringDiamondPoint
Returns a pretty string representation of the given list. The resulting string looks something like [a, b, c].
(Defined by CollectionExtensions.)
Public Extension MethodMaxByDiamondPoint(FuncDiamondPoint, IComparable)Overloaded.
Finds the maximum element in the source as scored by the given function.
(Defined by CollectionExtensions.)
Public Extension MethodMaxByDiamondPoint, TKey(FuncDiamondPoint, TKey)Overloaded.
Finds the minimum element in the source as scored by its projection.
(Defined by CollectionExtensions.)
Public Extension MethodMaxByDiamondPoint, TKey(FuncDiamondPoint, TKey, IComparerTKey)Overloaded.
Finds the minimum element in the source as scored by the given function applied to a projection on the elements.
(Defined by CollectionExtensions.)
Public Extension MethodMinByDiamondPoint, TKey(FuncDiamondPoint, TKey)Overloaded.
Finds the minimum element in the source as scored by its projection.
(Defined by CollectionExtensions.)
Public Extension MethodMinByDiamondPoint, TKey(FuncDiamondPoint, TKey, IComparerTKey)Overloaded.
Finds the minimum element in the source as scored by the given function applied to a projection on the elements.
(Defined by CollectionExtensions.)
Public Extension MethodPartitionsDiamondPoint
Returns a list of all the partitions of a list.
(Defined by Combinatorial.)
Public Extension MethodPermutationsDiamondPoint
Generates all permutations of the list of elements.
(Defined by Combinatorial.)
Public Extension MethodPowerSetDiamondPoint
Returns the power set of the input, that is, the set of all subsets of the input.
(Defined by Combinatorial.)
Public Extension MethodRandomItemDiamondPointOverloaded.
Returns a random element from a source.
(Defined by CollectionExtensions.)
Public Extension MethodRandomItemDiamondPoint(IRandom)Overloaded.
Returns a random element from a source.
(Defined by CollectionExtensions.)
Public Extension MethodRotateLeftDiamondPoint
Returns a enumerable with elements in order, but the first element is moved to the end.
(Defined by CollectionExtensions.)
Public Extension MethodRotateRightDiamondPoint
Returns a enumerable with elements in order, but the last element is moved to the front.
(Defined by CollectionExtensions.)
Public Extension MethodSampleRandomDiamondPoint(Int32)Overloaded.
Returns a random sample from a source.
(Defined by CollectionExtensions.)
Public Extension MethodSampleRandomDiamondPoint(Int32, IRandom)Overloaded.
Returns a random sample from a source.
(Defined by CollectionExtensions.)
Public Extension MethodTakeHalfDiamondPoint
Returns the first half of elements from a source.
(Defined by CollectionExtensions.)
Public Extension MethodTakeLastDiamondPoint
Returns the last n elements from a source.
(Defined by CollectionExtensions.)
Public Extension MethodThrowIfNull
Throws a NullReferenceException if the object is null.
(Defined by ObjectExtensions.)
Public Extension MethodToPeriodicGeneratorDiamondPoint (Defined by GeneratorExtensions.)
Public Extension MethodToRandomElementGeneratorDiamondPoint (Defined by GeneratorExtensions.)
Public Extension MethodTuplesDiamondPoint (Defined by Combinatorial.)
Top
Explicit Interface Implementations
See Also