Generated by DocFX

Class Hexagon

Six-sided convex polygon

Inheritance
System.Object
Polygon
Hexagon
Inherited Members
Polygon.Points
Polygon.Centroid
Polygon.Bounds
Polygon.Contains(Vector2)
Polygon.SortPoints()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug
Assembly: ladybug.dll
Syntax
public class Hexagon : Polygon

Constructors

| Improve this Doc View Source

Hexagon(Vector2, Vector2, HexOrientation)

Create a Hexagon

Declaration
public Hexagon(Vector2 location, Vector2 size, HexOrientation orientation = HexOrientation.Point)
Parameters
Type Name Description
Microsoft.Xna.Framework.Vector2 location
Microsoft.Xna.Framework.Vector2 size
HexOrientation orientation

Properties

| Improve this Doc View Source

Location

Location of the hexagon

Declaration
public Vector2 Location { get; set; }
Property Value
Type Description
Microsoft.Xna.Framework.Vector2
| Improve this Doc View Source

Orientation

Orientation of the hexagon

Declaration
public HexOrientation Orientation { get; set; }
Property Value
Type Description
HexOrientation
| Improve this Doc View Source

Size

Size of the hexagon, measured from the corners to the center

Declaration
public Vector2 Size { get; set; }
Property Value
Type Description
Microsoft.Xna.Framework.Vector2

Methods

| Improve this Doc View Source

GetCorners()

Retrieve the positions of the corners of the hexagon

Declaration
public Vector2[] GetCorners()
Returns
Type Description
Microsoft.Xna.Framework.Vector2[]

Extension Methods

PolygonExtensions.ToRectangle(Polygon, Boolean)