public void Collect() { shapeCollectorResult = ShapeCollector.GetFromPool(template.lengthX_extra, template.lengthZ_extra, template); if (profiler != null) { profiler.AddLog("Start Collecting Terrain"); } CollectTerrainCPU(shapeCollectorResult); CollectTerrainGPU(shapeCollectorResult); if (profiler != null) { profiler.AddLog("End Collecting Terrain"); } if (profiler != null) { profiler.AddLog("Start Collecting shapes"); } CollectCollidersCPU(shapeCollectorResult); CollectCollidersGPU(shapeCollectorResult); if (profiler != null) { profiler.AddLog("End Collecting shapes"); } if (profiler != null) { profiler.AddLog("Start Collecting shapes"); } modsChangeArea.Sort(Comparer); modsMakeHole.Sort(Comparer); for (int i = 0; i < modsChangeArea.Count; i++) { shapeCollectorResult.ChangeArea(modsChangeArea[i].shapes, modsChangeArea[i].area); } for (int i = 0; i < modsMakeHole.Count; i++) { if (modsMakeHole[i].mode == ColliderInfoMode.MakeHoleApplyArea) { shapeCollectorResult.MakeHole(modsMakeHole[i].shapes, modsMakeHole[i].area); } if (modsMakeHole[i].mode == ColliderInfoMode.MakeHoleRetainArea) { shapeCollectorResult.MakeHole(modsMakeHole[i].shapes, null); } } if (profiler != null) { profiler.AddLog("End Collecting shapes"); } //shapeCollectorGeneric.DebugMe(); }
public Form1() { InitializeComponent(); myCollector = new ShapeCollector(); myCollector.CapacityFull += onCapacityFull; myCollector.CapacityReached += onCapacityReached; selectedShape = SelectedShape.none; isDrawing = false; capacityReached = false; }