From c5e9f02372c25bea79823bf0f01f974ffcc414f4 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 9 Aug 2018 16:59:23 -0700 Subject: [PATCH] Finalize Collision Pick API naming convention for intersectingObjects --- interface/src/raypick/CollisionPick.cpp | 6 +++--- interface/src/raypick/PickScriptingInterface.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/src/raypick/CollisionPick.cpp b/interface/src/raypick/CollisionPick.cpp index bef93f8efc..73d2dfe67a 100644 --- a/interface/src/raypick/CollisionPick.cpp +++ b/interface/src/raypick/CollisionPick.cpp @@ -47,8 +47,8 @@ QVariantMap CollisionPickResult::toVariantMap() const { } QVariantMap collisionPointPair; - collisionPointPair["pickContactPoint"] = vec3toVariant(objectIntersection.testCollisionPoint); - collisionPointPair["objectContactPoint"] = vec3toVariant(objectIntersection.foundCollisionPoint); + collisionPointPair["pointOnPick"] = vec3toVariant(objectIntersection.testCollisionPoint); + collisionPointPair["pointOnObject"] = vec3toVariant(objectIntersection.foundCollisionPoint); collisionPointPairs[objectIntersection.foundID].append(collisionPointPair); } @@ -59,7 +59,7 @@ QVariantMap CollisionPickResult::toVariantMap() const { const QUuid& id = intersectionKeyVal.first; QVariantMap& intersection = intersectionKeyVal.second; - intersection["contactPointPairs"] = collisionPointPairs[id]; + intersection["collisionContacts"] = collisionPointPairs[id]; qIntersectingObjects.append(intersection); } diff --git a/interface/src/raypick/PickScriptingInterface.h b/interface/src/raypick/PickScriptingInterface.h index a13e7551d9..1ba1c248bc 100644 --- a/interface/src/raypick/PickScriptingInterface.h +++ b/interface/src/raypick/PickScriptingInterface.h @@ -161,15 +161,15 @@ public: * @typedef {object} IntersectingObject * @property {QUuid} id The ID of the object. * @property {number} type The type of the object, either Picks.INTERSECTED_ENTITY() or Picks.INTERSECTED_AVATAR() - * @property {ContactPointPair[]} contactPointPairs Pairs of points representing penetration information between the pick and the object + * @property {CollisionContact[]} collisionContacts Pairs of points representing penetration information between the pick and the object */ /**jsdoc * A pair of points that represents part of an overlap between a Collision Pick and an object in the physics engine. Points which are further apart represent deeper overlap * - * @typedef {object} ContactPointPair - * @property {Vec3} pickContactPoint A point representing a penetration of the object's surface into the volume of the pick, in world space. - * @property {Vec3} objectContactPoint A point representing a penetration of the pick's surface into the volume of the found object, in world space. + * @typedef {object} CollisionContact + * @property {Vec3} pointOnPick A point representing a penetration of the object's surface into the volume of the pick, in world space. + * @property {Vec3} pointOnObject A point representing a penetration of the pick's surface into the volume of the found object, in world space. */ /**jsdoc