#ifndef ELECFIELD_H
#define ELECFIELD_H

#include <iostream>
#include <vector>
#include <cmath>

#include <SDL/SDL.h>
#undef main

#include "SDL/SDL_gfxPrimitives.h"

struct Charge;

class ElecField
{
    /// Méthodes
    public:
        ElecField();
        virtual ~ElecField();

        void renderGraph( int w, int h );
        SDL_Surface* getGraph() const;

        void addCharge(int value, double x, double y, Uint16 nbOut = 24 );

    protected :
        void drawLineFrom( double x, double y );

    /// Attributs
    protected:
        SDL_Surface* m_graph;
        std::vector< Charge > m_chList;
};

#endif // ELECFIELD_H
