computeKey method

void computeKey(
  1. Envelope itemEnv
)

return a square envelope containing the argument envelope, whose extent is a power of two and which is based at a power of 2

Implementation

void computeKey(Envelope itemEnv) {
  level = computeQuadLevel(itemEnv);
  env = Envelope.empty();
  computeKeyLevel(level, itemEnv);
  // MD - would be nice to have a non-iterative form of this algorithm
  while (!env.containsEnvelope(itemEnv)) {
    level += 1;
    computeKeyLevel(level, itemEnv);
  }
}