Showing the changes to interface/src/raypick/PickScriptingInterface.cpp (1 of 27 files). Show all
Unified · Split
| @@ -49,17 +49,11 @@ unsigned int PickScriptingInterface::createPick(const PickQuery::PickType type, · 48 unmodified lines | ||
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
| 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 | − | |
| 58 | 52 | /**jsdoc |
| 59 | 53 | * A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick. |
| 60 | 54 | * @typedef {object} Picks.RayPickProperties |
| 61 | 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 | 57 | * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. |
| 64 | 58 | * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick. |
| 65 | 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 | 74 | PickFilter filter = PickFilter(); |
| 81 | 75 | if (propMap["filter"].isValid()) { |
| 82 | − filter = getPickFilter(propMap["filter"].toUInt()); | |
| 76 | + filter = PickFilter(propMap["filter"].toUInt()); | |
| 83 | 77 | } |
| 84 | 78 | |
| 85 | 79 | float maxDistance = 0.0f; |
| @@ -117,7 +111,7 @@ unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) { · 31 unmodified lines | ||
| 117 | 111 | * @typedef {object} Picks.StylusPickProperties |
| 118 | 112 | * @property {number} [hand=-1] An integer. 0 == left, 1 == right. Invalid otherwise. |
| 119 | 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 | 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 | */ |
| 123 | 117 | unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) { |
| @@ -138,7 +132,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 14 unmodified lines | ||
| 138 | 132 | |
| 139 | 133 | PickFilter filter = PickFilter(); |
| 140 | 134 | if (propMap["filter"].isValid()) { |
| 141 | − filter = getPickFilter(propMap["filter"].toUInt()); | |
| 135 | + filter = PickFilter(propMap["filter"].toUInt()); | |
| 142 | 136 | } |
| 143 | 137 | |
| 144 | 138 | float maxDistance = 0.0f; |
| @@ -159,7 +153,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 14 unmodified lines | ||
| 159 | 153 | * A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick. |
| 160 | 154 | * @typedef {object} Picks.ParabolaPickProperties |
| 161 | 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 | 157 | * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. |
| 164 | 158 | * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick. |
| 165 | 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 | 179 | PickFilter filter = PickFilter(); |
| 186 | 180 | if (propMap["filter"].isValid()) { |
| 187 | − filter = getPickFilter(propMap["filter"].toUInt()); | |
| 181 | + filter = PickFilter(propMap["filter"].toUInt()); | |
| 188 | 182 | } |
| 189 | 183 | |
| 190 | 184 | float maxDistance = 0.0f; |
| @@ -256,7 +250,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti · 65 unmodified lines | ||
| 256 | 250 | |
| 257 | 251 | * @typedef {object} Picks.CollisionPickProperties |
| 258 | 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 | 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 | 255 | * @property {Vec3} position - The position of the collision region, relative to a parent if defined. |
| 262 | 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 | 274 | PickFilter filter = PickFilter(); |
| 281 | 275 | if (propMap["filter"].isValid()) { |
| 282 | − filter = getPickFilter(propMap["filter"].toUInt()); | |
| 276 | + filter = PickFilter(propMap["filter"].toUInt()); | |
| 283 | 277 | } |
| 284 | 278 | |
| 285 | 279 | float maxDistance = 0.0f; |