shawn::MovementObserver Class Reference

#include <movement_observer.h>

Inheritance diagram for shawn::MovementObserver:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~MovementObserver ()
virtual Box observer_initial_zone (Node &, const Vec &newpos, const Vec &velo)=0 throw ()
virtual Box observer_update_zone (Node &, const Vec &newpos, const Vec &velo)=0 throw ()


Detailed Description

Used to trace movements of nodes, this abstract callback interface is used for notification and information retrieval.

A class implementing this interface has to provide the methods below.

An initial box is the first box that a MovementObservable object must only leave if observer_update_zone() is called immediately after that. This will serve two purposes: Notification, that the box has been left and retrieval of a new box.

Currently, NodeMovement and Node inherit this interface. If you want to trace a nodes movement, simply add a MovementOverserver reference using the nodes' Node::observer_add method. You will then need to supply an initial box and later an updated box which a node must not leave whithout notification via a callback to your observer_update_zone() method.


Constructor & Destructor Documentation

virtual shawn::MovementObserver::~MovementObserver (  )  [virtual]

destructor


Member Function Documentation

virtual Box shawn::MovementObserver::observer_initial_zone ( Node ,
const Vec newpos,
const Vec velo 
) throw () [pure virtual]

Returns an initial bounding box. If a node leaves this box, observer_update_zone() must be called - by convention - by the observed movement to retrieve a new box.

Implemented in shawn::GridEdgeModel, shawn::LazyEdgeModel, and shawn::ListEdgeModel.

virtual Box shawn::MovementObserver::observer_update_zone ( Node ,
const Vec newpos,
const Vec velo 
) throw () [pure virtual]

Informs this Observer that the old box has been left by the NodeMovement / Node. A new box must be provided by this method.

Implemented in shawn::GridEdgeModel, shawn::LazyEdgeModel, and shawn::ListEdgeModel.


The documentation for this class was generated from the following file:

Generated on Tue Feb 7 00:01:08 2012 for Shawn by  doxygen 1.5.6