iTS - Intelligent Traffic System
V 1.0.5
|
TS navigation. This clas is responsible for navigating throught the lanes and selecting the next connector/lane the car would go by. More...
Classes | |
struct | TSNextLaneSelection |
TS Next lane selection. This class hold the pointers to the next connector or lane. More... | |
struct | TSReservedPoints |
TS Reserved points. This struct holds the references to the connectors and points that have been reserved by this car. More... | |
Public Member Functions | |
bool | SwitchTrack () |
Switchs the track. More... | |
void | GetLaneMaxSpeed () |
bool | ReserveNearConnectorPoints (ref TSLaneConnector connector, int lane) |
Reserves the near connector points. More... | |
bool | ReserveNearConnectorPoints (ref TSPoints points, ref TSLaneConnector connector) |
Reserves the near connector points. More... | |
void | UnReserveNearConnectorPoints (TSLaneConnector connector) |
void | UnReserveNearConnectorPoints (TSPoints points) |
void | LaneChange (bool left) |
Change to another lane. More... | |
void | OverTaking (bool left) |
Overtakes if there is free lanes. More... | |
void | TurnOffTurningLights () |
void | UnreserveAll (bool all) |
void | AddNextTrackToPath () |
Public Attributes | |
int | currentWaypoint = 0 |
The max waiting time. This value would be compared with the amount of time a car is waiting on a junction to cross it, this is to avoid or at least try to prevent traffic jams. More... | |
int | currentWaypointOnCar = 0 |
The current waypoint on car. More... | |
Vector3 | RelativeWaypointPosition = Vector3.zero |
The relative waypoint position. More... | |
Vector3 | RelativeWaypointPositionOnCar = Vector3.zero |
The relative waypoint position on car. More... | |
int | previousWaypointSteer = 0 |
The previous waypoint steer. More... | |
int | currentLane = 0 |
The current lane. More... | |
TSNextLaneSelection | nextTrack = new TSNextLaneSelection() |
The next track. More... | |
List< TSNextLaneSelection > | nextTrackPath = new List<TSNextLaneSelection>() |
The next track path. This list hold the next lanes/connectors this car would be traveling to. More... | |
float | currentMaxSpeed = 50f |
The current max speed. More... | |
TSPoints[] | waypoints |
The waypoints. This array holds the current lane points reference. More... | |
TSPoints[] | lastWaypoints |
The last waypoints. This array holds the last lane points reference. More... | |
TSLaneInfo[] | lanes |
The lanes. Reference to all the lanes. More... | |
bool | travelingOnConector = false |
The traveling on conector. Is the car traveling on a connector?. More... | |
bool | wasTravelingOnConnector = false |
The was traveling on connector. Was this car traveling on a connector? More... | |
int | selectedConnector = 0 |
The selected connector. More... | |
TSLaneConnector | lastSelectedConnector |
The last selected connector. More... | |
int | lastLane = 0 |
The last lane. More... | |
int | myID |
My ID. This is a reference to the instance ID. More... | |
float | relativeWPosMagnitude = 0 |
The relative W position magnitude. More... | |
bool | changingLane = false |
The changing lane. More... | |
bool | overTaking = false |
The over taking. More... | |
Queue< TSReservedPoints > | reservedPoints = new Queue<TSReservedPoints>() |
The reserved points. A Queue of all the points that have been reserved by this car. More... | |
int | nextTrackIndex = 0 |
The index of the next track. More... | |
Queue< TSReservedPoints > | reservedChangeLanePoints = new Queue<TSReservedPoints>() |
The reserved change lane points. More... | |
Queue< TSLaneConnector > | reservedConnectors = new Queue<TSLaneConnector>() |
The reserved connectors. More... | |
bool | starting = true |
The starting. This is for internal use. More... | |
TS navigation. This clas is responsible for navigating throught the lanes and selecting the next connector/lane the car would go by.
void TSNavigation.LaneChange | ( | bool | left | ) |
Change to another lane.
left | If set to true left. |
void TSNavigation.OverTaking | ( | bool | left | ) |
Overtakes if there is free lanes.
left | If set to true left. |
bool TSNavigation.ReserveNearConnectorPoints | ( | ref TSLaneConnector | connector, |
int | lane | ||
) |
Reserves the near connector points.
true
, if near connector points was reserved, false
otherwise.connector | Connector. |
lane | Lane. |
bool TSNavigation.ReserveNearConnectorPoints | ( | ref TSPoints | points, |
ref TSLaneConnector | connector | ||
) |
Reserves the near connector points.
true
, if near connector points was reserved, false
otherwise.points | Points. |
connector | Connector. |
bool TSNavigation.SwitchTrack | ( | ) |
Switchs the track.
true
, if track was switched, false
otherwise.bool TSNavigation.changingLane = false |
The changing lane.
int TSNavigation.currentLane = 0 |
The current lane.
float TSNavigation.currentMaxSpeed = 50f |
The current max speed.
int TSNavigation.currentWaypoint = 0 |
The max waiting time. This value would be compared with the amount of time a car is waiting on a junction to cross it, this is to avoid or at least try to prevent traffic jams.
The current waypoint this car is pointing at, and using for steering.
int TSNavigation.currentWaypointOnCar = 0 |
The current waypoint on car.
TSLaneInfo [] TSNavigation.lanes |
The lanes. Reference to all the lanes.
int TSNavigation.lastLane = 0 |
The last lane.
TSLaneConnector TSNavigation.lastSelectedConnector |
The last selected connector.
TSPoints [] TSNavigation.lastWaypoints |
The last waypoints. This array holds the last lane points reference.
int TSNavigation.myID |
My ID. This is a reference to the instance ID.
TSNextLaneSelection TSNavigation.nextTrack = new TSNextLaneSelection() |
The next track.
int TSNavigation.nextTrackIndex = 0 |
The index of the next track.
List<TSNextLaneSelection> TSNavigation.nextTrackPath = new List<TSNextLaneSelection>() |
The next track path. This list hold the next lanes/connectors this car would be traveling to.
bool TSNavigation.overTaking = false |
The over taking.
int TSNavigation.previousWaypointSteer = 0 |
The previous waypoint steer.
Vector3 TSNavigation.RelativeWaypointPosition = Vector3.zero |
The relative waypoint position.
Vector3 TSNavigation.RelativeWaypointPositionOnCar = Vector3.zero |
The relative waypoint position on car.
float TSNavigation.relativeWPosMagnitude = 0 |
The relative W position magnitude.
Queue<TSReservedPoints> TSNavigation.reservedChangeLanePoints = new Queue<TSReservedPoints>() |
The reserved change lane points.
Queue<TSLaneConnector> TSNavigation.reservedConnectors = new Queue<TSLaneConnector>() |
The reserved connectors.
Queue<TSReservedPoints> TSNavigation.reservedPoints = new Queue<TSReservedPoints>() |
The reserved points. A Queue of all the points that have been reserved by this car.
int TSNavigation.selectedConnector = 0 |
The selected connector.
bool TSNavigation.starting = true |
The starting. This is for internal use.
bool TSNavigation.travelingOnConector = false |
The traveling on conector. Is the car traveling on a connector?.
bool TSNavigation.wasTravelingOnConnector = false |
The was traveling on connector. Was this car traveling on a connector?
TSPoints [] TSNavigation.waypoints |
The waypoints. This array holds the current lane points reference.