00001 #ifndef ProgressiveImageGen_H 00002 #define ProgressiveImageGen_H 00003 /*######################################################################## 00004 File: ProgressiveImageGen.h 00005 Creation date: 6th June 2002 00006 00007 Copyright 2002 Mark Williams, all rights reserved. 00008 Contact: mark@extrabit.com 00009 http://www.extrabit.com 00010 00011 This program is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License 00013 as published by the Free Software Foundation; either version 2 00014 of the License, or (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 ########################################################################*/ 00022 00023 /*######################################################################## 00024 Headers 00025 ########################################################################*/ 00026 00027 #include "ImageGen.h" 00028 #include "Vector2.h" 00029 00030 /*######################################################################## 00031 Declarations 00032 ########################################################################*/ 00033 00034 class FractalImage ; 00035 class Palette ; 00036 class Processor ; 00037 class ComplexNumber ; 00038 00039 /*######################################################################## 00040 Class Definition 00041 ########################################################################*/ 00042 00055 class ProgressiveImageGen : public ImageGen 00056 { 00057 public: 00058 ProgressiveImageGen (FractalImage*) ; 00059 ~ProgressiveImageGen (void) ; 00060 00061 // Overriden from ImageGen base class. 00062 void init (void) ; 00063 void restart (void) ; 00064 bool process (void) ; 00065 bool inq_done (void) const ; 00066 int inq_progress (void) const ; 00067 00068 private: 00069 void init_pixels (void) ; 00070 void process_line (void) ; 00071 00072 private: 00074 FractalImage* m_image ; 00075 00080 ComplexNumber* m_pixel_values ; 00081 00087 bool* m_pixels_done ; 00088 00092 bool* m_lines_done ; 00093 00095 Vector2 m_origin ; 00096 00098 Vector2 m_rowstart ; 00099 00103 Vector2 m_xoffs ; 00104 00108 Vector2 m_yoffs ; 00109 00113 unsigned short m_current_itn ; 00114 00116 bool m_done ; 00117 00119 int m_nextline ; 00120 00124 bool m_curr_itn_all_done ; 00125 00129 bool m_curr_itn_any_changed ; 00130 } ; 00131 00132 00133 /*######################################################################## 00134 End 00135 ########################################################################*/ 00136 #endif
1.2.16