Show / Hide Table of Contents

Class HexBound

Bounding boxes for cube coordinate hexes. This can represent rhombuses and hex shapes drawn on the hex grid.

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

Constructors

HexBound(Vector3Int, Vector3Int)

Declaration
public HexBound(Vector3Int min, Vector3Int max)
Parameters
Type Name Description
Vector3Int min
Vector3Int max

Fields

max

Exclusive upper bound for each coordinate

Declaration
public Vector3Int max
Field Value
Type Description
Vector3Int

min

Inclusive lower bound for each coordinate

Declaration
public Vector3Int min
Field Value
Type Description
Vector3Int

Methods

Contains(Cell)

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

GetEnumerator()

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

Hexagon(Int32, Cell)

Returns a rough hexagonal shape of cells with a given distance of center, inclusive. I.e. a radius 0 hexagon contains 1 cell, a radius 1 hexagon contains 7 cells.

Declaration
public static HexBound Hexagon(int radius, Cell center = null)
Parameters
Type Name Description
System.Int32 radius
Cell center
Returns
Type Description
HexBound

Intersect(HexBound)

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

Rhombus(Int32, Int32, Int32, Int32)

Returns a bound of a rhombus that bounds the X and Y axes.

Declaration
public static HexBound Rhombus(int minX, int minY, int maxX, int maxY)
Parameters
Type Name Description
System.Int32 minX
System.Int32 minY
System.Int32 maxX
System.Int32 maxY
Returns
Type Description
HexBound

Union(HexBound)

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

Implements

IBound
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
In This Article
Back to top Generated by DocFX