VANET Simulator
 All Classes Functions Variables
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vanetsim.scenario.LaneObject Class Reference
Inheritance diagram for vanetsim.scenario.LaneObject:
vanetsim.scenario.events.BlockingObject vanetsim.scenario.Vehicle

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
 

Detailed Description

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).

Member Function Documentation

void vanetsim.scenario.LaneObject.calculatePosition ( )
inlineprotected

Calculate position on map (curX and curY). Needed for rendering, communication and so on.

boolean vanetsim.scenario.LaneObject.getCurDirection ( )
inline

Gets the current direction on the street.

Returns
true = moving from startNode to endNode
false = moving from endNode to startNode
int vanetsim.scenario.LaneObject.getCurLane ( )
inline

Gets the current lane.

Returns
the lane measured from the right side of the street
double vanetsim.scenario.LaneObject.getCurPosition ( )
inline

Gets the current relative position of this object.

Returns
the current position measured in cm from startNode
int vanetsim.scenario.LaneObject.getCurSpeed ( )
inline

Gets the current speed of this object.

Returns
the current speed in cm/s
Street vanetsim.scenario.LaneObject.getCurStreet ( )
inline

Gets the current street.

Returns
the street
LaneObject vanetsim.scenario.LaneObject.getNext ( )
inline

Returns the LaneObject after this one.

Returns
the next
LaneObject vanetsim.scenario.LaneObject.getPrevious ( )
inline

Returns the LaneObject before this one.

Returns
the previous
int vanetsim.scenario.LaneObject.getX ( )
inline

Gets the current x coordinate.

Returns
the current x coordinate
int vanetsim.scenario.LaneObject.getY ( )
inline

Gets the current y coordinate.

Returns
the current y coordinate
void vanetsim.scenario.LaneObject.setNext ( LaneObject  next)
inline

Sets the LaneObject after this one.

Parameters
nextthe object which comes after this one
void vanetsim.scenario.LaneObject.setPrevious ( LaneObject  previous)
inline

Sets the LaneObject before this one.

Parameters
previousthe object which comes before this one

Member Data Documentation

boolean vanetsim.scenario.LaneObject.curDirection_ = true
protected

The direction of the object on the street.
true = moving from startNode to endNode
false = moving from endNode to startNode

int vanetsim.scenario.LaneObject.curLane_ = 1
protected

The current lane (1-n with n=lanecount of one side of the street).

double vanetsim.scenario.LaneObject.curPosition_
protected

The position on the street measured in cm from the startNode.

double vanetsim.scenario.LaneObject.curSpeed_ = 0.0
protected

The current speed measured in cm/s.

Street vanetsim.scenario.LaneObject.curStreet_
protected

The street on which this vehicle currently moves.

int vanetsim.scenario.LaneObject.curX_
protected

The current X coordinate.

int vanetsim.scenario.LaneObject.curY_
protected

The current Y coordinate.

LaneObject vanetsim.scenario.LaneObject.next_
protected

Link to the next object.

LaneObject vanetsim.scenario.LaneObject.previous_
protected

Link to the previous object.


The documentation for this class was generated from the following file: