#include <include/brotdisplay.h>
Public Slots | |
void | SetPosX (double x) |
void | SetPosY (double y) |
void | SetZoom (double z) |
void | SetIteration (int ite) |
void | SetFractal (Fractal frac) |
void | SetThreadCount (int count) |
void | SetPrecision (double precision) |
void | SetMinIteration (int min) |
void | SetReal (double real) |
void | SetImaginary (double imaginary) |
void | SetSmoothColors (bool smooth) |
void | SetAnimatedRender (bool animated) |
void | SetGradient (const QGradientStops &stops) |
void | SetDilatation (double dilatation) |
void | OnThreadFinish (int id) |
void | OnThreadProgress (float, int) |
void | RedrawFractal () |
void | OnTimer () |
Signals | |
void | ZoomChanged (double) |
void | PosXChanged (double) |
void | PosYChanged (double) |
void | IterationChanged (int) |
void | ThreadCountChanged (int) |
void | PrecisionChanged (double) |
void | RealChanged (double) |
void | ImaginaryChanged (double) |
void | SmoothColorsChanged (bool) |
void | AnimatedRenderChanged (bool) |
void | DilatationChanged (double) |
void | Progress (float) |
Public Member Functions | |
BrotDisplay (QWidget *parent=0) | |
~BrotDisplay () | |
void | SetupThread (int count) |
void | Cancel () |
bool | Save (QString file) |
Protected Member Functions | |
void | wheelEvent (QWheelEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
virtual void | paintEvent (QPaintEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
virtual void | initializeGL () |
virtual void | paintGL () |
virtual void | resizeGL (int width, int height) |
QString | LoadResTxt (const char *file) |
void | GenerateTexture () |
Protected Attributes | |
Fractal | m_iFractal |
QImage | m_Image |
QMutex | m_ImageMutex |
QTimer | m_Timer |
QTime | m_iLastPaint |
double | m_fCurrentZoom |
int | m_iZoomCount |
double | m_fRenderPosX |
double | m_fRenderPosY |
double | m_fRenderZoom |
bool | m_bDrag |
QPoint | m_MousePoint |
double | m_fOrigX |
double | m_fOrigY |
bool | m_bWaitRender |
QImage | m_GradientImage |
QImage | m_TempGradientImage |
QList< RenderThread * > | m_RenderThreads |
QVector< float > | m_RenderProgress |
int | m_iRenderFinishCount |
GLuint | m_iTexture |
float | m_fRatio |
double | m_fPosX |
double | m_fPosY |
double | m_fZoom |
int | m_iIteration |
double | m_fPrecision |
int | m_iMinIteration |
double | m_fReal |
double | m_fImaginary |
double | m_fDilatation |
QGradientStops | m_Gradient |
bool | m_bSmoothColors |
bool | m_bAnimatedRender |
Widget d'affichage des fractales
Definition at line 25 of file brotdisplay.h.
BrotDisplay::BrotDisplay | ( | QWidget * | parent = 0 |
) |
BrotDisplay::~BrotDisplay | ( | ) |
Definition at line 57 of file brotdisplay.cpp.
void BrotDisplay::Cancel | ( | ) |
Stope le rendu des threads
Definition at line 677 of file brotdisplay.cpp.
void BrotDisplay::GenerateTexture | ( | ) | [protected] |
Génére la texture du gradient
Copie l'image du gradient dans une texture OpenGL
Definition at line 714 of file brotdisplay.cpp.
void BrotDisplay::initializeGL | ( | ) | [protected, virtual] |
Initialise OpenGL ainsi que les shader du MandelBrot et Julia
Definition at line 192 of file brotdisplay.cpp.
QString BrotDisplay::LoadResTxt | ( | const char * | file | ) | [protected] |
Charge un fichier texte dans les ressources
Charge un fichier texte inclut dans les ressources de l'application
*file |
Definition at line 663 of file brotdisplay.cpp.
void BrotDisplay::mouseMoveEvent | ( | QMouseEvent * | event | ) | [protected] |
Fonction dévénement du mouvement de la souris
*event |
Definition at line 178 of file brotdisplay.cpp.
void BrotDisplay::mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Fonction dévénement du clic de la souris
*event |
Definition at line 149 of file brotdisplay.cpp.
void BrotDisplay::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [protected] |
Fonction dévénement du lacher du clic de la souris
QMouseEvent* |
Definition at line 164 of file brotdisplay.cpp.
void BrotDisplay::OnThreadFinish | ( | int | id | ) | [slot] |
Fonction d'événement lorsque un thread est terminé
int |
Definition at line 582 of file brotdisplay.cpp.
void BrotDisplay::OnThreadProgress | ( | float | value, | |
int | id | |||
) | [slot] |
Fonction d'événement lorsque un thread est en cours de rendu
value | ||
id |
Definition at line 598 of file brotdisplay.cpp.
void BrotDisplay::OnTimer | ( | ) | [slot] |
Fonction d'événement du timer pour l'animation du zoom
Definition at line 105 of file brotdisplay.cpp.
void BrotDisplay::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Fonction de dessin du widget
QPaintEvent* |
Definition at line 74 of file brotdisplay.cpp.
void BrotDisplay::paintGL | ( | ) | [protected, virtual] |
Fonction de dessin en OpenGL
Definition at line 221 of file brotdisplay.cpp.
void BrotDisplay::RedrawFractal | ( | ) | [slot] |
Fonction premettant de (re)initialisé le rendu software ou OpenGL
Definition at line 623 of file brotdisplay.cpp.
void BrotDisplay::resizeEvent | ( | QResizeEvent * | event | ) | [protected, virtual] |
Fonction de redimensionnement du Widget
*event |
Definition at line 123 of file brotdisplay.cpp.
void BrotDisplay::resizeGL | ( | int | width, | |
int | height | |||
) | [protected, virtual] |
Fonction de redimensionnement de la fenetre OpenGL
width | ||
height |
Definition at line 305 of file brotdisplay.cpp.
bool BrotDisplay::Save | ( | QString | file | ) |
Sauvegarde le rendu dans une image PNG
file |
Definition at line 693 of file brotdisplay.cpp.
void BrotDisplay::SetAnimatedRender | ( | bool | animated | ) | [slot] |
Active ou désactive l'affichage du rendu en temps réel
animated |
Definition at line 535 of file brotdisplay.cpp.
void BrotDisplay::SetDilatation | ( | double | dilatation | ) | [slot] |
Définie la dilatation du gradient
dilatation |
Definition at line 501 of file brotdisplay.cpp.
void BrotDisplay::SetFractal | ( | Fractal | frac | ) | [slot] |
Définie le type de fractale à déssiné
frac |
Definition at line 384 of file brotdisplay.cpp.
void BrotDisplay::SetGradient | ( | const QGradientStops & | stops | ) | [slot] |
Définie le gradient utilisé pour les couleurs des fractales
stops |
Definition at line 473 of file brotdisplay.cpp.
void BrotDisplay::SetImaginary | ( | double | imaginary | ) | [slot] |
Définie la valeur imaginaire du complex utilisé pour le rendu du Julia
imaginary |
Definition at line 456 of file brotdisplay.cpp.
void BrotDisplay::SetIteration | ( | int | ite | ) | [slot] |
Définie le nombre d'itératio max pour la fractale
ite |
Definition at line 371 of file brotdisplay.cpp.
void BrotDisplay::SetMinIteration | ( | int | min | ) | [slot] |
Définie le nombre minimum d'itération pour le Buddhabrot
min |
Definition at line 426 of file brotdisplay.cpp.
void BrotDisplay::SetPosX | ( | double | x | ) | [slot] |
Définie la position en horizontal du centre de la fractale
x |
Definition at line 321 of file brotdisplay.cpp.
void BrotDisplay::SetPosY | ( | double | y | ) | [slot] |
Définie la position en vertical du centre de la fractale
y |
Definition at line 334 of file brotdisplay.cpp.
void BrotDisplay::SetPrecision | ( | double | precision | ) | [slot] |
Définie la précision utilisé pour le rendu du Buddhabrot
precision |
Definition at line 413 of file brotdisplay.cpp.
void BrotDisplay::SetReal | ( | double | real | ) | [slot] |
Définie la valeur réel du complex utilisé pour le rendu du Julia
real |
Definition at line 439 of file brotdisplay.cpp.
void BrotDisplay::SetSmoothColors | ( | bool | smooth | ) | [slot] |
Active ou désactive le Normalized Iteration Count Algorithm
smooth |
Definition at line 518 of file brotdisplay.cpp.
void BrotDisplay::SetThreadCount | ( | int | count | ) | [slot] |
Définie le nombre de threads utilisés pour le rendue software
count |
Definition at line 400 of file brotdisplay.cpp.
void BrotDisplay::SetupThread | ( | int | count | ) |
Initialise le nombre de threads utilisés
count |
Definition at line 548 of file brotdisplay.cpp.
void BrotDisplay::SetZoom | ( | double | z | ) | [slot] |
Définie le zoom appliqué à la fractale
z |
Definition at line 347 of file brotdisplay.cpp.
void BrotDisplay::wheelEvent | ( | QWheelEvent * | event | ) | [protected] |
Fonction dévénement de la molette
*event |
Definition at line 135 of file brotdisplay.cpp.
GLuint BrotDisplay::m_iTexture [protected] |
OpenGL resources Si la version de QT est inférieur à la 4.6 alors on n'utilise pas OpenGL
Definition at line 129 of file brotdisplay.h.
QList<RenderThread*> BrotDisplay::m_RenderThreads [protected] |
Software (thread) resources
Definition at line 118 of file brotdisplay.h.