VRAC Documentation VR Juggler
Release 1.0

Input/vjGlove
class vjGlove

Known direct subclasses: vjSimDigitalGlove, vjSimGloveGesture, vjSimGloveGesture, vjPinchGlove, vjCyberGlove, vjDummyGlove


class vjGlove
Sub class of: virtual public vjInput

This is the abstract base glove class. Derived from vjInput.

It specifies the interface to all glove objects in the system. VR Juggler will deal only with gloves using this interface. Description:


Member Variable Summary
protected vjGloveData mTheData[VJ_MAX_GLOVE_DEVS][3]
protected vjPosProxy* mGlovePos[VJ_MAX_GLOVE_DEVS]
        This is the positional proxy of the glove. It defines the location of the
public char* sPort
public char* instName
public int port_id
public vjThread* myThread
        The thread being used by the driver
public int active
        Is the driver active
public int current, progress, valid
        Index holders
public vjMutex lock
        Mutex for swapping the pointers.
public int baudRate
        Baud rate of the device (if it is serial device)
public unsigned int deviceAbilities
        Combined mask of device abilities

Constructor Summary
vjGlove()

Method Summary
public virtual ~vjGlove()
public virtual bool config(vjConfigChunk* chunk)
public virtual char* getDeviceName()
public float getGloveAngle(vjGloveData::vjGloveComponent component, vjGloveData::vjGloveJoint joint, int devNum)
        Return the angle of the given joint.
public vjVec3 getGloveVector(vjGloveData::vjGloveComponent component, int devNum)
        This returns a vector ponting "out" of the component
public vjMatrix getGlovePos(vjGloveData::vjGloveComponent component = vjGloveData::WRIST, int devNum = 0)
        This returns the position of given components.
public vjGloveData getGloveData(int devNum)
        This returns a copy of the glove data struct
public virtual int vjInput::sample()
        Sample the device
public virtual int vjInput::startSampling()
        Start a device sampling.
public virtual int vjInput::stopSampling()
        StopSampling.
public virtual void vjInput::updateData()
        updateData()
public static std::string vjInput::getChunkType()
        Returns the string rep of the chunk type used to config this device
public void vjInput::setPort(const char* serialPort)
public char* vjInput::getPort()
public void vjInput::setBaudRate(int baud)
public int vjInput::getBaudRate()
public const char* vjInput::getInstanceName()
        getInstanceName()
public int vjInput::fDeviceSupport(int devAbility)
        fDeviceSupport(ability)
public int vjInput::isActive()
        Is this input device active?.
public void vjInput::resetIndexes()
        Reset the Index Holders
public void vjInput::swapCurrentIndexes()
        Swap the current and valid indexes (NOT thread safe)
public void vjInput::swapValidIndexes()
        Swap the valid and progress indexes (thread safe)
public void vjInput::assertIndexes()

Constructor Detail

vjGlove
public vjGlove()
Contract


Method Detail

~vjGlove
public virtual ~vjGlove()
Contract


config
public virtual bool config(vjConfigChunk* chunk)
Description
Let constructor take care of device abilities and init
Overrides config in vjInput.
Contract


getDeviceName
public virtual char* getDeviceName()
Description
Overrides getDeviceName in vjInput.
Contract


getGloveAngle
public float getGloveAngle(vjGloveData::vjGloveComponent component, vjGloveData::vjGloveJoint joint, int devNum)
Description
Return the angle of the given joint.
GLOVE INTERFACE // joint is one of a predefined enum type (jointType)
Contract


getGloveVector
public vjVec3 getGloveVector(vjGloveData::vjGloveComponent component, int devNum)
Description
This returns a vector ponting "out" of the component
Can be used for selection, etc.
Contract


getGlovePos
public vjMatrix getGlovePos(vjGloveData::vjGloveComponent component = vjGloveData::WRIST, int devNum = 0)
Description
This returns the position of given components.
Defaults to returning the palm position. Can also get finger tips.
Contract


getGloveData
public vjGloveData getGloveData(int devNum)
Description
This returns a copy of the glove data struct
Contract


Page generated: Jun 12