#ifndef	BSPTREE001_H
#define BSPTREE001_H

#include <bsptreeD2.h>
#include <gobj.h>
#include <graphmisc.h>
#include <point.h>
#include <typedefs.h>

class bsptree001;

class bsptree001
{
  /** Global graphics stream. */
  gobjContainer xGraphics;
public:

  /** Brief description of each test. */
  static string doc[];

  static bsptree001* scene;

  typedef point2<double> pt2;

  bsptreeD2<pt2,double,uint> bsp;

  /** Change in keyboard. */
  double keyboarddelta;

  /** Position of sphere. */ 
  point2<double> spherepos;
  /** */ 
  gobjQuadric spherequadric;


  /** Update test03. */
  static void update();
  /** Update the moving ball in test03. */
  static void keyboard(unsigned char key, int x, int y);
  /** Special character keyboard handler. */
  static void special(int key, int x, int y);

  /** Displays the gobj::global with double buffering. */
  static void display();

  /** Visually see and interact with a bsp tree. */
  bsptree001(int argc, char** argv);

  void currentsphere();

  /** Builing a simple 2D partition. */
  void bspbuild();

};


#endif



