Esempio n. 1
0
 /// <summary>
 /// Return the angle between 2 roads.
 /// These 2 roads must connect to each other.
 /// </summary>
 /// <param name="road">another road</param>
 /// <returns>the angle</returns>
 public float getAngleWith(Road road)
 {
     return(Vector3.Angle(direction, getRelativeDirection(road)));
 }
Esempio n. 2
0
 internal void addEdges(Road road)
 {
     edges.Add(road);
 }
Esempio n. 3
0
 public void initialize(Road road)
 {
     initialize(road.start, road.end, road.width);
 }
Esempio n. 4
0
 /// <summary>
 /// Get the appropriate direction relative to
 /// the given road.
 /// </summary>
 /// <param name="road"></param>
 /// <returns></returns>
 public Vector3 getRelativeDirection(Road road)
 {
     return((road.end == end || road.start == start) ? road.Direction : -road.Direction);
 }
Esempio n. 5
0
 public Road(Road road)
 {
     initialize(road);
 }
Esempio n. 6
0
 public IntersectionInfo(float distance, Vector3 intersection, Road proposedRoad, Road intersectedRoad)
 {
     this.distance        = distance;
     this.intersection    = intersection;
     this.proposedRoad    = proposedRoad;
     this.intersectedRoad = intersectedRoad;
 }
 public override bool applyTo(ref Road road)
 {
     throw new NotImplementedException();
 }
 public abstract bool applyTo(ref Road road);
Esempio n. 9
0
 public bool remove(Road road)
 {
     return(connectedRoads.Remove(road));
 }