#include <no_movement.h>


Public Member Functions | |
construction / destruction | |
| NoMovement () | |
| virtual | ~NoMovement () |
| virtual void | init (Node &) throw () |
| virtual void | init_from (Node &, NodeMovement &) throw () |
NodeMovement interface | |
only accepted *BEFORE* initialized... | |
| 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 () |
The NodeMovement does not allow a node to move. Calls to set_position() are rejected once the position is initialized (via set_initial_zone()).
| shawn::NoMovement::NoMovement | ( | ) |
| virtual shawn::NoMovement::~NoMovement | ( | ) | [virtual] |
| virtual void shawn::NoMovement::init | ( | Node & | ) | throw () [virtual] |
Called from Node when added there!
Should call set_node() and obtain_initial_boxes()
Implements shawn::NodeMovement.
| virtual void shawn::NoMovement::init_from | ( | Node & | , | |
| NodeMovement & | ||||
| ) | throw () [virtual] |
Implements shawn::NodeMovement.
| virtual bool shawn::NoMovement::set_position | ( | const Vec & | ) | throw () [virtual] |
sets the current position of the given node. There is no need for a NodeMovement to actually place the Node there, as it may be the single authority about node positions.
Implements shawn::NodeMovement.
| virtual Vec shawn::NoMovement::position | ( | void | ) | const throw () [virtual] |
returns the current position of the node.
Implements shawn::NodeMovement.
| virtual Vec shawn::NoMovement::velocity | ( | void | ) | const throw () [virtual] |
returns the current velocity vector of the node, ie, the derivate of the position function.
Therefore,
velocity().euclidean_norm()
Implements shawn::NodeMovement.
| virtual std::string shawn::NoMovement::name | ( | void | ) | const throw () [virtual] |
| virtual void shawn::NoMovement::boxes_changed | ( | ) | throw () [protected, virtual] |
Implements shawn::NodeMovement.
1.5.6