#include <GloveProxy.h>
Inheritance diagram for gadget::GloveProxy:


Public Methods | |
| GloveProxy () | |
| Constructs the proxy to point to the given glove device and sub-unit number. More... | |
| virtual | ~GloveProxy () |
| gmtl::Vec3f | getTipVector (GloveData::GloveComponent component) |
| gmtl::Matrix44f | getTipTransform (GloveData::GloveComponent component) |
| gmtl::Matrix44f | getJointTransform (GloveData::GloveComponent component, GloveData::GloveJoint joint) |
| GloveData | getData () |
| vpr::Interval | getTimeStamp () const |
| Returns time of last update. More... | |
| Glove * | getGlovePtr () |
| Returns a pointer to the device held by this proxy. More... | |
| int | getUnit () |
| Returns the subUnit number that this proxy points to. More... | |
| bool | isVisible () |
| bool | config (jccl::ConfigElementPtr element) |
| Configures the proxy. More... | |
| virtual Input * | getProxiedInputDevice () |
| Returns a pointer to the base class of the devices being proxied. More... | |
Static Public Methods | |
| std::string | getElementType () |
| Returns the string rep of the element type used to config this device. More... | |
Definition at line 54 of file GloveProxy.h.
|
|
Constructs the proxy to point to the given glove device and sub-unit number.
Definition at line 61 of file GloveProxy.h.
00062 {
00063 mUnitNum = -1;
00064 mVisible = true;
00065 }
|
|
|
Definition at line 67 of file GloveProxy.h.
00068 {}
|
|
|
Definition at line 70 of file GloveProxy.h.
00071 {
00072 if(isStupified())
00073 return gmtl::Vec3f(0,0,0);
00074 else
00075 return mTypedDevice->getTipVector(component,mUnitNum);
00076 }
|
|
|
Definition at line 78 of file GloveProxy.h.
00079 {
00080 if(isStupified())
00081 return gmtl::Matrix44f();
00082 else
00083 return mTypedDevice->getTipTransform(component,mUnitNum);
00084 }
|
|
||||||||||||
|
Definition at line 86 of file GloveProxy.h.
00087 {
00088 if(isStupified())
00089 return gmtl::Matrix44f();
00090 else
00091 return mTypedDevice->getJointTransform(component, joint, mUnitNum);
00092 }
|
|
|
Definition at line 94 of file GloveProxy.h.
00095 {
00096 if(isStupified())
00097 return GloveData();
00098 else
00099 return mTypedDevice->getGloveData(mUnitNum);
00100 }
|
|
|
Returns time of last update.
Implements gadget::Proxy. Definition at line 103 of file GloveProxy.h.
00104 {
00105 // XXX: Broken for now, this is a case similar to the EventWindow type in that
00106 // it does not point to one data element like digital, analog, and position.
00107 return vpr::Interval();
00108 }
|
|
|
Returns a pointer to the device held by this proxy.
Definition at line 111 of file GloveProxy.h.
00112 {
00113 if(isStupified())
00114 return NULL;
00115 else
00116 return mTypedDevice;
00117 }
|
|
|
Returns the subUnit number that this proxy points to.
Definition at line 120 of file GloveProxy.h.
00121 {
00122 return mUnitNum;
00123 }
|
|
|
Definition at line 125 of file GloveProxy.h.
00126 {
00127 return mVisible;
00128 }
|
|
|
Returns the string rep of the element type used to config this device. Used by the Input Manager to find elements that construct devices. Reimplemented from gadget::Proxy. Definition at line 42 of file GloveProxy.cpp. Referenced by config.
00043 {
00044 return "glove_proxy";
00045 }
|
|
|
Configures the proxy.
Reimplemented from gadget::Proxy. Definition at line 47 of file GloveProxy.cpp. References gadgetDBG_INPUT_MGR, getElementType, gadget::TypedProxy< Glove >::mDeviceName, and gadget::TypedProxy< Glove >::refresh.
00048 {
00049 vpr::DebugOutputGuard dbg_output(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL,
00050 std::string("------------------ Glove PROXY config() -----------------\n"),
00051 std::string("\n"));
00052 vprASSERT(element->getID() == getElementType());
00053
00054 if ( ! Proxy::config(element) )
00055 {
00056 return false;
00057 }
00058
00059 mUnitNum = element->getProperty<int>("unit");
00060 mDeviceName = element->getProperty<std::string>("device");
00061
00062 refresh();
00063
00064 return true;
00065 }
|
|
|
Returns a pointer to the base class of the devices being proxied.
Implements gadget::Proxy. Definition at line 134 of file GloveProxy.h.
00135 {
00136 if((NULL == mTypedDevice) || (isStupified()))
00137 return NULL;
00138
00139 Input* ret_val = dynamic_cast<Input*>(mTypedDevice);
00140 vprASSERT((ret_val != NULL) && "Cross-cast in GloveProxy failed");
00141 return ret_val;
00142 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002