public BspBuilder(BspConfig config, MapData map) { BspConfig = config; CollinearTracker collinearTracker = new CollinearTracker(config.VertexWeldingEpsilon); JunctionClassifier junctionClassifier = new JunctionClassifier(); VertexAllocator = new VertexAllocator(config.VertexWeldingEpsilon); SegmentAllocator = new SegmentAllocator(VertexAllocator, collinearTracker); ConvexChecker = new ConvexChecker(); SplitCalculator = new SplitCalculator(config, collinearTracker); Partitioner = new Partitioner(config, SegmentAllocator, junctionClassifier); MinisegCreator = new MinisegCreator(VertexAllocator, SegmentAllocator, junctionClassifier); List <BspSegment> segments = ProcessMapLines(map); junctionClassifier.Add(segments); CreateInitialWorkItem(segments); }
/// <summary> /// Creates a partitioner tha allows steppable debugging. /// </summary> /// <param name="config">The config with partitioning info.</param> /// <param name="segmentAllocator">The segment allocator to create new /// BSP segments when splitting.</param> /// <param name="junctionClassifier">The junction classifier to update /// with new junctions.</param> public Partitioner(BspConfig config, SegmentAllocator segmentAllocator, JunctionClassifier junctionClassifier) { BspConfig = config; SegmentAllocator = segmentAllocator; JunctionClassifier = junctionClassifier; }