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