Circle movement model. See NED file for more info. More...
#include <CircleMobility.h>
Inherits BaseMobility.
Public Member Functions | |
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 | |
Coord | center |
double | r |
double | omega |
angular velocity [rad/s], derived from speed and radius | |
double | angle |
direction from the centre of the circle | |
Coord | targetPos |
Target position for the host. |
Circle movement model. See NED file for more info.
NOTE: Does not yet support 3-dimensional movement.
Definition at line 33 of file CircleMobility.h.
void CircleMobility::fixIfHostGetsOutside | ( | ) | [protected, virtual] |
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 BaseMobility.
Definition at line 75 of file CircleMobility.cc.
References BaseMobility::handleIfOutside(), targetPos, BaseWorldUtility::use2D(), BaseMobility::world, and BaseMobility::WRAP.
Referenced by makeMove().