#include <RectangleMobility.h>
Inherits BasicMobility.
Inheritance diagram for RectangleMobility:


Public Member Functions | |
| Module_Class_Members (RectangleMobility, 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. | |
| void | calculateXY () |
| Maps d to (x,y) coordinates. | |
Protected Attributes | |
| double | x1 |
| double | y1 |
| double | x2 |
| double | y2 |
| rectangle bounds | |
| double | d |
| distance from (x1,y1), measured clockwise on the perimeter | |
| double | corner1 |
| double | corner2 |
| double | corner3 |
| double | corner4 |
| Coord | targetPos |
| Target position of the host. | |
|
|
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. |
|
|
Initializes mobility model parameters. Reads the parameters. If the host is not stationary it calculates a random position and schedules a timer to trigger the first movement Reimplemented from BasicMobility. |
1.4.4