VRG3D::Event Class Reference

#include <Event.H>

List of all members.

Public Types

enum  EventType {

Public Member Functions

 Event (const std::string &name)
 Event (const std::string &name, const double data)
 Event (const std::string &name, const Vector2 &data)
 Event (const std::string &name, const Vector3 &data)
 Event (const std::string &name, const CoordinateFrame &data)
 Event (const std::string &name, const std::string &data)
virtual ~Event ()
std::string getName () const
EventType getType () const
double get1DData ()
Vector2 get2DData ()
Vector3 get3DData ()
CoordinateFrame getCoordinateFrameData ()
std::string getMsgData ()
std::string toString ()
void rename (const std::string &newname)
void serialize (BinaryOutput &b) const
void deserialize (BinaryInput &b)

Protected Attributes

std::string _name
EventType _type
double _data1D
Vector2 _data2D
Vector3 _data3D
CoordinateFrame _dataCF
std::string _dataMsg

Detailed Description

G3DVR Event class. To keep things simple, there are no subclasses of Event. The type of data that the event carries is interpreted differently based on the value of the type of the event. Button Events are typically sent by devices as two separate EVENTTYPE_STANDARD Events, the first named ButtonName_down and then when the button is released ButtonName_up.

Member Enumeration Documentation

EVENTTYPE_1D  standard type, carries no additional info
EVENTTYPE_2D  event that stores 1D data in a double
EVENTTYPE_3D  stores two doubles
EVENTTYPE_MSG  stores a G3D::CoordinateFrame

Constructor & Destructor Documentation

VRG3D::Event::Event ( const std::string &  name  )  [inline]

References _name, _type, and EVENTTYPE_STANDARD.

VRG3D::Event::Event ( const std::string &  name,
const double  data 
) [inline]

References _data1D, _name, _type, and EVENTTYPE_1D.

VRG3D::Event::Event ( const std::string &  name,
const Vector2 &  data 
) [inline]

References _data2D, _name, _type, and EVENTTYPE_2D.

VRG3D::Event::Event ( const std::string &  name,
const Vector3 &  data 
) [inline]

References _data3D, _name, _type, and EVENTTYPE_3D.

VRG3D::Event::Event ( const std::string &  name,
const CoordinateFrame &  data 
) [inline]

VRG3D::Event::Event ( const std::string &  name,
const std::string &  data 
) [inline]

References _dataMsg, _name, _type, and EVENTTYPE_MSG.

virtual VRG3D::Event::~Event (  )  [inline, virtual]

Member Function Documentation

std::string VRG3D::Event::getName (  )  const [inline]

References _name.

EventType VRG3D::Event::getType (  )  const [inline]

References _type.

double VRG3D::Event::get1DData (  ) 

Vector2 VRG3D::Event::get2DData (  ) 

Vector3 VRG3D::Event::get3DData (  ) 

CoordinateFrame VRG3D::Event::getCoordinateFrameData (  ) 

std::string VRG3D::Event::getMsgData (  ) 

std::string VRG3D::Event::toString (  ) 

void VRG3D::Event::rename ( const std::string &  newname  )  [inline]

References _name.

void VRG3D::Event::serialize ( BinaryOutput &  b  )  const

void VRG3D::Event::deserialize ( BinaryInput &  b  ) 

Member Data Documentation

std::string VRG3D::Event::_name [protected]

Referenced by Event(), getName(), and rename().

Referenced by Event(), and getType().

double VRG3D::Event::_data1D [protected]

Referenced by Event().

Vector2 VRG3D::Event::_data2D [protected]

Referenced by Event().

Vector3 VRG3D::Event::_data3D [protected]

Referenced by Event().

CoordinateFrame VRG3D::Event::_dataCF [protected]

Referenced by Event().

std::string VRG3D::Event::_dataMsg [protected]

Referenced by Event().

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

Generated on Wed Jan 26 06:35:59 2011 for VRG3D by  doxygen 1.5.6