コード例 #1
0
        public PathingData(Polygons polygons, double unitsPerPixel, bool usingPathingCache)
        {
            this.usingPathingCache = usingPathingCache;

            Polygons      = polygons;
            polygonBounds = Polygons.GetBounds();
            SetGoodUnitsPerPixel(unitsPerPixel);

            EdgeQuadTrees  = Polygons.GetEdgeQuadTrees();
            PointQuadTrees = Polygons.GetPointQuadTrees();

            foreach (var polygon in Polygons)
            {
                Waypoints.AddPolygon(polygon);
            }

            RemovePointList = new WayPointsToRemove(Waypoints);

            if (usingPathingCache)
            {
                GenerateIsideCache();
            }
        }