Class SlotGrid
Contains a map that is processable by the Wildtile wave function collapse algorithm.
Before collapse, the slots in the map may contain multiple TransformedModules. After collapse, all slots will either contain exactly one TransformedModule or be marked as a wildcard.
Inheritance
System.Object
SlotGrid
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CarbideFunction.Wildtile
Syntax
public class SlotGrid
Properties
SlotData
Readonly access to the Slots in their native form.
Declaration
public Slot[] SlotData { get; }
Property Value
Type | Description |
---|---|
Slot[] |
Methods
CreateGridManually(Slot[])
Create a SlotGrid manually. The caller must set up slot connections separately.
Declaration
public static SlotGrid CreateGridManually(Slot[] slots)
Parameters
Type | Name | Description |
---|---|---|
Slot[] | slots |
Returns
Type | Description |
---|---|
SlotGrid |
GetSlot(Int32, Int32, Int32, Vector3Int)
Get the Slot from a coordinate.
Declaration
public Slot GetSlot(int x, int y, int z, Vector3Int dimensions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | z | |
Vector3Int | dimensions |
Returns
Type | Description |
---|---|
Slot |
GetSlot(Vector3Int, Vector3Int)
Get the Slot from a coordinate.
Declaration
public Slot GetSlot(Vector3Int coord, Vector3Int dimensions)
Parameters
Type | Name | Description |
---|---|---|
Vector3Int | coord | |
Vector3Int | dimensions |
Returns
Type | Description |
---|---|
Slot |
IsWithinBounds(Vector3Int, Vector3Int)
Test whether a coordinate can access a Slot in this SlotGrid.
Declaration
public static bool IsWithinBounds(Vector3Int coord, Vector3Int dimensions)
Parameters
Type | Name | Description |
---|---|---|
Vector3Int | coord | |
Vector3Int | dimensions |
Returns
Type | Description |
---|---|
System.Boolean |