Class SquareBound
A bounding box on a regular 2d grid of squares.
Assembly: Sylves.dll
Syntax
public class SquareBound : IBound, IEnumerable<Cell>, IEnumerable
Constructors
SquareBound(Vector2Int, Vector2Int)
Declaration
public SquareBound(Vector2Int min, Vector2Int mex)
Parameters
SquareBound(int, int, int, int)
Declaration
public SquareBound(int minX, int minY, int maxX, int maxY)
Parameters
Properties
IndexCount
Declaration
public int IndexCount { get; }
Property Value
Max
Inclusive upper bound for each coordinate
Declaration
public Vector2Int Max { get; set; }
Property Value
Mex
Exclusive upper bound for each coordinate
Declaration
public Vector2Int Mex { get; set; }
Property Value
Min
Inclusive lower bound for each coordinate
Declaration
public Vector2Int Min { get; set; }
Property Value
Size
Declaration
public Vector2Int Size { get; }
Property Value
Methods
Contains(Cell)
Declaration
public bool Contains(Cell v)
Parameters
| Type |
Name |
Description |
| Cell |
v |
|
Returns
Contains(Vector2Int)
Declaration
public bool Contains(Vector2Int v)
Parameters
Returns
FromVectors(IEnumerable<Vector2Int>)
Declaration
public static SquareBound FromVectors(IEnumerable<Vector2Int> vs)
Parameters
Returns
GetCellByIndex(int)
Declaration
public Vector2Int GetCellByIndex(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
GetEnumerator()
Declaration
public IEnumerator<Cell> GetEnumerator()
Returns
GetIndex(Vector2Int)
Declaration
public int GetIndex(Vector2Int cell)
Parameters
Returns
Intersect(SquareBound)
Declaration
public SquareBound Intersect(SquareBound other)
Parameters
Returns
Union(SquareBound)
Declaration
public SquareBound Union(SquareBound other)
Parameters
Returns
Implements