Public Member Functions | |
int | getX () |
int | getY () |
int | getCurSpeed () |
double | getCurPosition () |
int | getCurLane () |
Street | getCurStreet () |
boolean | getCurDirection () |
LaneObject | getNext () |
LaneObject | getPrevious () |
void | setNext (LaneObject next) |
void | setPrevious (LaneObject previous) |
Protected Member Functions | |
void | calculatePosition () |
Protected Attributes | |
LaneObject | previous_ |
LaneObject | next_ |
int | curX_ |
int | curY_ |
double | curSpeed_ = 0.0 |
double | curPosition_ |
int | curLane_ = 1 |
Street | curStreet_ |
boolean | curDirection_ = true |
This class represents an object which is on a lane of a street. Use this class as a base for all object which are on a lane (for example with a vehicle).
|
inlineprotected |
Calculate position on map (curX and curY). Needed for rendering, communication and so on.
|
inline |
Gets the current direction on the street.
true
= moving from startNode to endNodefalse
= moving from endNode to startNode
|
inline |
Gets the current lane.
|
inline |
Gets the current relative position of this object.
|
inline |
Gets the current speed of this object.
|
inline |
Gets the current street.
|
inline |
Returns the LaneObject after this one.
|
inline |
Returns the LaneObject before this one.
|
inline |
Gets the current x coordinate.
|
inline |
Gets the current y coordinate.
|
inline |
Sets the LaneObject after this one.
next | the object which comes after this one |
|
inline |
Sets the LaneObject before this one.
previous | the object which comes before this one |
|
protected |
The direction of the object on the street.
true
= moving from startNode to endNode
false
= moving from endNode to startNode
|
protected |
The current lane (1-n with n=lanecount of one side of the street).
|
protected |
The position on the street measured in cm from the startNode.
|
protected |
The current speed measured in cm/s.
|
protected |
The street on which this vehicle currently moves.
|
protected |
The current X coordinate.
|
protected |
The current Y coordinate.
|
protected |
Link to the next object.
|
protected |
Link to the previous object.