#include <linear_movement.h>


Public Member Functions | |
| virtual void | set_parameters (double velocity, Vec destination, World &world) |
| virtual void | timeout (EventScheduler &, EventScheduler::EventHandle, double, EventScheduler::EventTagHandle &) throw () |
| Internal. | |
construction / destruction | |
| LinearMovement () | |
| virtual | ~LinearMovement () |
| virtual void | init (Node &) throw () |
| virtual void | init_from (Node &, NodeMovement &) throw () |
inherited from NodeMovement | |
| virtual bool | set_position (const Vec &) throw () |
| virtual Vec | position (void) const throw () |
| virtual Vec | velocity (void) const throw () |
| virtual std::string | name (void) const throw () |
Protected Member Functions | |
| virtual void | boxes_changed () throw () |
| shawn::LinearMovement::LinearMovement | ( | ) |
| virtual shawn::LinearMovement::~LinearMovement | ( | ) | [virtual] |
| virtual void shawn::LinearMovement::init | ( | Node & | ) | throw () [virtual] |
Called from Node when added there!
Should call set_node() and obtain_initial_boxes()
Implements shawn::NodeMovement.
| virtual void shawn::LinearMovement::init_from | ( | Node & | , | |
| NodeMovement & | ||||
| ) | throw () [virtual] |
Implements shawn::NodeMovement.
| virtual bool shawn::LinearMovement::set_position | ( | const Vec & | ) | throw () [virtual] |
Sets the new Position to be identical to the given position Vec
Implements shawn::NodeMovement.
| virtual Vec shawn::LinearMovement::position | ( | void | ) | const throw () [virtual] |
Returns the Position according to the current simulation time.
Implements shawn::NodeMovement.
| virtual Vec shawn::LinearMovement::velocity | ( | void | ) | const throw () [virtual] |
Returns the speed of the Node according to the current simulation time.
Implements shawn::NodeMovement.
| virtual std::string shawn::LinearMovement::name | ( | void | ) | const throw () [virtual] |
Returns the type of Movement, in this case LinearMovement
Implements shawn::NodeMovement.
| virtual void shawn::LinearMovement::set_parameters | ( | double | velocity, | |
| Vec | destination, | |||
| World & | world | |||
| ) | [virtual] |
This method sets the scalar velocity and the destination vector for the LinearMovement
| virtual void shawn::LinearMovement::timeout | ( | EventScheduler & | , | |
| EventScheduler::EventHandle | , | |||
| double | , | |||
| EventScheduler::EventTagHandle & | ||||
| ) | throw () [virtual] |
Internal.
This method is called by the EventScheduler when the timeout of a registered Event is reached This is used to inform subscribers when a Box has been reached
| virtual void shawn::LinearMovement::boxes_changed | ( | ) | throw () [protected, virtual] |
This method checks at what time a node is going to leave the first of the subscribed boxes and generates a corresponding Event for the Scheduler.
Implements shawn::NodeMovement.
1.5.6