#ifndef SOFTSCANCONVERTER_H
#define SOFTSCANCONVERTER_H


class SoftScanConverter
{
public:
    SoftScanConverter();


    static void initialize(int phy_y, int dxy, int x0, int y0, int stride);

    static void clear();

    static void setAngularInterpolation(bool enable);
    static void setRangeInterpolation(bool enable);
    static void setZoom(int ox, int oy, float factor);

    static void addSweep(float angle, float* data, int samples, int direction=0, float f_center=0, float scan_center=0, float left_limit=-3.14/4, float right_limit=3.14/4);

    //static void* update(float angle, float vx, float vy);

    static const void* update(float delta_t, float vx, float vy);

    static void* current_buffer();
    static void* next_buffer();

    static void swap_buffers();

    static int buffer_stride();

    static void simulateSweep(float angle, float* data, int samples, int direction=0, float f_center=0, float scan_center=0, float left_limit=-3.14/4, float right_limit=3.14/4);

    static void block(unsigned int timeout=0);
    static void unblock();

};

#endif // SOFTSCANCONVERTER_H
