#ifndef CONTROLPANEL_H
#define CONTROLPANEL_H

#include "networld.h"


// Tools
void printVector2( Vector2 v );


//-----------------------------------//
//--        Cotrol Panel           --//
//-----------------------------------//

struct Str_Panel {
    Vector2 camera, screenCenter;
    float scale; // meter per pixel
    NetWorld * world;
};

typedef struct Str_Panel Panel;

// Constructor / Destructor
Panel * Panel_new();
void Panel_delete(Panel * self);

// Initialization
void Panel_initialize(Panel * self, NetWorld * world);

// To String
void Panel_print(Panel * self);

// Rendering
void Panel_draw(Panel * self);
void Panel_drawBasis(Panel * self);
void Panel_drawNode(Panel * self, Node * n);
void Panel_drawEdge(Panel * self, Edge * e);
Vector2 Panel_pixelFromPosition(Panel * self, Vector2 * p);
Vector2 Panel_positionFromPixel(Panel * self, Vector2 * p);

// Control
void Panel_control(Panel * self);
void Panel_controlCamera(Panel * self);

#endif //CONTROLPANEL_H