Class SquareBound
A bounding box on a regular 2d grid of squares.
Inheritance
System.Object
SquareBound
Implements
System.Collections.Generic.IEnumerable<
Cell>
System.Collections.IEnumerable
Assembly: Sylves.dll
Syntax
public class SquareBound : Object, IBound
Constructors
SquareBound(Vector2Int, Vector2Int)
Declaration
public SquareBound(Vector2Int min, Vector2Int max)
Parameters
SquareBound(Int32, Int32, Int32, Int32)
Declaration
public SquareBound(int minX, int minY, int maxX, int maxY)
Parameters
Type |
Name |
Description |
System.Int32 |
minX |
|
System.Int32 |
minY |
|
System.Int32 |
maxX |
|
System.Int32 |
maxY |
|
Fields
max
Exclusive upper bound for each coordinate
Declaration
Field Value
min
Inclusive lower bound for each coordinate
Declaration
Field Value
Properties
IndexCount
Declaration
public int IndexCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
size
Declaration
public Vector2Int size { get; }
Property Value
Methods
Contains(Cell)
Declaration
public bool Contains(Cell v)
Parameters
Type |
Name |
Description |
Cell |
v |
|
Returns
Type |
Description |
System.Boolean |
|
Contains(Vector2Int)
Declaration
public bool Contains(Vector2Int v)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetCellByIndex(Int32)
Declaration
public Vector2Int GetCellByIndex(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Returns
GetEnumerator()
Declaration
public IEnumerator<Cell> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<Cell> |
|
GetIndex(Vector2Int)
Declaration
public int GetIndex(Vector2Int cell)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Intersect(SquareBound)
Declaration
public SquareBound Intersect(SquareBound other)
Parameters
Returns
Union(SquareBound)
Declaration
public SquareBound Union(SquareBound other)
Parameters
Returns
Implements
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable