#ifndef LGRAPHICSBASECLASS_H
#define LGRAPHICSBASECLASS_H

#include <math.h>
#include <vector>
#include "vect3.h"

/* Graphics Class
 * --------------
 * This base class must be derived from, and a pointer to the
 * derived class passed to the LSystem class using the SetGraphics()
 * method. Several derived classes for text output, openGL output, etc.
 * etc. can be derived and passed to the Lsystem as necessary
 */

using namespace std;

class Lgraphics
{
public:
  Lgraphics(){};

  /****** Shape specifying routines *******/

  //Output a cube shape, having been given a list of 8 vect3s
  virtual void StoreHexahedron(vector <vect3<float> > *vertex, unsigned short int colour)=0; 

  //Output a series of connected triangles, having been given a series of sequential vertices
  virtual void StoreTriangleStrip(vector <vect3<float> > *vertex, unsigned short int colour)=0;

  virtual void BeginStore()=0;  //Stuff to do before starting storage
  virtual void EndStore()=0;    //Finish off storage
  
  /****** Output routines ******/
  virtual void BeginOutput()=0;  //Stuff to do before starting output
  virtual void Output()=0;       //Output the shapes stored
  virtual void EndOutput()=0;    //Finish off output
 
  virtual void Clear()=0;  //Clear out the shapes, free memory, etc.

  /****** Return information ******/
  virtual bool HasBeenStored()=0;
  virtual bool HasBeenOutput()=0;
};

#endif
