Skip to content
Polygon2D.h 770 B
Newer Older
#pragma once

#include <QPolygonF>
#include <QPointF>

#include "ros_bridge/include/MessageGroups.h"
#include "ros_bridge/include/MessageBaseClass.h"
typedef ROSBridge::MessageBaseClass<QString> ROSMsg;
namespace MsgGroups = ROSBridge::MessageGroups;

class Polygon2D : public QPolygonF, public ROSMsg{
public:
    typedef MsgGroups::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

};