Class Index | File Index

Classes


Class URBGEN.Poly


Defined in: UrbGen.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
URBGEN.Poly(p0, p1, p2, p3)
Defines a polygon.
Field Summary
Field Attributes Field Name and Description
 
This polygon's corners, in the order: topleft, topright, bottomleft, bottomright.
 
The lengths of this polygon's edges, in the order: top, right, left, bottom.
 
The vertical angle of this polygon's grid.
Method Summary
Method Attributes Method Name and Description
 
Sets this polygon's corners as neighbors so that there are no extra points included on any edge.
 
setGridAngle(random)
Sets this polygon's grid angle.
Class Detail
URBGEN.Poly(p0, p1, p2, p3)
Defines a polygon.
Parameters:
{URBGEN.Point} p0
- the top left corner of the polygon.
{URBGEN.Point} p1
- the top right corner of the polygon.
{URBGEN.Point} p2
- the bottom left corner of the polygon.
{URBGEN.Point} p3
- the bottom right corner of the polygon.
Field Detail
{URBGEN.Point[]} corners
This polygon's corners, in the order: topleft, topright, bottomleft, bottomright.

{number[]} edgeLengths
The lengths of this polygon's edges, in the order: top, right, left, bottom.

{number} gridAngle
The vertical angle of this polygon's grid.
Method Detail
makeSimple()
Sets this polygon's corners as neighbors so that there are no extra points included on any edge.

setGridAngle(random)
Sets this polygon's grid angle.
Parameters:
{number} random
- A random number between 0 - 1 (inclusive).

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Sep 04 2014 11:25:30 GMT+0100 (BST)