History

more work

Brad Hefta-Gaub committed 10 years ago

Commit 8a071f11 parent 1a287322 files · +21 −1Browse files

Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/HMDScriptingInterface.cpp+16−0
@@ -130,6 +130,22 @@ bool HMDScriptingInterface::setHandLasers(int hands, bool enabled, const glm::ve · 129 unmodified lines
130 color, direction);130 color, direction);
131}131}
132 132
133bool HMDScriptingInterface::setExtraLaser(const vec3& worldStart, bool enabled, const vec4& color, const vec3& direction) const {
134 auto offscreenUi = DependencyManager::get<OffscreenUi>();
135 offscreenUi->executeOnUiThread([offscreenUi, enabled] {
136 offscreenUi->getDesktop()->setProperty("hmdHandMouseActive", enabled);
137 });
138
139 mat4 extraLaserPose;
140 return qApp->getActiveDisplayPlugin()->setExtraLaser(extraLaserPose,
141 enabled ? DisplayPlugin::HandLaserMode::Overlay : DisplayPlugin::HandLaserMode::None,
142 color, direction);
143}
144
145void HMDScriptingInterface::disableExtraLaser() const {
146 setExtraLaser(vec3(0), false, vec4(0), vec3(0));
147}
148
133void HMDScriptingInterface::disableHandLasers(int hands) const {149void HMDScriptingInterface::disableHandLasers(int hands) const {
134 setHandLasers(hands, false, vec4(0), vec3(0));150 setHandLasers(hands, false, vec4(0), vec3(0));
135}151}