C# Class CityGeneratorWPF.ViewModel.MainViewModel

Inheritance: ViewModelBase
Show file Open project: TobieD/City-Generator

Public Methods

Method Description
Initialize ( DrawService drawService ) : void

Initialize this viewModel

Private Methods

Method Description
AddNewCityDistrictType ( string settings ) : void
DrawCity ( ) : void
DrawVoronoiDiagram ( ) : void
Export ( ICanvasExporter exporter ) : void

Export the currently draw canvas to a file

GenerateCity ( ) : void

Convert the Voronoi Diagram into a city with roads and building zones

GeneratePoints ( int amount ) : void

Generate points and store them into a list

GenerateVoronoi ( ) : void

Generate a Voronoi Diagram from the generated points

MathTesting ( ) : void
OnClick ( Point point ) : void

Add a point on the clicked position of the canvas

RefreshCanvas ( ) : void

Redraw all the elements

RemoveCityDistrictType ( string settings ) : void

Method Details

Initialize() public method

Initialize this viewModel
public Initialize ( DrawService drawService ) : void
drawService CityGeneratorWPF.Service.DrawService
return void