Aimsun Next Scripting
22
|
Public Types | |
enum | GKSectionLaneFlowDirection { eNormal , eInverse , eBidirectional } |
It can be a full lane or a side lane. If it is a side lane it can be an entry or an exit side lane.
An entry side lane have initialOffset equal to 0.0 and finalOffset equal to the length of the side lane.
An exit side lane have initialOffset equal to the length of the side lane (but negative) and finalOffset equal to 0.0.
Example: an entry side lane of 10 m will have:
Other side lane configurations are possible but not supported (as laterals that starts and ends at position that are not the start and end of the section).
A lane can also have a solid line disabling lane change. A lane specifies solid line information for its right part, that is:
LANE 0 ->
A lane can have more that one solid line:
In the previous example the lane has three solid lines, at right, at left and at both sides.
Note that a solid line at left and at right in the same position is equivalent to a solid line at both sides.
A lane can also be reserved (using the GKLaneType) for a particular vehicle class. If so the user can select if the last and/or first segments of the lane are reserved too (In some cases the last segment is not reserved to allow a turn for any vehicle class).
GKSectionLane::GKSectionLane | ( | ) |
void GKSectionLane::addSolidLine | ( | GKSectionLaneSolid & | solid | ) |
Add a solid line. The object is adopted.
bool GKSectionLane::canEnterFlow | ( | ) | const |
Returns true if flow can enter in this lane (it do not check if the lane is connected to in a turn but just if it can be connected and, thus, receive flow).
bool GKSectionLane::canExitFlow | ( | ) | const |
Returns true if flow can exit from this lane (it do not check if the lane is connected to in a turn but just if it can be connected and, thus, flow can use it to exit the section).
bool GKSectionLane::canUse | ( | GKVehicleClass * | ) | const |
Return true if this vehicle class can use this section lane.
void GKSectionLane::changeDirection | ( | GKCoord | sectionLength | ) |
Changes the lane direction, that is moves the solid lines, speed segments,... to maintain its original position in the lane with a changed direction.
void GKSectionLane::clearSolidLines | ( | ) |
Discard all the solid lines. Objects are deleted.
double GKSectionLane::getFinalOffset | ( | ) | const |
For side lanes, returns the final offset of the lane. See GKSectionLane.
const GKSectionLaneFlowDirection GKSectionLane::getFlowDirection | ( | ) | const |
Return the flow direction. See GKSectionLane::GKSectionLaneFlowDirection.
double GKSectionLane::getInitialOffset | ( | ) | const |
For side lanes, returns the initial offset of the lane. See GKSectionLane.
GKLaneType * GKSectionLane::getLaneType | ( | ) | const |
Get the lane's laneType attribute. Returns NULL any lane type has been defined,
bool GKSectionLane::getReserveFirstSegment | ( | const GKSection * | section | ) | const |
Returns true is the first segment is reserved too.
bool GKSectionLane::getReserveLastSegment | ( | const GKSection * | section | ) | const |
Returns true is the last segment is reserved too.
const GKCoord GKSectionLane::getSideLaneLength2D | ( | ) | const |
Returns the length of this lane if it is a side lane.
QVector< GKSectionLaneSolid > & GKSectionLane::getSolidLines | ( | ) |
Get all the solid lines from this lane.
double GKSectionLane::getStopLine | ( | ) | const |
Stop Line distance from the beginning of the section (in meters).
double GKSectionLane::getWidth | ( | ) | const |
Return the lane width. The value can be 0.0. In this case no width has been set and the default value from GKSection::getLaneWidth must be used.
It is better to access this value through the section method GKSection::getLaneWidth( uint lanepos ) as it will take care of 0.0 values.
bool GKSectionLane::isAnEntryLateral | ( | ) | const |
Check if the section lane is an entry lateral lane.
bool GKSectionLane::isAnExitLateral | ( | ) | const |
Check if the section lane is an exit lateral lane.
bool GKSectionLane::isFullLane | ( | ) | const |
Return true is this lane goes from the beginning to the end of the section.
bool GKSectionLane::isReserved | ( | ) | const |
Returns true if this lane is reserved for any vehicle type.
bool GKSectionLane::isReserved | ( | GKVehicle * | vehicle | ) | const |
Returns true if this lane is reserved for the vehicle type.
void GKSectionLane::removeSolidLine | ( | GKSectionLaneSolid & | solid | ) |
Remove a solid line. The object is removed from the list but not deleted.
void GKSectionLane::setFlowDirection | ( | const | GKSectionLaneFlowDirection | ) |
Sets the flow direction. See GKSectionLane::GKSectionLaneFlowDirection.
void GKSectionLane::setLaneType | ( | GKLaneType * | laneType | ) |
Set the lane's laneType attribute,
void GKSectionLane::setLength | ( | const | GKCoord | ) |
Change the length of this lane if it is a side lane.
void GKSectionLane::setOffsets | ( | double | , |
double | |||
) |
For side lanes, sets the offsets of the lane. A side lane cannot be shorter than 5 meters. See GKSectionLane.
void GKSectionLane::setReserveFirstSegment | ( | bool | value | ) |
Set the reservation status of the first segment.
void GKSectionLane::setReserveLastSegment | ( | bool | value | ) |
Set the reservation status of the last segment.
void GKSectionLane::setStopLine | ( | double | v | ) |
Stop Line distance from the beginning of the section (in meters)
void GKSectionLane::setWidth | ( | double | w | ) |
Set the lane width.
void GKSectionLane::unselectAllSolidLines | ( | ) |
Unselect all the selected solid lines.