isNull method

bool isNull()

A Depth object is null (has never been initialized) if all depths are null.

Implementation

bool isNull() {
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 3; j++) {
      if (depth[i][j] != NULL_VALUE) return false;
    }
  }
  return true;
}