Show / Hide Table of Contents

Class SquareBound

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

Inheritance
System.Object
SquareBound
Implements
IBound
System.Collections.Generic.IEnumerable<Cell>
System.Collections.IEnumerable
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class SquareBound : Object, IBound

Constructors

SquareBound(Vector2Int, Vector2Int)

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

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
public Vector2Int max
Field Value
Type Description
Vector2Int

min

Inclusive lower bound for each coordinate

Declaration
public Vector2Int min
Field Value
Type Description
Vector2Int

Properties

IndexCount

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

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
System.Boolean

Contains(Vector2Int)

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

GetCellByIndex(Int32)

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

GetEnumerator()

Declaration
public IEnumerator<Cell> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<Cell>

GetIndex(Vector2Int)

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

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
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
In This Article
Back to top Generated by DocFX