move Position class in own header
This commit is contained in:
@@ -26,13 +26,6 @@ namespace ns3 {
|
||||
|
||||
const InterfaceId MobilityModel::iid = MakeInterfaceId ("MobilityModel", Object::iid);
|
||||
|
||||
|
||||
Position::Position (double _x, double _y, double _z)
|
||||
: x (_x),
|
||||
y (_y),
|
||||
z (_z)
|
||||
{}
|
||||
|
||||
MobilityModel::MobilityModel ()
|
||||
{
|
||||
SetInterfaceId (MobilityModel::iid);
|
||||
|
||||
@@ -22,18 +22,10 @@
|
||||
#define MOBILITY_MODEL_H
|
||||
|
||||
#include "ns3/object.h"
|
||||
#include "position.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Position
|
||||
{
|
||||
public:
|
||||
Position (double x, double y, double z);
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief keep track of the current position of an object
|
||||
*
|
||||
|
||||
12
src/node/position.cc
Normal file
12
src/node/position.cc
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "position.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
Position::Position (double _x, double _y, double _z)
|
||||
: x (_x),
|
||||
y (_y),
|
||||
z (_z)
|
||||
{}
|
||||
|
||||
} // namespace ns3
|
||||
17
src/node/position.h
Normal file
17
src/node/position.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef POSITION_H
|
||||
#define POSITION_H
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Position
|
||||
{
|
||||
public:
|
||||
Position (double x, double y, double z);
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* POSITION_H */
|
||||
Reference in New Issue
Block a user