#ifndef MAZEDISP01_H
#define MAZEDISP01_H

#include <cellD2.h>
#include <gobj.h>
#include <mazematrixD2.h>
#include <mazematrixmapD2.h>
#include <point.h>


/**
\brief Draw a linked cell maze to the global graphics stream.

This is not a matrix display, as it displays only
 cells linked from the origin. So cells in the matrix
 that are not on the path of the origin are not displayed.
*/
class mazedisp01 : gobj
{
public:

  /** Maze is drawn with this cell as the origin. */
  uint mazeorigin;

  /** Maze. */
  mazematrixD2<uint> mz;

  /** Map of integer coordinats of maze from links. */
  mazematrixmapD2<uint,int> mmap;

  /** Square cell side length. */ 
  double dx;

  /** Color of cell walls. */
  gobjglColor3f color;

  /** Default maze draw. */
  mazedisp01
  (
    doublec dx_, 
    uintc mazeindexorigin_,
    mazematrixD2<uint> const & mz_
  );

  /** Draws to the global graphics stream. */
  void draw();
  
  /** Draw cell. */
  void celldraw
  ( 
    cellD2<uint> const & x,
    point2<double> const & p
  );

};


#endif


