From a286c72b3bf20ee67d25604f33ceb734da4749f5 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 23 Feb 2017 15:12:45 -0800 Subject: [PATCH] cleanups --- interface/src/avatar/Avatar.cpp | 4 ++-- interface/src/avatar/MyAvatar.cpp | 4 ++-- interface/src/ui/overlays/Overlays.cpp | 8 ++++---- interface/src/ui/overlays/Overlays.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 74b60bee13..eb66abed2e 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -939,7 +939,7 @@ glm::vec3 Avatar::getDefaultJointTranslation(int index) const { glm::quat Avatar::getAbsoluteJointRotationInObjectFrame(int index) const { if (index < 0) { - index += 65536; + index += numeric_limits::max() + 1; // 65536 } switch(index) { @@ -979,7 +979,7 @@ glm::quat Avatar::getAbsoluteJointRotationInObjectFrame(int index) const { glm::vec3 Avatar::getAbsoluteJointTranslationInObjectFrame(int index) const { if (index < 0) { - index += 65536; + index += numeric_limits::max() + 1; // 65536 } switch(index) { diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index ea9ea7dd06..842939d938 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -2411,7 +2411,7 @@ glm::mat4 MyAvatar::computeCameraRelativeHandControllerMatrix(const glm::mat4& c glm::quat MyAvatar::getAbsoluteJointRotationInObjectFrame(int index) const { if (index < 0) { - index += 65536; + index += numeric_limits::max() + 1; // 65536 } switch (index) { @@ -2448,7 +2448,7 @@ glm::quat MyAvatar::getAbsoluteJointRotationInObjectFrame(int index) const { glm::vec3 MyAvatar::getAbsoluteJointTranslationInObjectFrame(int index) const { if (index < 0) { - index += 65536; + index += numeric_limits::max() + 1; // 65536 } switch (index) { diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index c9047c5690..9d2f52bc81 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -733,26 +733,26 @@ PointerEvent Overlays::calculatePointerEvent(Overlay::Pointer overlay, PickRay r RayToOverlayIntersectionResult Overlays::findRayIntersectionForMouseEvent(PickRay ray) { QVector overlaysToInclude; - QVector overlaysToDircard; + QVector overlaysToDiscard; RayToOverlayIntersectionResult rayPickResult; // first priority is tablet screen overlaysToInclude << qApp->getTabletScreenID(); - rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDircard); + rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDiscard); if (rayPickResult.intersects) { return rayPickResult; } // then tablet home button overlaysToInclude.clear(); overlaysToInclude << qApp->getTabletHomeButtonID(); - rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDircard); + rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDiscard); if (rayPickResult.intersects) { return rayPickResult; } // then tablet frame overlaysToInclude.clear(); overlaysToInclude << OverlayID(qApp->getTabletFrameID()); - rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDircard); + rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDiscard); if (rayPickResult.intersects) { return rayPickResult; } diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index b369119752..865df6309a 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -207,7 +207,7 @@ public slots: bool collidableOnly = false); /**jsdoc - * Return a list of overlays with centers within a given distance of a point + * Return a list of 3d overlays with bounding boxes that touch the given sphere * * @function Overlays.findOverlays * @param {Vec3} center the point to search from.