#include <bmposition.h>
Inheritance diagram for BMPosition:
Public Member Functions | |
BMPosition () | |
virtual | ~BMPosition () |
virtual double | getX () |
virtual double | getY () |
virtual int | command (int argc, const char *const *argv) |
Private Member Functions | |
void | update (double now) |
Private Attributes | |
double | trgTime_ |
double | lastUpdateTime_ |
time in which the TCL command setdest is invoked | |
double | Xdest_ |
time last updated of the coordinates was computed | |
double | Ydest_ |
position on the x-axis of the destination point | |
double | Xsorg_ |
position on the y-axis of the destination point | |
double | Ysorg_ |
position on the x-axis of the starting point (when the TCL command setdest is invoked) | |
double | speed_ |
position on the y-axis of the starting point (when the TCL command setdest is invoked) | |
int | debug_ |
speed of the node |
Definition at line 50 of file bmposition.h.
BMPosition::BMPosition | ( | ) |
BMPosition::~BMPosition | ( | ) | [virtual] |
Destructor
Definition at line 51 of file bmposition.cc.
double BMPosition::getX | ( | ) | [virtual] |
Method that return the current projection of the node on the x-axis. If it's necessary (updating time ia expired), update the position values before returns it.
Reimplemented from Position.
Definition at line 103 of file bmposition.cc.
References lastUpdateTime_, trgTime_, update(), and Position::x_.
Here is the call graph for this function:
double BMPosition::getY | ( | ) | [virtual] |
Method that return the current projection of the node on the y-axis. If it's necessary (updating time ia expired), update the position values before returns it.
Reimplemented from Position.
Definition at line 111 of file bmposition.cc.
References lastUpdateTime_, trgTime_, update(), and Position::y_.
Here is the call graph for this function:
int BMPosition::command | ( | int | argc, | |
const char *const * | argv | |||
) | [virtual] |
TCL command interpreter setdest <integer value>integer value>integer value>: set the movement pattern: the firts two values define the point to be reached (i.e., the direction of the movement) and the third value defines the speed to be used
Moreover it inherits all the OTcl method of Position
argc | number of arguments in argv | |
argv | array of strings which are the comand parameters (Note that argv[0] is the name of the object) |
Reimplemented from Position.
Definition at line 55 of file bmposition.cc.
References Position::command(), debug_, speed_, trgTime_, Position::x_, Xdest_, Xsorg_, Position::y_, Ydest_, and Ysorg_.
Here is the call graph for this function:
void BMPosition::update | ( | double | now | ) | [private] |
Method that updates both the position coordinates
Definition at line 84 of file bmposition.cc.
References debug_, lastUpdateTime_, speed_, trgTime_, Position::x_, Xdest_, Xsorg_, Position::y_, Ydest_, and Ysorg_.