Handles Instatiation of objects that are to be drawn and maintains the order of execution and animation of our algorithm visualizer.
CG_Environment(Number width, Number height)
Number width
|
Canvas width. |
Number height
|
Canvas height. |
Array things
|
2D array of objects sorted by dimension. |
CG_DynamicPointSet P
|
The drawing's point set. |
CG_Vertex Vertex(Number x, Number y)
|
Instantiates a CG_Vertex with coordinates (x, y) and adds it to things[0] .
|
CG_DynamicPointSet DynamicPointSet()
|
Instantiates a CG_DynamicPointSet and adds it to things[0] .
|
CG_Edge Edge(CG_Vertex u, CG_vertex v)
|
Instantiates a CG_Edge with endpoints u , v and adds it to things[1] .
|
CG_Polygon Polygon()
|
Instantiates a CG_Polygon and adds it to things[1] .
|
CG_PSLG PSLG()
|
Instantiates a CG_PSLG and adds it to things[1] .
|
CG_Face Face(CG_Polygon C)
|
Instantiates a CG_Face with boundary C and adds it to things[2] .
|
CG_Vertex initWalk(CG_PSLG G)
|
Initializes the walk algorithm by creating a boundary outside the canvas and returning a boundary vertex. |