MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / osvrDeviceEyeTrackerConfigure

Function osvrDeviceEyeTrackerConfigure

src/osvr/PluginKit/EyeTrackerInterfaceC.cpp:58–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56};
57
58OSVR_ReturnCode osvrDeviceEyeTrackerConfigure(
59 OSVR_INOUT_PTR OSVR_DeviceInitOptions opts,
60 OSVR_OUT_PTR OSVR_EyeTrackerDeviceInterface *iface,
61 OSVR_IN OSVR_ChannelCount numChan) {
62
63 OSVR_PLUGIN_HANDLE_NULL_CONTEXT("osvrDeviceEyeTrackerConfigure", opts);
64 OSVR_PLUGIN_HANDLE_NULL_CONTEXT("osvrDeviceEyeTrackerConfigure", iface);
65 auto ifaceObj =
66 opts->makeInterfaceObject<OSVR_EyeTrackerDeviceInterfaceObject>();
67 *iface = ifaceObj;
68
69 auto location = osvr::common::Location2DComponent::create();
70 ifaceObj->location = location.get();
71 opts->addComponent(location);
72
73 auto direction = osvr::common::DirectionComponent::create();
74 ifaceObj->direction = direction.get();
75 opts->addComponent(direction);
76
77 auto eyetracker = osvr::common::EyeTrackerComponent::create();
78 ifaceObj->eyetracker = eyetracker.get();
79 opts->addComponent(eyetracker);
80
81 opts->setButtons(numChan, ifaceObj->button);
82 opts->setTracker(ifaceObj->tracker);
83
84 return OSVR_RETURN_SUCCESS;
85}
86
87OSVR_ReturnCode osvrDeviceEyeTrackerReport2DGaze(
88 OSVR_IN_PTR OSVR_EyeTrackerDeviceInterface iface,

Callers 1

EyeTrackerDeviceMethod · 0.85

Calls 4

setButtonsMethod · 0.80
setTrackerMethod · 0.80
getMethod · 0.45
addComponentMethod · 0.45

Tested by

no test coverage detected