Input event filters are all subclasses of the arIOFilter class. Filters are attached to an arInputNode (generally by the DeviceServer program, see the Input Devices chapter), which maintains a list of them and passes any events it receives through them.
Creating filter subclasses is quite simple. You need only override the protected virtual method
virtual bool arIOFilter::processEvent( arInputEvent& inputEvent );
This method will be called by the arInputNode for each event in the input stream. Is is passed the current event, and can do the following things:
That is all. For examples of working filters, see src/drivers/arTrackCalFilter.cpp (which applies the calibration correction for our Ascension MotionStar tracker--note that this is specific to our setup) and thePForth filter, src/drivers/arPForthFilter.cpp.