createBufForTimeAveBoxes( final TimeBoundingBox timebox )
{
BufForTimeAveBoxes buf2statboxes;
Iterator dobjs, sobjs;
Drawable dobj;
Shadow sobj;
buf2statboxes = new BufForTimeAveBoxes( timebox );
criteria.initMatch();
// Merge Nestable Shadows
sobjs = treetrunk.iteratorOfLowestFloorShadows( timebox,
INCRE_STARTTIME_ORDER,
IS_NESTABLE );
while ( sobjs.hasNext() ) {
sobj = (Shadow) sobjs.next();
if ( sobj.getCategory().isVisiblySearchable()
&& sobj.containSearchable()
&& criteria.isMatched( sobj ) ) {
buf2statboxes.mergeWithNestable( sobj );
}
}
// Merge Nestable Real Drawables
dobjs = treetrunk.iteratorOfRealDrawables( timebox,
INCRE_STARTTIME_ORDER,
isConnectedComposite,
IS_NESTABLE );
while ( dobjs.hasNext() ) {
dobj = (Drawable) dobjs.next();
if ( dobj.getCategory().isVisiblySearchable()
&& dobj.containSearchable()
&& criteria.isMatched( dobj ) ) {
buf2statboxes.mergeWithNestable( dobj );
}
}
// Compute ExclusiveDurationRatio of CategoryWeights in buf2statboxes
buf2statboxes.setNestingExclusion();
// Merge Nestless Real Drawables
dobjs = treetrunk.iteratorOfRealDrawables( timebox,
INCRE_STARTTIME_ORDER,
isConnectedComposite,
!IS_NESTABLE );
while ( dobjs.hasNext() ) {
dobj = (Drawable) dobjs.next();
if ( dobj.getCategory().isVisiblySearchable()
&& dobj.containSearchable()
&& criteria.isMatched( dobj ) ) {
buf2statboxes.mergeWithNestless( dobj );
}
}
// Merge Nestless Shadows
sobjs = treetrunk.iteratorOfLowestFloorShadows( timebox,
INCRE_STARTTIME_ORDER,
!IS_NESTABLE );
while ( sobjs.hasNext() ) {
sobj = (Shadow) sobjs.next();
if ( sobj.getCategory().isVisiblySearchable()
&& sobj.containSearchable()
&& criteria.isMatched( sobj ) ) {
buf2statboxes.mergeWithNestless( sobj );
}
}