//-*-c++-*-
#ifndef _TAPIAMARKERDATA_H_
#define _TAPIAMARKERDATA_H_

#include <vector>

#include "DualCoding/DualCoding.h"
#include "DualCoding/ShapeRoot.h"

namespace DualCoding {

class MapBuilderRequest;

//! Marker shapes, described by a single point in space
class TapiaMarkerData : public MarkerData {
public:
  //! the color on the top of the marker
  rgb topColor;
  //! the color on the bottom of the marker
  rgb bottomColor;

public:
  //! Constructor
  TapiaMarkerData(ShapeSpace& space, const Point& center, const rgb topColor, const rgb bottomColor);
    
  DATASTUFF_H(TapiaMarkerData);

  //! Print information about this shape.
  virtual void printParams() const;
    
  virtual bool isMatchingMarker(const Shape<MarkerData>& other) const;

  //! Return the string description for this marker (used to display marker specific information)
  virtual std::string getMarkerDescription() const;
  
  //! Extract markers of @a type from @a sketch
  static std::vector<Shape<MarkerData> > extractMarkers(const Sketch<uchar> &sketch, const MapBuilderRequest &req);
  
public:
  //! type of tapia markers
  static const MarkerType_t tapiaMarkerType;
  
};

template<> class Shape<TapiaMarkerData> : public ShapeRoot {
public:
  SHAPESTUFF_H(TapiaMarkerData);
};

} // namespace

#endif // MARKERDATA_H_
