14#include "ns3/simulator.h"
28 : m_position(position),
35 : m_position(position),
double yMax
The y coordinate of the top bound of the box.
double xMin
The x coordinate of the left bound of the box.
double yMin
The y coordinate of the bottom bound of the box.
double xMax
The x coordinate of the right bound of the box.
double zMin
The z coordinate of the down bound of the box.
double zMax
The z coordinate of the up bound of the box.
Time m_lastUpdate
time of last update
Vector GetCurrentPosition() const
Get current position vector.
Vector m_position
state variable for current position
Vector GetVelocity() const
Get velocity; if paused, will return a zero vector.
void Update() const
Update position, if not paused, from last position and time of last update.
void UpdateWithBounds(const Rectangle &rectangle) const
Update position, if not paused, from last position and time of last update.
void Unpause()
Resume mobility from current position at current velocity.
void SetPosition(const Vector &position)
Set position vector.
void SetVelocity(const Vector &vel)
Set new velocity vector.
void Pause()
Pause mobility at current position.
Vector m_velocity
state variable for velocity
bool m_paused
state variable for paused
double yMax
The y coordinate of the top bound of the rectangle.
double xMax
The x coordinate of the right bound of the rectangle.
double xMin
The x coordinate of the left bound of the rectangle.
double yMin
The y coordinate of the bottom bound of the rectangle.
static Time Now()
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.