-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathVrInkManagerApi.cpp
More file actions
28 lines (24 loc) · 896 Bytes
/
VrInkManagerApi.cpp
File metadata and controls
28 lines (24 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "VrInkManagerApi.h"
VrInkManagerApi::VrInkManagerApi(std::string renderModelName) :ControllerManager(renderModelName)
{
}
VrInkManagerApi::~VrInkManagerApi()
{
}
void VrInkManagerApi::UpdateControllerStatus()
{
VrInkApi::GetDeviceStatus(ControllerStatus);
m_PoseMatrix.set(ControllerStatus.poseMatrix);
UpdateButtonHighlights();
}
void VrInkManagerApi::UpdateButtonHighlights()
{
if (m_ModelComponents.size() > 0) {
UpdateButton({ "button_trigger", "button_primary" }, ControllerStatus.primaryValue);
UpdateButton({ "button_nib", "button_tip" }, ControllerStatus.tipValue);
UpdateButton({ "button_left_grip" }, ControllerStatus.gripClick);
UpdateButton({ "button_right_grip" }, ControllerStatus.gripClick);
UpdateButton({ "button_menu" }, ControllerStatus.applicationMenu);
UpdateButton({ "button_touch", "button_touchstrip" }, ControllerStatus.touchstripClick);
}
}