#pragma once

#include <QPolygonF>
#include <QPointF>

#include "ROSMessageGroups.h"
#include "ROSMessageType.h"

typedef ROSMessageType<QString> ROSMsg;

class Polygon2D : public QPolygonF, public ROSMsg{
public:
    typedef PolygonGroup Group;

    Polygon2D(){}
    Polygon2D(const Polygon2D &other) : QPolygonF(other) , ROSMsg(){}

    Polygon2D& operator=(const Polygon2D& other) {
        QPolygonF::operator=(other);
        return *this;
    }

    virtual Polygon2D*Clone() const { // ROSMsg
        return new Polygon2D(*this);
    }

    const Polygon2D &points() const {return *this;} // ROSMsg
    Polygon2D &points() {return *this;} // ROSMsg

};
