// -*- C++ -*-
#ifndef RIRAYGRIDBUILDER_H
#define RIRAYGRIDBUILDER_H
/* Copyright 1996 
 * Tue Mar  3 14:35:18 1998  Brian Smits  (bes@phoenix.cs.utah.edu)
 * 
 * RiRayGridBuilder.H
 * 
 *	
 * 
 * $Id: RiRayGridBuilder.H,v 1.1 1998/06/22 17:37:50 bes Exp $ 
 * 
 */
#ifndef RICOMMON_H
#include <RiCommon.H>
#endif


#ifndef RIBBOX_H
#include <RiBBox.H>
#endif

#ifndef RIRAYOBJECT_H
#include <RiRayObject.H>
#endif



/***************************************************************
CLASS
    RiRayGridBuilder
     <one line summary> 

DESCRIPTION
     <Detailed description with any warnings>

****************************************************************/

class RiRayGridBuilder : public RiRayAcceleratorBuilder {
  public:
				//// Default Constructor
    RiRayGridBuilder();
				//// Free all memory
    virtual ~RiRayGridBuilder();
				//// Insert another object into the future RiBBoxHierarchy
    virtual void 	 AddObject(RiRayObject *);
				//// Build the RiRayObject and return it.
				// Each call to Build will build and return the next object.
    virtual RiRayObject *Build();
				//// Some situations result in a RiRayObjectBuilder
				// building more than a single object.  As long as IsDone
				// returns false, there are more objects that need to be built
    virtual bool	 IsDone();
  private:
				//// have all the objects been built?
    bool	done;
				//  GROUP: Alist of Objects
				////
    RiRayObject	**alist;
				////
    int		  numObjs;
				////
    int		  maxObjs;
				// GROUP: Pool of BBoxes
				////
    RiBBoxNode	*bbox; 
				////
    int		 numBBoxes;

};


#endif /* RIRAYGRIDBUILDER_H */

