| Package | graphics.geom |
| Class | public class Hexagon |
| Inheritance | Hexagon Object |
| Implements | Geometry |
| Property | Defined By | ||
|---|---|---|---|
| apothem : Number
The apothem distance of the hexagon (height / 2 ). | Hexagon | ||
| height : Number
Determinates the height of the hexagon (2 apothem)
| Hexagon | ||
| perimeter : Number
The perimeter size of the hexagon. | Hexagon | ||
| radius : Number
Distance from the center to a vertex. | Hexagon | ||
| side : Number
The size of the sides of the regular hexagon. | Hexagon | ||
| width : Number
Determinates the width of the hexagon (2 radius)
| Hexagon | ||
| Method | Defined By | ||
|---|---|---|---|
Hexagon(radius:Number = 0)
Creates a new Hexagon instance. | Hexagon | ||
clone():*
Creates and returns a shallow copy of the object. | Hexagon | ||
equals(o:*):Boolean
Compares the specified object with this object for equality. | Hexagon | ||
reset():void
Resets all components of the regular hexagon. | Hexagon | ||
toSource(indent:int = 0):String
Returns the source code string representation of the object. | Hexagon | ||
toString(floatCount:uint = 2):String
Returns the String representation of the object. | Hexagon | ||
| Constant | Defined By | ||
|---|---|---|---|
| centralAngle : uint [static]
Indicates the central angle value (in degrees) of the hexagon (60°). | Hexagon | ||
| centralAngleRadians : Number [static]
Indicates the central angle value (in radians) of the hexagon (60 Math.PI / 180). | Hexagon | ||
| exteriorAngle : uint = 60 [static]
Indicates the exterior angle value (in degrees) of the hexagon (60°). | Hexagon | ||
| exteriorAngleRadians : Number = 1.0471975511965976 [static]
Indicates the exterior angle value (in radians) of the hexagon (60 Math.PI / 180). | Hexagon | ||
| interiorAngle : uint = 120 [static]
Indicates the interior angle value (in degrees) of the hexagon (120°). | Hexagon | ||
| numDiagonals : uint = 9 [static]
The number of distinct diagonals (9) possible from all vertices, in general n (n–3) / 2. | Hexagon | ||
| numSides : uint = 6 [static]
The number of sides of the polygon (6). | Hexagon | ||
| numTriangles : uint = 4 [static]
The number of triangles (4) created by drawing the diagonals from a given vertex. | Hexagon | ||
| sumInteriorAngle : uint = 720 [static]
The sum (in degrees) of all interior angles of the hexagon (720°). | Hexagon | ||
| apothem | property |
apothem:NumberThe apothem distance of the hexagon (height / 2 ). The distance of the line segment from the center of a regular polygon perpendicular to a side (i.e. when a regular polygon is broken into triangles, the apothem is the height of one of the triangles whose base is a side of the regular polygon).
public function get apothem():Number public function set apothem(value:Number):void| height | property |
height:NumberDeterminates the height of the hexagon (2 apothem)
public function get height():Number public function set height(value:Number):void| perimeter | property |
perimeter:NumberThe perimeter size of the hexagon.
public function get perimeter():Number public function set perimeter(value:Number):void| radius | property |
radius:NumberDistance from the center to a vertex.
public function get radius():Number public function set radius(value:Number):void| side | property |
side:NumberThe size of the sides of the regular hexagon.
public function get side():Number public function set side(value:Number):void| width | property |
width:NumberDeterminates the width of the hexagon (2 radius)
public function get width():Number public function set width(value:Number):void| Hexagon | () | Constructor |
public function Hexagon(radius:Number = 0)Creates a new Hexagon instance.
Parametersradius:Number (default = 0) |
| clone | () | method |
public function clone():*Creates and returns a shallow copy of the object.
Returns* — A new object that is a shallow copy of this instance.
|
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameters
o:* |
Boolean — true if the the specified object is equal with this object.
|
| reset | () | method |
public function reset():voidResets all components of the regular hexagon.
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString(floatCount:uint = 2):StringReturns the String representation of the object.
Parameters
floatCount:uint (default = 2) — the number of floats of the radius and apothem numeric values in
the string representation (default 2).
|
String — the String representation of the object.
|
| centralAngle | Constant |
public static const centralAngle:uintIndicates the central angle value (in degrees) of the hexagon (60°).
| centralAngleRadians | Constant |
public static const centralAngleRadians:NumberIndicates the central angle value (in radians) of the hexagon (60 Math.PI / 180).
| exteriorAngle | Constant |
public static const exteriorAngle:uint = 60Indicates the exterior angle value (in degrees) of the hexagon (60°). To find the exterior angle of a regular hexagon, we use the fact that the exterior angle forms a linear pair with the interior angle, so in general it is given by the formula 180 - interior angle.
| exteriorAngleRadians | Constant |
public static const exteriorAngleRadians:Number = 1.0471975511965976Indicates the exterior angle value (in radians) of the hexagon (60 Math.PI / 180).
| interiorAngle | Constant |
public static const interiorAngle:uint = 120Indicates the interior angle value (in degrees) of the hexagon (120°). Like any regular polygon, to find the interior angle we use the formula (180n–360)/n . For a hexagon, n=6.
| numDiagonals | Constant |
public static const numDiagonals:uint = 9The number of distinct diagonals (9) possible from all vertices, in general n (n–3) / 2.
| numSides | Constant |
public static const numSides:uint = 6The number of sides of the polygon (6).
| numTriangles | Constant |
public static const numTriangles:uint = 4The number of triangles (4) created by drawing the diagonals from a given vertex. (In general n–2)
| sumInteriorAngle | Constant |
public static const sumInteriorAngle:uint = 720The sum (in degrees) of all interior angles of the hexagon (720°). In general 180(n–2) degrees.