function selectKeyframeNodes(that, frameState) {
  const frameNumber = that._frameNumber;
  const priorityQueue = that._priorityQueue;

  // Add all the nodes to the queue, to sort them by priority.
  priorityQueue.reset();
  addToQueueRecursive(
    that.rootNode,
    CullingVolume.MASK_INDETERMINATE,
    that,
    frameState,
  );

  // Move the nodes from the queue to array of high priority nodes.
  const highPriorityKeyframeNodes = that._highPriorityKeyframeNodes;
  let highPriorityKeyframeNodeCount = 0;
  let highPriorityKeyframeNode;
  while (priorityQueue.length > 0) {
    highPriorityKeyframeNode = priorityQueue.removeMaximum();
    highPriorityKeyframeNode.highPriorityFrameNumber = frameNumber;
    highPriorityKeyframeNodes[highPriorityKeyframeNodeCount] =
      highPriorityKeyframeNode;
    highPriorityKeyframeNodeCount++;
  }
  that._highPriorityKeyframeNodeCount = highPriorityKeyframeNodeCount;
}
@param {VoxelTraversal} that
@param {FrameState} frameState

@private