Solidify existing code to prepare for planning implementation.
- Decoupled previous code from visualisation/debug
- Created PlanningParameters class to handle all of the planning input
- Modified all existing classes (pathing, viewsheds etc) to take only a PlanningParameters object as the constructor
- Set up PlanningParameters to create all data requirements (viewshed, terrain graph and cost map etc)
- Created UnityPlanningScript as an interface between the unity engine and the PlanningParameters object. Also acts as a stand in planner based off publicly available methods (eg. Calculate path based on where a gameobject is located in the unity engine – transforms unity coordinates to TerrainObject coordinates and calls relevant methods etc)
- Tested creation of viewshed etc on a seperate thread. Doesnt result in faster creation but does prevent program freeze while calculating.
- Created UI to test initialisation, path creation etc
- Created a simple Plan class to hold the details of a finished Plan
- Created seperate Visualisation class that uses information from the above data classes to visualise a Plan
- Created a TestPlan method which will take position of in editor placed markers for FUP/SBF and create a Plan object to be visualised
The implementation of PlanningParameters works very well and effectively hides the underlying code from any planner object (thus removing a lot of complexity from the ‘front end’.
The visualisation is still quite simplistic but gives a basic idea and is quite easy to extend. An example is below:
- Modify graph to store the function required for calculating a viewshed impact on the cost field. This can be an anon function passed as part of the planning parameters (Use of delegates etc. required)
3 hours (60 hours running total)
Time spent on edited addition:
2 hours (62 hours running total)
Began development of presentation for initial CDF Seminar on Friday.