MCPcopy Index your code
hub / github.com/plotly/plotly.js / boxIntersectIter

Function boxIntersectIter

stackgl_modules/index.js:6754–7079  ·  view source on GitHub ↗
(
  d, visit, initFull,
  xSize, xBoxes, xIndex,
  ySize, yBoxes, yIndex)

Source from the content-addressed store, hash-verified

6752
6753//The main box intersection routine
6754function boxIntersectIter(
6755 d, visit, initFull,
6756 xSize, xBoxes, xIndex,
6757 ySize, yBoxes, yIndex) {
6758
6759 //Reserve memory for stack
6760 iterInit(d, xSize + ySize)
6761
6762 var top = 0
6763 var elemSize = 2 * d
6764 var retval
6765
6766 iterPush(top++,
6767 0,
6768 0, xSize,
6769 0, ySize,
6770 initFull ? 16 : 0,
6771 -Infinity, Infinity)
6772 if(!initFull) {
6773 iterPush(top++,
6774 0,
6775 0, ySize,
6776 0, xSize,
6777 1,
6778 -Infinity, Infinity)
6779 }
6780
6781 while(top > 0) {
6782 top -= 1
6783
6784 var iptr = top * IFRAME_SIZE
6785 var axis = BOX_ISTACK[iptr]
6786 var redStart = BOX_ISTACK[iptr+1]
6787 var redEnd = BOX_ISTACK[iptr+2]
6788 var blueStart = BOX_ISTACK[iptr+3]
6789 var blueEnd = BOX_ISTACK[iptr+4]
6790 var state = BOX_ISTACK[iptr+5]
6791
6792 var dptr = top * DFRAME_SIZE
6793 var lo = BOX_DSTACK[dptr]
6794 var hi = BOX_DSTACK[dptr+1]
6795
6796 //Unpack state info
6797 var flip = (state & 1)
6798 var full = !!(state & 16)
6799
6800 //Unpack indices
6801 var red = xBoxes
6802 var redIndex = xIndex
6803 var blue = yBoxes
6804 var blueIndex = yIndex
6805 if(flip) {
6806 red = yBoxes
6807 redIndex = yIndex
6808 blue = xBoxes
6809 blueIndex = xIndex
6810 }
6811

Callers 1

boxIntersectFunction · 0.85

Calls 7

iterInitFunction · 0.85
iterPushFunction · 0.85
bruteForcePartialFunction · 0.85
bruteForceFullFunction · 0.85
findMedianFunction · 0.85
onePointFullFunction · 0.85
onePointPartialFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…