This commit is contained in:
Seth Alves 2017-02-23 15:12:45 -08:00
parent 4600d546c0
commit a286c72b3b
4 changed files with 9 additions and 9 deletions

View file

@ -939,7 +939,7 @@ glm::vec3 Avatar::getDefaultJointTranslation(int index) const {
glm::quat Avatar::getAbsoluteJointRotationInObjectFrame(int index) const { glm::quat Avatar::getAbsoluteJointRotationInObjectFrame(int index) const {
if (index < 0) { if (index < 0) {
index += 65536; index += numeric_limits<unsigned short>::max() + 1; // 65536
} }
switch(index) { switch(index) {
@ -979,7 +979,7 @@ glm::quat Avatar::getAbsoluteJointRotationInObjectFrame(int index) const {
glm::vec3 Avatar::getAbsoluteJointTranslationInObjectFrame(int index) const { glm::vec3 Avatar::getAbsoluteJointTranslationInObjectFrame(int index) const {
if (index < 0) { if (index < 0) {
index += 65536; index += numeric_limits<unsigned short>::max() + 1; // 65536
} }
switch(index) { switch(index) {

View file

@ -2411,7 +2411,7 @@ glm::mat4 MyAvatar::computeCameraRelativeHandControllerMatrix(const glm::mat4& c
glm::quat MyAvatar::getAbsoluteJointRotationInObjectFrame(int index) const { glm::quat MyAvatar::getAbsoluteJointRotationInObjectFrame(int index) const {
if (index < 0) { if (index < 0) {
index += 65536; index += numeric_limits<unsigned short>::max() + 1; // 65536
} }
switch (index) { switch (index) {
@ -2448,7 +2448,7 @@ glm::quat MyAvatar::getAbsoluteJointRotationInObjectFrame(int index) const {
glm::vec3 MyAvatar::getAbsoluteJointTranslationInObjectFrame(int index) const { glm::vec3 MyAvatar::getAbsoluteJointTranslationInObjectFrame(int index) const {
if (index < 0) { if (index < 0) {
index += 65536; index += numeric_limits<unsigned short>::max() + 1; // 65536
} }
switch (index) { switch (index) {

View file

@ -733,26 +733,26 @@ PointerEvent Overlays::calculatePointerEvent(Overlay::Pointer overlay, PickRay r
RayToOverlayIntersectionResult Overlays::findRayIntersectionForMouseEvent(PickRay ray) { RayToOverlayIntersectionResult Overlays::findRayIntersectionForMouseEvent(PickRay ray) {
QVector<OverlayID> overlaysToInclude; QVector<OverlayID> overlaysToInclude;
QVector<OverlayID> overlaysToDircard; QVector<OverlayID> overlaysToDiscard;
RayToOverlayIntersectionResult rayPickResult; RayToOverlayIntersectionResult rayPickResult;
// first priority is tablet screen // first priority is tablet screen
overlaysToInclude << qApp->getTabletScreenID(); overlaysToInclude << qApp->getTabletScreenID();
rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDircard); rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDiscard);
if (rayPickResult.intersects) { if (rayPickResult.intersects) {
return rayPickResult; return rayPickResult;
} }
// then tablet home button // then tablet home button
overlaysToInclude.clear(); overlaysToInclude.clear();
overlaysToInclude << qApp->getTabletHomeButtonID(); overlaysToInclude << qApp->getTabletHomeButtonID();
rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDircard); rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDiscard);
if (rayPickResult.intersects) { if (rayPickResult.intersects) {
return rayPickResult; return rayPickResult;
} }
// then tablet frame // then tablet frame
overlaysToInclude.clear(); overlaysToInclude.clear();
overlaysToInclude << OverlayID(qApp->getTabletFrameID()); overlaysToInclude << OverlayID(qApp->getTabletFrameID());
rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDircard); rayPickResult = findRayIntersectionInternal(ray, true, overlaysToInclude, overlaysToDiscard);
if (rayPickResult.intersects) { if (rayPickResult.intersects) {
return rayPickResult; return rayPickResult;
} }

View file

@ -207,7 +207,7 @@ public slots:
bool collidableOnly = false); bool collidableOnly = false);
/**jsdoc /**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 * @function Overlays.findOverlays
* @param {Vec3} center the point to search from. * @param {Vec3} center the point to search from.