public List <Vector3> GetSectionFrom2Corssing(long start, long end) { SpeedRoadCrossing s = GetCrossing(start); bool forward = true; SpeedRoadSection sec = s.GetTargetSection(end, ref forward); Assert.IsNotNull(sec); var path = sec.GetPath(forward); return(path); }
public void LoadFile(string fname, Transform par, SpeedRoadSectionMgr secmgr) { parent = par; DataSource ds = Ogr.Open(fname, 0); Assert.IsNotNull(ds); Assert.IsTrue(ds.GetLayerCount() > 0); Layer layer = ds.GetLayerByIndex(0); layer.ResetReading(); Feature feat; while ((feat = layer.GetNextFeature()) != null) { GameObject obj = Instantiate(SpeedRoad.prefab); obj.transform.parent = parent; SpeedRoadCrossing crossing = new SpeedRoadCrossing(ref obj, feat, secmgr); map[crossing.Fid] = crossing; } }