MoCapFile Class Reference
[IStage]

#include <MoCapFile.h>

Inheritance diagram for MoCapFile:

Inheritance graph
[legend]
Collaboration diagram for MoCapFile:

Collaboration graph
[legend]
List of all members.

Detailed Description

The MoCapFile serves as a base class for different MoCap data sources.

See also:
EVaRT for an example of connecting to the EVaRT system.

MAAsciiFile for an example of reading a .TRC file.


Public Types

enum  MoCapFileType { type_unspecified, type_MAAscii, type_EVaRT }
enum  MoCapOptions { option_sticky = 1, option_labeled }
typedef boost::signal< Signature > default_signal_t

Public Member Functions

virtual MoCapFileType Type ()=0
virtual bool Open (const char *file_name)=0
virtual bool Reopen ()=0
 Reopens the file (returns to the beginning).
virtual bool IsOpen () const=0
 Returns true if the file is open.
virtual string const & GetName () const=0
 returns the name of the opened file
virtual void operator() ()=0
 Reads the next frame of data. Intended for signal_link mechanism.
virtual int GetRecentFrame (MoCapFrame &frame)=0
 Returns the frame information for the most recently received/read frame.
virtual int GetNumMarkers () const=0
 returns the number of labeled markers in model
virtual string const & GetLabel (int i) const =0
 returns the label of a marker
virtual vector< string > const & GetLabels () const=0
 returns the vector of labels
virtual int GetIndex (string const &label) const =0
 returns the index of a marker label (case sensitive)
virtual int GetMinFrame () const=0
 returns the minimum frame available
virtual int GetMaxFrame () const=0
 returns the maximum frame available
virtual unsigned DefaultOptions ()
 Default options for the MoCapFile class are sticky=off, labeled=on.
void EnableOptions (unsigned o)
 Enables specified options.
void DisableOptions (unsigned o)
 Disables specified options.
void SetOptionsTo (unsigned o, bool on)
void SetOptions (unsigned o)
 Sets the options to the specified values.
virtual unsigned GetOptions ()
 Returns the current options for the object.
virtual bool GetOption (unsigned o)
 Returns true if all specified options are enabled.
 operator unsigned ()
const default_signal_t & default_signal () const
 Returns the default out signal.
template<typename T>
Descendant & operator>>= (T &link)
 Connects a sequence of components using signals.
template<typename T>
Descendant & operator>>= (slot_selector_t< T, Signature > link)
 Allows slot functions other than operator() to be used in a sequence of components.
template<typename T>
Descendant & operator>= (T &link)
 Allows branching in a component connection sequence.
template<typename T>
Descendant & operator>= (const slot_selector_t< T, Signature > &link)
 Allows slot functions other than operator() to be used with branching.
void disconnect_all_slots ()
 Disconnects all slots connected to the signal_link.

Static Public Member Functions

static unsigned ClassDefaultOptions ()
 Default options for the MoCapFile class are sticky=off, labeled=on.
static MoCapFileLoad (const char *file_name, MoCapFileType file_type=type_unspecified)

Protected Attributes

unsigned options
 options fine-tuning the behavior of the class
default_signal_t out


Member Function Documentation

virtual bool Open ( const char *  file_name  )  [pure virtual]

Opens the file and prepares for frame reading.

Returns:
true if an error occurs

Implemented in EVaRT, and MAAsciiFile.

virtual int GetRecentFrame ( MoCapFrame frame  )  [pure virtual]

Returns the frame information for the most recently received/read frame.

Returns:
the frame number of the frame (negative if an error occured).

Implemented in EVaRT, and MAAsciiFile.

virtual int GetIndex ( string const &  label  )  const [pure virtual]

returns the index of a marker label (case sensitive)

Returns:
-1 if the label is not found

Implemented in EVaRT, and MAAsciiFile.

Descendant& operator>>= ( T &  link  )  [inline, inherited]

Connects a sequence of components using signals.

This operator is identical to signal_link::operator>= (it connects the left component to the right component, and returns a reference to the left component), except it is evaluated right to left. This makes it semantics more suitable for connecting a chain of connections.

Descendant& operator>>= ( slot_selector_t< T, Signature >  link  )  [inline, inherited]

Allows slot functions other than operator() to be used in a sequence of components.

See also:
slot_selector()

Descendant& operator>= ( T &  link  )  [inline, inherited]

Allows branching in a component connection sequence.

This operator is identical to signal_link::operator>>=, (it connects the left component to the right component, and returns a reference to the left component) except it is evaluated left to right. This makes its semantics more suitable for branching connections.

Descendant& operator>= ( const slot_selector_t< T, Signature > &  link  )  [inline, inherited]

Allows slot functions other than operator() to be used with branching.

See also:
slot_selector()


The documentation for this class was generated from the following file:
Generated on Tue Mar 6 17:57:16 2007 for AME Repository by  doxygen 1.5.1-p1