#include <P_Tracker.h>
Inheritance diagram for VMDTracker:
Public Methods | |
VMDTracker () | |
Constructor: initialize variables, but do not establish any connection. More... | |
virtual | ~VMDTracker () |
virtual const char * | device_name () const=0 |
Device name; must be unique to other VMDTracker subclasses. More... | |
virtual VMDTracker * | clone ()=0 |
virtual int | start (const SensorConfig *) |
Establish connection to remote device in the start() method, not in the constructor. More... | |
virtual void | update ()=0 |
virtual int | alive ()=0 |
const float * | position () |
const Matrix4 & | orientation () |
void | set_offset (const float o[3]) |
const float * | get_offset () const |
void | set_scale (float s) |
float | get_scale () const |
void | set_right_rot (const Matrix4 *right) |
void | set_left_rot (const Matrix4 *left) |
int | dimension () const |
dimension of positions returned by the device; subclasses set the dim variable. More... | |
Protected Methods | |
void | moveto (float x, float y, float z) |
virtual int | do_start (const SensorConfig *) |
Do device-specific configuration. Return success. More... | |
Protected Attributes | |
int | dim |
set by subclass; default is three. More... | |
float | pos [3] |
Matrix4 * | orient |
Matrix4 | rot_orient |
Common notes for VMDTracker, Feedback, and Buttons classes, collectively referred to as devices in what follows.
Constructor: The constructor must not require any input arguments. The reason for this is that an instance of every class is created and held in an associative store so that it can be referenced by its device_name() string. This instantiation is done independently of any device configuration, such as what would be found in the .vmdsensors file. Constructors should thus do nothing but initialize member data to NULL or default values.
device_name(): This pure virtual function supplies a string by which the device can be accessed in an associative store (since classes aren't first-class objects in C++). The name must be unique to that class, among all devices of that type.
clone(): This should do nothing more that return an instance of the class.
do_start(const SensorConfig *): Here's where the action is: This method will be called from the base class start() method after general initialization is done. This method is where the subclass should, e.g., establish a connection to a remote device. If there is no class-specific initialization to do then the subclass need not override this method.
start() should be called only once in a device's life, when it is first added to a Tool.
Definition at line 72 of file P_Tracker.h.
|
Constructor: initialize variables, but do not establish any connection.
Definition at line 27 of file P_Tracker.C. References dim, Matrix4::identity, orient, and pos. |
|
Definition at line 34 of file P_Tracker.C. References orient. |
|
Implemented in MobileTracker. |
|
Implemented in MobileTracker. |
|
Device name; must be unique to other VMDTracker subclasses.
Implemented in MobileTracker. |
|
dimension of positions returned by the device; subclasses set the dim variable.
Definition at line 137 of file P_Tracker.h. References dim. Referenced by Tool::dimension. |
|
Do device-specific configuration. Return success.
Reimplemented in MobileTracker. Definition at line 92 of file P_Tracker.h. Referenced by start. |
|
Definition at line 127 of file P_Tracker.h. Referenced by Tool::addplaneconstraint, Tool::getoffset, Tool::setconstraint, and Tool::setplaneconstraint. |
|
Definition at line 130 of file P_Tracker.h. Referenced by Tool::addplaneconstraint, Tool::getscale, Tool::setconstraint, Tool::setforcefield, and Tool::setplaneconstraint. |
|
Definition at line 87 of file P_Tracker.h. Referenced by SpaceballTracker::do_start, MobileTracker::do_start, SpaceballTracker::update, VRPNTracker::update, and MobileTracker::update. |
|
Definition at line 115 of file P_Tracker.h. References Matrix4::loadmatrix, and Matrix4::multmatrix. |
|
Definition at line 109 of file P_Tracker.h. References pos. |
|
Definition at line 133 of file P_Tracker.h. Referenced by start. |
|
Definition at line 122 of file P_Tracker.h. Referenced by Tool::setoffset, and start. |
|
Definition at line 132 of file P_Tracker.h. Referenced by start. |
|
Definition at line 129 of file P_Tracker.h. Referenced by Tool::setscale, and start. |
|
Establish connection to remote device in the start() method, not in the constructor.
Definition at line 38 of file P_Tracker.C. References do_start, SensorConfig::getleft_rot, SensorConfig::getoffset, SensorConfig::getright_rot, SensorConfig::getscale, set_left_rot, set_offset, set_right_rot, and set_scale. Referenced by Tool::add_tracker. |
|
Implemented in MobileTracker. |
|
set by subclass; default is three.
Definition at line 81 of file P_Tracker.h. Referenced by dimension, and VMDTracker. |
|
Definition at line 84 of file P_Tracker.h. Referenced by SpaceballTracker::do_start, MobileTracker::do_start, VRJugglerTracker::update, SpaceballTracker::update, VRPNTracker::update, FreeVRTracker::update, CaveTracker::update, MobileTracker::update, VMDTracker, VRPNTracker::VRPNTracker, and ~VMDTracker. |
|
Definition at line 83 of file P_Tracker.h. Referenced by moveto, position, VRJugglerTracker::update, SpaceballTracker::update, FreeVRTracker::update, CaveTracker::update, MobileTracker::update, VMDTracker, and VRPNTracker::VRPNTracker. |
|
Definition at line 85 of file P_Tracker.h. |