Ejemplo n.º 1
0
        public static List <TaxiNode> GetNodesInBBox(int mapId, float[] bmin, float[] bmax)
        {
            Initialize();

            var ret = new List <TaxiNode>(2);

            foreach (var record in _taxiNodes.Records)
            {
                var data = new TaxiNode(record);
                if (!data.IsValid)
                {
                    continue;
                }

                if (data.MapId != mapId)
                {
                    continue;
                }

                if (data.Location.X >= bmin[0] && data.Location.Y >= bmin[1] && data.Location.X <= bmax[0] && data.Location.Y <= bmax[1])
                {
                    ret.Add(data);
                }
            }
            return(ret);
        }
Ejemplo n.º 2
0
        public static TaxiData GetTaxiData(TaxiNode from)
        {
            var to = new Dictionary<int, TaxiNode>();
            foreach (var record in _taxiPath.Records)
            {
                var data = new TaxiPath(record);
                if (!data.IsValid || data.From != from.Id)
                    continue;

                var nodeRecord = _taxiNodes.GetRecordById(data.To);
                if (nodeRecord == null)
                    continue;
                to.Add(data.Id, new TaxiNode(nodeRecord));
            }

            return new TaxiData(from, to);
        }
Ejemplo n.º 3
0
        public static List<TaxiNode> GetNodesInBBox(int mapId, float[] bmin, float[] bmax)
        {
            Initialize();

            var ret = new List<TaxiNode>(2);
            foreach (var record in _taxiNodes.Records)
            {
                var data = new TaxiNode(record);
                if (!data.IsValid)
                    continue;

                if (data.MapId != mapId)
                    continue;

                if (data.Location.X >= bmin[0] && data.Location.Y >= bmin[1] && data.Location.X <= bmax[0] && data.Location.Y <= bmax[1])
                    ret.Add(data);
            }
            return ret;
        }
Ejemplo n.º 4
0
        public static TaxiData GetTaxiData(TaxiNode from)
        {
            var to = new Dictionary <int, TaxiNode>();

            foreach (var record in _taxiPath.Records)
            {
                var data = new TaxiPath(record);
                if (!data.IsValid || data.From != from.Id)
                {
                    continue;
                }

                var nodeRecord = _taxiNodes.GetRecordById(data.To);
                if (nodeRecord == null)
                {
                    continue;
                }
                to.Add(data.Id, new TaxiNode(nodeRecord));
            }

            return(new TaxiData(from, to));
        }
Ejemplo n.º 5
0
 public TaxiData(TaxiNode from, Dictionary <int, TaxiNode> to)
 {
     From = from;
     To   = to;
 }
Ejemplo n.º 6
0
 public TaxiData(TaxiNode from, Dictionary<int, TaxiNode> to)
 {
     From = from;
     To = to;
 }