diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 5fa9f8c15c63..71bbcc9a812a 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -3579,7 +3579,7 @@ define([ * @example * var pickedObjects = scene.drillPick(new Cesium.Cartesian2(100.0, 200.0)); */ - Scene.prototype.drillPick = function(windowPosition, limit) { + Scene.prototype.drillPick = function(windowPosition, limit, width, height) { // PERFORMANCE_IDEA: This function calls each primitive's update for each pass. Instead // we could update the primitive once, and then just execute their commands for each pass, // and cull commands for picked primitives. e.g., base on the command's owner. @@ -3599,7 +3599,10 @@ define([ limit = Number.MAX_VALUE; } - var pickedResult = this.pick(windowPosition); + var drillRectangleWidth = defaultValue(width, 3.0); + var drillRectangleHeight = defaultValue(height, drillRectangleWidth); + + var pickedResult = this.pick(windowPosition, drillRectangleWidth, drillRectangleHeight); while (defined(pickedResult) && defined(pickedResult.primitive)) { result.push(pickedResult); if (0 >= --limit) { @@ -3627,7 +3630,7 @@ define([ pickedPrimitives.push(primitive); } - pickedResult = this.pick(windowPosition); + pickedResult = this.pick(windowPosition, drillRectangleWidth, drillRectangleHeight); } // unhide everything we hid while drill picking