#ifndef WING_
#define WING_

#include "ros/ros.h"
#include "impl/abstract_robot_element.h"

class Wing  : public Abstract_robot_element{
    private:
    tf2::Vector3 size_;
    std::vector<tf2::Transform> bounds_;

    public:
    Wing(tf2::Transform tf, tf2::Vector3 size) : size_(size){ 
        relative_tf_ = tf;
        bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/2.f, size_.getY()/2.f,0))); //++
        bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/2.f, size_.getY()/-2.f,0))); //+-
        bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/-2.f, size_.getY()/-2.f,0))); //--
        bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/-2.f, size_.getY()/2.f,0))); //-+
        }
    inline tf2::Vector3 size(){ return size_;}
    inline std::vector<tf2::Transform>& bounds() {return bounds_;}
    void update(tf2::Transform& tf) override {this->calc_world_tf(tf);}
};

#endif