History

Revert "Case 20200: Update EntityScriptingInterface to not find local entities"

Sam Gondelman committed 7 years ago

Commit 097d2d91 parent 21ec4e027 files · +635 −766Browse files

Showing the changes to interface/src/raypick/PickScriptingInterface.cpp (1 of 27 files). Show all

Unified · Split

interface/src/raypick/PickScriptingInterface.cpp+8−14
@@ -49,17 +49,11 @@ unsigned int PickScriptingInterface::createPick(const PickQuery::PickType type, · 48 unmodified lines
4949 }
5050 }
5151
52−PickFilter getPickFilter(unsigned int filter) {
53− // FIXME: Picks always intersect visible and collidable things right now
54− filter = filter | (PickScriptingInterface::PICK_INCLUDE_VISIBLE() | PickScriptingInterface::PICK_INCLUDE_COLLIDABLE());
55− return PickFilter(filter);
56−}
57−
5852 /**jsdoc
5953 * A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick.
6054 * @typedef {object} Picks.RayPickProperties
6155 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
62− * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
56+ * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
6357 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
6458 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.
6559 * @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)
@@ -79,7 +73,7 @@ unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) { · 13 unmodified lines
7973
8074 PickFilter filter = PickFilter();
8175 if (propMap["filter"].isValid()) {
82− filter = getPickFilter(propMap["filter"].toUInt());
76+ filter = PickFilter(propMap["filter"].toUInt());
8377 }
8478
8579 float maxDistance = 0.0f;
@@ -117,7 +111,7 @@ unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) { · 31 unmodified lines
117111 * @typedef {object} Picks.StylusPickProperties
118112 * @property {number} [hand=-1] An integer. 0 == left, 1 == right. Invalid otherwise.
119113 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
120− * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
114+ * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
121115 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
122116 */
123117 unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) {
@@ -138,7 +132,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 14 unmodified lines
138132
139133 PickFilter filter = PickFilter();
140134 if (propMap["filter"].isValid()) {
141− filter = getPickFilter(propMap["filter"].toUInt());
135+ filter = PickFilter(propMap["filter"].toUInt());
142136 }
143137
144138 float maxDistance = 0.0f;
@@ -159,7 +153,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 14 unmodified lines
159153 * A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick.
160154 * @typedef {object} Picks.ParabolaPickProperties
161155 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
162− * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
156+ * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
163157 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
164158 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.
165159 * @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)
@@ -184,7 +178,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti · 18 unmodified lines
184178
185179 PickFilter filter = PickFilter();
186180 if (propMap["filter"].isValid()) {
187− filter = getPickFilter(propMap["filter"].toUInt());
181+ filter = PickFilter(propMap["filter"].toUInt());
188182 }
189183
190184 float maxDistance = 0.0f;
@@ -256,7 +250,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti · 65 unmodified lines
256250
257251 * @typedef {object} Picks.CollisionPickProperties
258252 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
259−* @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
253+* @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
260254 * @property {Shape} shape - The information about the collision region's size and shape. Dimensions are in world space, but will scale with the parent if defined.
261255 * @property {Vec3} position - The position of the collision region, relative to a parent if defined.
262256 * @property {Quat} orientation - The orientation of the collision region, relative to a parent if defined.
@@ -279,7 +273,7 @@ unsigned int PickScriptingInterface::createCollisionPick(const QVariant& propert · 16 unmodified lines
279273
280274 PickFilter filter = PickFilter();
281275 if (propMap["filter"].isValid()) {
282− filter = getPickFilter(propMap["filter"].toUInt());
276+ filter = PickFilter(propMap["filter"].toUInt());
283277 }
284278
285279 float maxDistance = 0.0f;