Show / Hide Table of Contents

Class SpatialMap<T>

An implementation of ISpatialMap<T> that allows only one item at each position at a time. If you need multiple items to be able to reside at one location at the same time, use MultiSpatialMap<T> or LayeredSpatialMap<T> instead.

Inheritance
System.Object
AdvancedSpatialMap<T>
SpatialMap<T>
Implements
ISpatialMap<T>
IReadOnlySpatialMap<T>
System.Collections.Generic.IEnumerable<ISpatialTuple<T>>
System.Collections.IEnumerable
Inherited Members
AdvancedSpatialMap<T>.ItemAdded
AdvancedSpatialMap<T>.ItemMoved
AdvancedSpatialMap<T>.ItemRemoved
AdvancedSpatialMap<T>.Count
AdvancedSpatialMap<T>.Items
AdvancedSpatialMap<T>.Positions
AdvancedSpatialMap<T>.Add(T, Coord)
AdvancedSpatialMap<T>.Add(T, Int32, Int32)
AdvancedSpatialMap<T>.AsReadOnly()
AdvancedSpatialMap<T>.Clear()
AdvancedSpatialMap<T>.Contains(T)
AdvancedSpatialMap<T>.Contains(Coord)
AdvancedSpatialMap<T>.Contains(Int32, Int32)
AdvancedSpatialMap<T>.GetEnumerator()
AdvancedSpatialMap<T>.IEnumerable.GetEnumerator()
AdvancedSpatialMap<T>.GetItem(Coord)
AdvancedSpatialMap<T>.GetItem(Int32, Int32)
AdvancedSpatialMap<T>.GetItems(Coord)
AdvancedSpatialMap<T>.GetItems(Int32, Int32)
AdvancedSpatialMap<T>.GetPosition(T)
AdvancedSpatialMap<T>.Move(T, Coord)
AdvancedSpatialMap<T>.Move(T, Int32, Int32)
AdvancedSpatialMap<T>.Move(Coord, Coord)
AdvancedSpatialMap<T>.Move(Int32, Int32, Int32, Int32)
AdvancedSpatialMap<T>.Remove(T)
AdvancedSpatialMap<T>.Remove(Coord)
AdvancedSpatialMap<T>.Remove(Int32, Int32)
AdvancedSpatialMap<T>.ToString()
AdvancedSpatialMap<T>.ToString(Func<T, String>)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public class SpatialMap<T> : AdvancedSpatialMap<T>, ISpatialMap<T>, IReadOnlySpatialMap<T>, IEnumerable<ISpatialTuple<T>>, IEnumerable where T : class, IHasID
Type Parameters
Name Description
T

The type of object that will be contained by this SpatialMap. Must implement IHasID and be a reference-type.

Remarks

See the ISpatialMap<T> for documentation on the practical purpose of spatial maps.

The objects stored in a SpatialMap must implement IHasID. This is used internally to keep track of the objects, since uints are easily (and efficiently) hashable.

Constructors

| Improve this Doc View Source

SpatialMap(Int32)

Constructor.

Declaration
public SpatialMap(int initialCapacity = 32)
Parameters
Type Name Description
System.Int32 initialCapacity

The initial maximum number of elements the SpatialMap can hold before it has to internally resize data structures. Defaults to 32.

Implements

ISpatialMap<T>
IReadOnlySpatialMap<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

Utility.ExtendToString<T>(IEnumerable<T>, String, Func<T, String>, String, String)
Utility.Yield<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX