Class Hexagon
Six-sided convex polygon
Inherited Members
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 SourceHexagon(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 SourceLocation
Location of the hexagon
Declaration
public Vector2 Location { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Xna.Framework.Vector2 |
Orientation
Orientation of the hexagon
Declaration
public HexOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
HexOrientation |
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 SourceGetCorners()
Retrieve the positions of the corners of the hexagon
Declaration
public Vector2[] GetCorners()
Returns
Type | Description |
---|---|
Microsoft.Xna.Framework.Vector2[] |