def initHand(): sensor = hand.InputSensor() rawAvatar[_name].handSensor = sensor sensor.createHandRenderer = lambda *args,**kw: hand._InputDeviceRenderer(*args,**kw) def appliedGetData(): #VC: set the mappings for the gestures if rawInput['r_hand_input'].getState()&viz.MOUSEBUTTON_LEFT:# make=Generic, model=Mouse Buttons, name=r_hand_input, signal=Left Mouse Button return (hand.GESTURE_FIST, False, False)# GESTURE_FIST #VC: end gesture mappings return (hand.GESTURE_FLAT_HAND,False,False) sensor.getData = appliedGetData return hand.AvatarHandModel(rawAvatar[_name], left=False, type=hand.GLOVE_5DT, sensor=sensor)
def initHand(): sensor = hand.InputSensor() rawAvatar[_name].handSensor = sensor sensor.createHandRenderer = lambda *args,**kw: hand._InputDeviceRenderer(*args,**kw) def appliedGetData(): #VC: set the mappings for the gestures if rawInput['l_hand_input'].isButtonDown(2):# make=HTC, model=Vive Controller, name=l_hand_input, signal=Button Trigger return (hand.GESTURE_FIST, False, False)# GESTURE_FIST #VC: end gesture mappings return (hand.GESTURE_FLAT_HAND,False,False) sensor.getData = appliedGetData return hand.AvatarHandModel(rawAvatar[_name], left=True, type=hand.GLOVE_5DT, sensor=sensor)
def initHand(): sensor = hand.InputSensor() rawAvatar[_name].handSensor = sensor sensor.createHandRenderer = lambda *args,**kw: hand._InputDeviceRenderer(*args,**kw) def appliedGetData(): #VC: set the mappings for the gestures if rawInput['r_hand_input'].isButtonDown(1):# make=Generic, model=Joystick, name=r_hand_input, signal=Button 1 return (hand.GESTURE_FIST, False, False)# GESTURE_FIST #VC: end gesture mappings return (hand.GESTURE_FLAT_HAND,False,False) sensor.getData = appliedGetData file=None if hasattr(rawAvatar[_name], "rightHandFilename"): file = rawAvatar[_name].rightHandFilename return hand.HandModel(left=False, type=hand.GLOVE_5DT, file=file, sensor=sensor)
def initHand(): sensor = hand.InputSensor() rawAvatar[_name].handSensor = sensor sensor.createHandRenderer = lambda *args,**kw: hand._InputDeviceRenderer(*args,**kw) def appliedGetData(): #VC: set the mappings for the gestures if rawInput['mouse_buttons'].getState()&viz.MOUSEBUTTON_LEFT:# make=Generic, model=Mouse Buttons, name=mouse_buttons, signal=Left Mouse Button return (hand.GESTURE_FIST, False, False)# GESTURE_FIST #VC: end gesture mappings return (hand.GESTURE_FLAT_HAND,False,False) sensor.getData = appliedGetData file=None if hasattr(rawAvatar[_name], "rightHandFilename"): file = rawAvatar[_name].rightHandFilename return hand.HandModel(left=False, type=hand.GLOVE_5DT, file=file, sensor=sensor)
def initlHand(): sensor = hand.InputSensor() rawAvatar[_name].handSensor = sensor sensor.createHandRenderer = lambda *args, **kw: hand._InputDeviceRenderer( *args, **kw) def appliedGetData(): #VC: set the mappings for the gestures return (hand.GESTURE_FLAT_HAND, False, False) sensor.getData = appliedGetData file = None if hasattr(rawAvatar[_name], "leftHandFilename"): file = rawAvatar[_name].leftHandFilename return hand.HandModel(left=False, type=hand.GLOVE_5DT, file=file, sensor=sensor)