Show / Hide Table of Contents

Class SquareBound

A bounding box on a regular 2d grid of squares.

Inheritance
object
SquareBound
Implements
IBound
IEnumerable<Cell>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class SquareBound : IBound, IEnumerable<Cell>, IEnumerable

Constructors

SquareBound(Vector2Int, Vector2Int)

Declaration
public SquareBound(Vector2Int min, Vector2Int mex)
Parameters
Type Name Description
Vector2Int min
Vector2Int mex

SquareBound(int, int, int, int)

Declaration
public SquareBound(int minX, int minY, int maxX, int maxY)
Parameters
Type Name Description
int minX
int minY
int maxX
int maxY

Properties

IndexCount

Declaration
public int IndexCount { get; }
Property Value
Type Description
int

Max

Inclusive upper bound for each coordinate

Declaration
public Vector2Int Max { get; set; }
Property Value
Type Description
Vector2Int

Mex

Exclusive upper bound for each coordinate

Declaration
public Vector2Int Mex { get; set; }
Property Value
Type Description
Vector2Int

Min

Inclusive lower bound for each coordinate

Declaration
public Vector2Int Min { get; set; }
Property Value
Type Description
Vector2Int

Size

Declaration
public Vector2Int Size { get; }
Property Value
Type Description
Vector2Int

Methods

Contains(Cell)

Declaration
public bool Contains(Cell v)
Parameters
Type Name Description
Cell v
Returns
Type Description
bool

Contains(Vector2Int)

Declaration
public bool Contains(Vector2Int v)
Parameters
Type Name Description
Vector2Int v
Returns
Type Description
bool

FromVectors(IEnumerable<Vector2Int>)

Declaration
public static SquareBound FromVectors(IEnumerable<Vector2Int> vs)
Parameters
Type Name Description
IEnumerable<Vector2Int> vs
Returns
Type Description
SquareBound

GetCellByIndex(int)

Declaration
public Vector2Int GetCellByIndex(int index)
Parameters
Type Name Description
int index
Returns
Type Description
Vector2Int

GetEnumerator()

Declaration
public IEnumerator<Cell> GetEnumerator()
Returns
Type Description
IEnumerator<Cell>

GetIndex(Vector2Int)

Declaration
public int GetIndex(Vector2Int cell)
Parameters
Type Name Description
Vector2Int cell
Returns
Type Description
int

Intersect(SquareBound)

Declaration
public SquareBound Intersect(SquareBound other)
Parameters
Type Name Description
SquareBound other
Returns
Type Description
SquareBound

Union(SquareBound)

Declaration
public SquareBound Union(SquareBound other)
Parameters
Type Name Description
SquareBound other
Returns
Type Description
SquareBound

Implements

IBound
IEnumerable<T>
IEnumerable
In this article
Back to top Generated by DocFX