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


Public Member Functions | |
| GloveProxy () | |
| Constructs the proxy to point to the given glove device and sub-unit number. | |
| 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. | |
| Glove * | getGlovePtr () |
| Returns a pointer to the device held by this proxy. | |
| int | getUnit () |
| Returns the subUnit number that this proxy points to. | |
| bool | isVisible () |
| bool | config (jccl::ConfigElementPtr element) |
| Configures the proxy. | |
| virtual Input * | getProxiedInputDevice () |
| Returns a pointer to the base class of the devices being proxied. | |
Static Public Member Functions | |
| static std::string | getElementType () |
| Returns the string rep of the element type used to config this device. | |
Definition at line 55 of file GloveProxy.h.
| gadget::GloveProxy::GloveProxy | ( | ) | [inline] |
Constructs the proxy to point to the given glove device and sub-unit number.
Definition at line 62 of file GloveProxy.h.
| virtual gadget::GloveProxy::~GloveProxy | ( | ) | [inline, virtual] |
| gmtl::Vec3f gadget::GloveProxy::getTipVector | ( | GloveData::GloveComponent | component | ) | [inline] |
Definition at line 71 of file GloveProxy.h.
00072 { 00073 if(isStupefied()) 00074 return gmtl::Vec3f(0,0,0); 00075 else 00076 return mTypedDevice->getTipVector(component,mUnitNum); 00077 }
| gmtl::Matrix44f gadget::GloveProxy::getTipTransform | ( | GloveData::GloveComponent | component | ) | [inline] |
Definition at line 79 of file GloveProxy.h.
00080 { 00081 if(isStupefied()) 00082 return gmtl::Matrix44f(); 00083 else 00084 return mTypedDevice->getTipTransform(component,mUnitNum); 00085 }
| gmtl::Matrix44f gadget::GloveProxy::getJointTransform | ( | GloveData::GloveComponent | component, | |
| GloveData::GloveJoint | joint | |||
| ) | [inline] |
Definition at line 87 of file GloveProxy.h.
00089 { 00090 if(isStupefied()) 00091 return gmtl::Matrix44f(); 00092 else 00093 return mTypedDevice->getJointTransform(component, joint, mUnitNum); 00094 }
| GloveData gadget::GloveProxy::getData | ( | ) | [inline] |
Definition at line 96 of file GloveProxy.h.
00097 { 00098 if(isStupefied()) 00099 return GloveData(); 00100 else 00101 return mTypedDevice->getGloveData(mUnitNum); 00102 }
| vpr::Interval gadget::GloveProxy::getTimeStamp | ( | ) | const [inline, virtual] |
Returns time of last update.
Implements gadget::Proxy.
Definition at line 105 of file GloveProxy.h.
00106 { 00107 // XXX: Broken for now, this is a case similar to the KeyboardMouse type in that 00108 // it does not point to one data element like digital, analog, and position. 00109 return vpr::Interval(); 00110 }
| Glove* gadget::GloveProxy::getGlovePtr | ( | ) | [inline] |
Returns a pointer to the device held by this proxy.
Definition at line 113 of file GloveProxy.h.
00114 { 00115 if(isStupefied()) 00116 return NULL; 00117 else 00118 return mTypedDevice; 00119 }
| int gadget::GloveProxy::getUnit | ( | ) | [inline] |
| bool gadget::GloveProxy::isVisible | ( | ) | [inline] |
| std::string gadget::GloveProxy::getElementType | ( | ) | [static] |
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 gadget::ProxyDepChecker::canHandle(), and config().
| bool gadget::GloveProxy::config | ( | jccl::ConfigElementPtr | element | ) | [virtual] |
Configures the proxy.
Reimplemented from gadget::Proxy.
Definition at line 47 of file GloveProxy.cpp.
References gadget::Proxy::config(), gadgetDBG_INPUT_MGR(), getElementType(), gadget::TypedProxy< DEV_TYPE >::mDeviceName, and gadget::TypedProxy< DEV_TYPE >::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 }
| virtual Input* gadget::GloveProxy::getProxiedInputDevice | ( | ) | [inline, virtual] |
Returns a pointer to the base class of the devices being proxied.
Implements gadget::Proxy.
Definition at line 136 of file GloveProxy.h.
00137 { 00138 if((NULL == mTypedDevice) || (isStupefied())) 00139 return NULL; 00140 00141 Input* ret_val = dynamic_cast<Input*>(mTypedDevice); 00142 vprASSERT((ret_val != NULL) && "Cross-cast in GloveProxy failed"); 00143 return ret_val; 00144 }
1.5.1