#ifndef SNAKESORTTEST_H
#define SNAKESORTTEST_H

#include <vector>
using namespace std;

#include <gobj.h> 
#include <point.h>

/*!
\brief Test the snakesort class.

By visually seeing the sort the algorithm is somewhat
 validated. Lines connecting successive points are drawn.
*/
class snakesorttest
{
  typedef point2<double> pt2;
  typedef point3<double> pt3;

  /** Global graphics stream. */
  gobjContainer xGraphics;

  /** Draw red line from start to finish. */
  void drawlinethroughpoints(vector<pt2> const & v);
  /** Draw red line from start to finish. */
  void drawlinethroughpoints(vector<pt3> const & v);
  /** Draws the vector of poitns in 3D space. */
  void drawpoints(vector<pt3> const & v);
  /** Fill the vector with random points. */
  void fillvec( vector<pt2> & v, uintc n );
  /** Fill the vector with random points. */
  void fillvec( vector<pt3> & v, uintc n );
public:

  /** Default keyboard handler - ESC to quit. */
  static void keyboard01(unsigned char key, int x, int y);
  /** Displays the gobj::global with double buffering. */
  static void display01();

  /** Print a 1D snake sort test. */
  static void test01(int argc, char** argv);
  /** Display a 2D snake sort. */
  void test02(int argc, char** argv);
  /** Display a 3D snake sort. */
  void test03(int argc, char** argv);
  

};


#endif


