#ifndef MAZEDISP02_H
#define MAZEDISP02_H

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

/*!
\brief Iterate over mazematrixD2 as a matrix drawing
 each cell.

Interprets mazematrixD2 as a m by n matrix,
 iterating over each cell and drawing it.
*/
class mazedisp02 : gobj

{
public:

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

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

  /** Display the cells id. */
  bool displaycellid;

  /** Instead of drawing the walls, draw the paths. */
  bool pipes;
  point3<double> pipecolor;

  /** Display the walls. */
  bool walls;
  /** Color of cell walls. */
  point3<double> wallcolor;

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

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

  /** Draw cell with path istead of walls. */
  void celldraw2
  ( 
    cellD2<uint> const & x,
    point2<double> const & p
  );

};


#endif


