docs: function checkPair( bodyA, bodyB ){
  
          // filter out bodies that don't collide with each other
          if (
              ( bodyA.treatment === 'static' || bodyA.treatment === 'kinematic' ) &&
              ( bodyB.treatment === 'static' || bodyB.treatment === 'kinematic' )
          ){
              return false;
          }
  
          if ( bodyA.geometry.name === 'circle' && bodyB.geometry.name === 'circle' ){
  
              return checkCircles( bodyA, bodyB );
  
          } else if ( bodyA.geometry.name === 'compound' || bodyB.geometry.name === 'compound' ){
              // compound bodies are special. We can't use gjk because
              // they could have concavities. so we do the pieces individually
              var test = (bodyA.geometry.name === 'compound')
                  ,compound = test ? bodyA : bodyB
                  ,other = test ? bodyB : bodyA
                  ,cols
                  ,ch
                  ,ret = []
                  ,scratch = Physics.scratchpad()
                  ,vec = scratch.vector()
                  ,oldPos = scratch.vector()
                  ,otherAABB = other.aabb()
                  ,i
                  ,l
                  ;
  
              for ( i = 0, l = compound.children.length; i < l; i++ ){
  
                  ch = compound.children[ i ];
                  // move body to fake position
                  oldPos.clone( ch.state.pos );
                  ch.offset.vadd( oldPos.vadd( compound.offset ).rotate( -ch.state.angular.pos ) );
                  ch.state.pos.clone( compound.state.pos );
                  ch.state.angular.pos += compound.state.angular.pos;
  
                  // check it if the aabbs overlap
                  if ( Physics.aabb.overlap(otherAABB, ch.aabb()) ){
  
                      cols = checkPair( other, ch );
  
                      if ( cols instanceof Array ){
                          for ( var j = 0, c, ll = cols.length; j < ll; j++ ){
                              c = cols[j];
                              // set body to be the compound body
                              if ( c.bodyA === ch ){
                                  c.bodyA = compound;
                              } else {
                                  c.bodyB = compound;
                              }
                              ret.push( c );
                          }
  
                      } else if ( cols ) {
                          // set body to be the compound body
                          if ( cols.bodyA === ch ){
                              cols.bodyA = compound;
                          } else {
                              cols.bodyB = compound;
                          }
                          ret.push( cols );
                      }
                  }
  
                  // transform it back
                  ch.state.angular.pos -= compound.state.angular.pos;
                  ch.offset.vsub( oldPos );
                  ch.state.pos.clone( oldPos.rotate( ch.state.angular.pos ).vsub( compound.offset ) );
              }
  
              return scratch.done( ret );
  
          } else {
  
              return checkGJK( bodyA, bodyB );
          }
      }