#include <include/renderthread.h>
Signals | |
void | Progress (float pourcent, int threadId) |
void | Finish (int threadId) |
Public Member Functions | |
RenderThread (QObject *parent=0, int id=0) | |
~RenderThread () | |
void | SetRender (int w, int h, int threadCount, double centerx, double centery, double precision, int minIteration, double real, double imaginary, double zoom, int iteration, Fractal fractal, const QGradientStops &gradient, QImage *gradientImage, bool smooth, float dilatation, QImage *image, QMutex *imageMutex) |
void | Stop () |
void | Finish () |
Protected Member Functions | |
void | run () |
void | RenderMandelBrot () |
void | RenderBuddhabrot () |
void | RenderJulia () |
Protected Attributes | |
QMutex | m_Mutex |
QWaitCondition | m_Condition |
int | m_iId |
bool | m_bRestart |
bool | m_bStop |
bool | m_bFinish |
Fractal | m_iFractal |
int | m_iThreadCount |
int | m_iProgress |
int | m_iX |
int | m_iY |
int | m_iW |
int | m_iH |
int | m_iRW |
int | m_iRH |
double | m_fCenterX |
double | m_fCenterY |
double | m_fZoom |
double | m_fPrecision |
int | m_iMinIteration |
int | m_iIteration |
double | m_fReal |
double | m_fImaginary |
bool | m_bSmoothColors |
float | m_fDilatation |
QImage * | m_pImage |
QMutex * | m_pImageMutex |
QGradientStops | m_Gradient |
QImage * | m_pGradientImage |
Static Protected Attributes | |
static QVector< unsigned long > | m_Map |
static int | m_iThreadFinish |
static unsigned long | m_iMax |
Thread de rendu des fractales
Definition at line 28 of file renderthread.h.
RenderThread::RenderThread | ( | QObject * | parent = 0 , |
|
int | id = 0 | |||
) |
RenderThread::~RenderThread | ( | ) |
Definition at line 60 of file renderthread.cpp.
void RenderThread::Finish | ( | ) |
Envoie du signale de fin du thread
Definition at line 149 of file renderthread.cpp.
void RenderThread::RenderBuddhabrot | ( | ) | [protected] |
Fonction de rendu d'un Buddhabrot
Definition at line 294 of file renderthread.cpp.
void RenderThread::RenderJulia | ( | ) | [protected] |
Fonction de rendu d'un Julia
Definition at line 466 of file renderthread.cpp.
void RenderThread::RenderMandelBrot | ( | ) | [protected] |
Fonction de rendu d'un MandelBrot
Definition at line 196 of file renderthread.cpp.
void RenderThread::run | ( | ) | [protected] |
Fonction pricipale du thread
Definition at line 160 of file renderthread.cpp.
void RenderThread::SetRender | ( | int | w, | |
int | h, | |||
int | threadCount, | |||
double | centerx, | |||
double | centery, | |||
double | precision, | |||
int | minIteration, | |||
double | real, | |||
double | imaginary, | |||
double | zoom, | |||
int | iteration, | |||
Fractal | fractal, | |||
const QGradientStops & | gradient, | |||
QImage * | gradientImage, | |||
bool | smooth, | |||
float | dilatation, | |||
QImage * | image, | |||
QMutex * | imageMutex | |||
) |
Initialise le rendu pour le thread
w | : largeur de la fenetre de rendu | |
h | : hauteur de la fenetre de rendu | |
threadCount | : nombre de threads utilisé pour le rendu | |
centerx | : coordonée en x du centre de la fractale | |
centery | : coordonée en y du centre de la fractale | |
precision | : précision utilisé pour le rendu du Buddhabrot | |
minIteration | : nombre minimum d'iteration pour le rendu du Buddhabrot | |
real | : valeur réel du complex utilisé pour la fractale Julia | |
imaginary | : valeur imaginaire du complex utilisé pour la fractale Julia | |
zoom | : zoom utilisé sur la fractale | |
iteration | : nombre d'itération maximum pour le rendu de la fractale | |
fractal | : type de fractale à calculé | |
gradient | : gradient utilisé pour la séléction des couleurs (non utilisé) | |
*gradientImage | : image contenant une représentation du gradient pour la séléction des couleurs | |
smooth | : utilisation du Normalized Iteration Count Algorithm pour lisser les couleurs | |
*image | : image du rendu finale | |
*imageMutex | : mutex de l'image du rendu finale |
Definition at line 85 of file renderthread.cpp.
void RenderThread::Stop | ( | ) |
Envoie le signal d'arret et d'attente au thread
Definition at line 140 of file renderthread.cpp.