#include <LinearMobility.h>
Inherits BasicMobility.
Inheritance diagram for LinearMobility:
Public Member Functions | |
Module_Class_Members (LinearMobility, BasicMobility, 0) | |
virtual void | initialize (int) |
Initializes mobility model parameters. | |
Protected Member Functions | |
virtual void | makeMove () |
Move the host. | |
virtual void | fixIfHostGetsOutside () |
Should be redefined in subclasses. | |
Protected Attributes | |
double | angle |
angle of linear motion | |
double | acceleration |
acceleration of linear motion | |
Coord | stepTarget |
always stores the last step for position display update |
|
Should be redefined in subclasses. Should invoke handleIfOutside() and pass the references to the parameters to be modified. Additional action after border handling (such as choosing a new target position if the BorderPolicy is PLACERANDOMLY) should be implemented here.
Reimplemented from BasicMobility. |
|
Move the host. Move the host if the destination is not reached yet. Otherwise calculate a new random position Reimplemented from BasicMobility. |