mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-07 11:13:10 +02:00
more working on integrating hand poses
This commit is contained in:
parent
a154c809c0
commit
ab50e58cac
2 changed files with 12 additions and 0 deletions
|
@ -301,6 +301,8 @@ void ViveControllerManager::assignDefaultInputMapping(UserInputMapper& mapper) {
|
|||
// mapper.addInputChannel(UserInputMapper::ACTION1, makeInput(BUTTON_4, 0));
|
||||
// mapper.addInputChannel(UserInputMapper::ACTION2, makeInput(BUTTON_4, 1));
|
||||
|
||||
mapper.addInputChannel(UserInputMapper::LEFT_HAND, makeInput(LEFT_HAND));
|
||||
mapper.addInputChannel(UserInputMapper::RIGHT_HAND, makeInput(RIGHT_HAND));
|
||||
}
|
||||
|
||||
float ViveControllerManager::getButton(int channel) const {
|
||||
|
@ -341,3 +343,7 @@ UserInputMapper::Input ViveControllerManager::makeInput(ViveControllerManager::J
|
|||
return UserInputMapper::Input(0);
|
||||
// return UserInputMapper::Input(_deviceID, axis | (index == 0 ? LEFT_MASK : RIGHT_MASK), UserInputMapper::ChannelType::AXIS);
|
||||
}
|
||||
|
||||
UserInputMapper::Input ViveControllerManager::makeInput(JointChannel joint) {
|
||||
return UserInputMapper::Input(_deviceID, joint, UserInputMapper::ChannelType::POSE);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,11 @@ public:
|
|||
BACK_TRIGGER = 1U << 6,
|
||||
};
|
||||
|
||||
enum JointChannel {
|
||||
LEFT_HAND = 0,
|
||||
RIGHT_HAND,
|
||||
};
|
||||
|
||||
void focusOutEvent();
|
||||
|
||||
void update();
|
||||
|
@ -47,6 +52,7 @@ public:
|
|||
|
||||
UserInputMapper::Input makeInput(unsigned int button, int index);
|
||||
UserInputMapper::Input makeInput(JoystickAxisChannel axis, int index);
|
||||
UserInputMapper::Input makeInput(JointChannel joint);
|
||||
|
||||
void registerToUserInputMapper(UserInputMapper& mapper);
|
||||
void assignDefaultInputMapping(UserInputMapper& mapper);
|
||||
|
|
Loading…
Reference in a new issue