Exemple #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)));
 }
Exemple #2
0
 internal void addEdges(Road road)
 {
     edges.Add(road);
 }
Exemple #3
0
 public void initialize(Road road)
 {
     initialize(road.start, road.end, road.width);
 }
Exemple #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);
 }
Exemple #5
0
 public Road(Road road)
 {
     initialize(road);
 }
Exemple #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);
Exemple #9
0
 public bool remove(Road road)
 {
     return(connectedRoads.Remove(road));
 }