OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::InterSenseModule Class Reference
[Device Input Classes]

The module and factory to drive the InterSenseSource nodes. More...

#include <InterSenseModule.h>

Inheritance diagram for ot::InterSenseModule:

Inheritance graph
[legend]
Collaboration diagram for ot::InterSenseModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InterSenseModule ()
virtual ~InterSenseModule ()
virtual void init (StringTable &attributes, ConfigNode *localTree)
virtual NodecreateNode (const std::string &name, StringTable &attributes)
virtual void start ()
virtual void close ()
virtual void pushEvent ()

Protected Attributes

ISTrackerVector trackers

Detailed Description

The module and factory to drive the InterSenseSource nodes.

It constructs InterSenseSource nodes via the NodeFactory interface and pushes events into the tracker tree according to the nodes configuration.

On Windows it relies on the isense.dll and itrax2.dll distributed with OpenTracker in the bin directory. These include support for USB based InterTrax2 devices. The Unix version relies distributed code from InterSense.

Author:
Ivan Viola, Matej Mlejnek, Gerhard Reitmayr

Definition at line 97 of file InterSenseModule.h.


Constructor & Destructor Documentation

ot::InterSenseModule::InterSenseModule (  )  [inline]

constructor method.

Definition at line 108 of file InterSenseModule.h.

ot::InterSenseModule::~InterSenseModule (  )  [virtual]

Destructor method, clears nodes member.

Definition at line 74 of file InterSenseModule.cxx.


Member Function Documentation

void ot::InterSenseModule::close (  )  [virtual]

closes InterSense library

Reimplemented from ot::Module.

Definition at line 214 of file InterSenseModule.cxx.

References trackers.

Node * ot::InterSenseModule::createNode ( const std::string &  name,
StringTable attributes 
) [virtual]

This method is called to construct a new Node.

It compares name to the InterTraxSource element name, and if it matches creates a new InterTraxSource node.

Parameters:
name reference to string containing element name refenrence to StringTable containing attribute values
Returns:
pointer to new Node or NULL. The new Node must be allocated with new !

Implements ot::NodeFactory.

Definition at line 160 of file InterSenseModule.cxx.

References ot::StringTable::get(), and trackers.

void ot::InterSenseModule::init ( StringTable attributes,
ConfigNode localTree 
) [virtual]

initializes the tracker module.

For each configured tracker it allocates an ISTracker structure and initializes the tracker.

Parameters:
attributes StringTable of elements attribute values. Should be possibly , but is not for convenience.
localTree pointer to root of configuration nodes tree

Reimplemented from ot::Module.

Definition at line 79 of file InterSenseModule.cxx.

References ot::ISTracker::comport, ot::ConfigNode::countChildren(), ot::StringTable::get(), ot::ConfigNode::getChild(), ot::ISTracker::handle, ot::ISTracker::id, ot::ISTracker::info, ot::Module::init(), and trackers.

void ot::InterSenseModule::pushEvent (  )  [virtual]

pushes events into the tracker tree.

Checks all trackers for new data and fires the InterSenseSources, if new data is present.

Reimplemented from ot::Module.

Definition at line 223 of file InterSenseModule.cxx.

References ot::MathUtils::eulerToQuaternion(), ot::MathUtils::GradToRad, trackers, and ot::MathUtils::YXZ.

void ot::InterSenseModule::start (  )  [virtual]

starts the module.

Here we will reset the heading of any pure orientation tracker.

Reimplemented from ot::Module.

Definition at line 196 of file InterSenseModule.cxx.

References trackers.


Member Data Documentation

stores information about the configured trackers and the sources.

Definition at line 103 of file InterSenseModule.h.

Referenced by close(), createNode(), init(), pushEvent(), and start().


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

copyright (c) 2006 Graz University of Technology