/** * @param entryEnv * @return the nodes the given envelope will intersect. */ final protected List<QTree<T>> getObjectNodes( float[] entryEnv ) { List<QTree<T>> list = new LinkedList<QTree<T>>(); // if the object covers the whole of this node if ( objectCoversEnvelope( entryEnv ) ) { list.add( this ); } else { if ( !isLeaf() ) { int[] indizes = getIndizes( entryEnv ); for ( int index : indizes ) { QTree<T> child = children[index]; // No children in that area create a new one if ( child == null ) { child = createNode( index ); children[index] = child; list.add( child ); } else { // traverse tree list.addAll( child.getObjectNodes( entryEnv ) ); } } } else { list.add( this ); } } return list; }