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
49 }49 }
50}50}
51 51
52PickFilter 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
58/**jsdoc52/**jsdoc
59 * A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick.53 * A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick.
60 * @typedef {object} Picks.RayPickProperties54 * @typedef {object} Picks.RayPickProperties
61 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.55 * @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.
63 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.57 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
64 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.58 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.
65 * @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)59 * @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
79 73
80 PickFilter filter = PickFilter();74 PickFilter filter = PickFilter();
81 if (propMap["filter"].isValid()) {75 if (propMap["filter"].isValid()) {
82 filter = getPickFilter(propMap["filter"].toUInt());76 filter = PickFilter(propMap["filter"].toUInt());
83 }77 }
84 78
85 float maxDistance = 0.0f;79 float maxDistance = 0.0f;
@@ -117,7 +111,7 @@ unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) { · 31 unmodified lines
117 * @typedef {object} Picks.StylusPickProperties111 * @typedef {object} Picks.StylusPickProperties
118 * @property {number} [hand=-1] An integer. 0 == left, 1 == right. Invalid otherwise.112 * @property {number} [hand=-1] An integer. 0 == left, 1 == right. Invalid otherwise.
119 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.113 * @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.
121 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.115 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
122 */116 */
123unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) {117unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) {
@@ -138,7 +132,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 14 unmodified lines
138 132
139 PickFilter filter = PickFilter();133 PickFilter filter = PickFilter();
140 if (propMap["filter"].isValid()) {134 if (propMap["filter"].isValid()) {
141 filter = getPickFilter(propMap["filter"].toUInt());135 filter = PickFilter(propMap["filter"].toUInt());
142 }136 }
143 137
144 float maxDistance = 0.0f;138 float maxDistance = 0.0f;
@@ -159,7 +153,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 14 unmodified lines
159 * A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick.153 * A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick.
160 * @typedef {object} Picks.ParabolaPickProperties154 * @typedef {object} Picks.ParabolaPickProperties
161 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.155 * @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.
163 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.157 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
164 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.158 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.
165 * @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)159 * @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
184 178
185 PickFilter filter = PickFilter();179 PickFilter filter = PickFilter();
186 if (propMap["filter"].isValid()) {180 if (propMap["filter"].isValid()) {
187 filter = getPickFilter(propMap["filter"].toUInt());181 filter = PickFilter(propMap["filter"].toUInt());
188 }182 }
189 183
190 float maxDistance = 0.0f;184 float maxDistance = 0.0f;
@@ -256,7 +250,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti · 65 unmodified lines
256 250
257* @typedef {object} Picks.CollisionPickProperties251* @typedef {object} Picks.CollisionPickProperties
258* @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.252* @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.
260* @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.254* @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.
261* @property {Vec3} position - The position of the collision region, relative to a parent if defined.255* @property {Vec3} position - The position of the collision region, relative to a parent if defined.
262* @property {Quat} orientation - The orientation of the collision region, relative to a parent if defined.256* @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
279 273
280 PickFilter filter = PickFilter();274 PickFilter filter = PickFilter();
281 if (propMap["filter"].isValid()) {275 if (propMap["filter"].isValid()) {
282 filter = getPickFilter(propMap["filter"].toUInt());276 filter = PickFilter(propMap["filter"].toUInt());
283 }277 }
284 278
285 float maxDistance = 0.0f;279 float maxDistance = 0.0f;