#pragma once class IMandelbrot { //------------------------------------------------------------------------------ public: struct CParams { int** m_outarray; double m_minRe, m_maxRe; double m_minIm, m_maxIm; double m_step; int m_x_width; int m_y_height; int m_iterations; unsigned int m_threads; int m_posix_begin; int m_posix_end; bool m_use_sse; CParams( int** outarray, double minRe, double maxRe, double minIm, double maxIm, double step, int x_width, int y_height, int iterations, unsigned int threads, bool use_sse): m_outarray(outarray), m_minRe(minRe), m_maxRe(maxRe), m_minIm(minIm), m_maxIm(maxIm), m_step(step),m_x_width(x_width),m_y_height(y_height),m_iterations(iterations),m_threads(threads),m_use_sse(use_sse){}; CParams* copy(){ return new CParams(m_outarray,m_minRe,m_maxRe,m_minIm,m_maxIm,m_step,m_x_width,m_y_height,m_iterations,m_threads,m_use_sse); } }; private: //------------------------------------------------------------------------------ CParams* m_Params; virtual void calc(CParams& params) = 0; protected: static void checkNumber(CParams& params, double real, double imag, int rePos, int imPos); public: void Init( int x_width, int y_height, int iterations, unsigned int threads, bool sse); void Exit(); void calculateMandelbrot(); int** getOutArray(); };