Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

FastImageGen Class Reference

This class processes a FractalImage by calculating it pixel by pixel. More...

#include <FastImageGen.h>

Inheritance diagram for FastImageGen:

ImageGen List of all members.

Public Methods

 FastImageGen (FractalImage *)
 Constructor.

void init (void)
 Overriden from ImageGen base class.

void restart (void)
 Overriden from ImageGen base class.

bool process (void)
 Overriden from ImageGen base class.

bool inq_done (void) const
 Overriden from ImageGen base class.

int inq_progress (void) const
 Overriden from ImageGen base class.


Private Attributes

FractalImagem_image
 FractalImage.

bool m_done
 Flag that is set once processing is finished.

int m_progress
 Progress counter - increments from 0 to 100 during processing.

int m_x
 'x' offset to current pixel.

int m_y
 'y' offset to current pixel.

rgbcolour_tm_curr_rgb_pixel
 Pointer to current RGB pixel.

unsigned short * m_curr_pixel_itns
 Pointer to current pixel iteration count,.

Vector2 m_curr_pixel
 Position of bottom left corner of current pixel.

Vector2 m_rowstart
 Position in fractal space of first pixel on the current row.

Vector2 m_xoffs
 Offset in fractal space from a pixel to the next.

Vector2 m_yoffs
 Offset in fractal space from a pixel in one row to the next.


Detailed Description

This class processes a FractalImage by calculating it pixel by pixel.

This is much faster than the technique used by ProgressiveFractalImage, but it does mean there is nothing to see until the whole image has been calculated.


Constructor & Destructor Documentation

FastImageGen::FastImageGen FractalImage   image
 

Constructor.

Parameters:
image  The image that this FastImageGen will generate.


Member Function Documentation

void FastImageGen::init void    [virtual]
 

Overriden from ImageGen base class.

Implements ImageGen.

bool FastImageGen::inq_done void    const [virtual]
 

Overriden from ImageGen base class.

Returns:
Returns true when image has been generated.

Implements ImageGen.

int FastImageGen::inq_progress void    const [virtual]
 

Overriden from ImageGen base class.

Returns:
Returns the value shown as a progress indicator in the status bar.

Implements ImageGen.

bool FastImageGen::process void    [virtual]
 

Overriden from ImageGen base class.

Processes the next pixel. This method should be called repeatedly until inq_done() returns true.

Returns:
Returns true if the display should be updated (which is when all pixels have been processed), otherwise false.

Implements ImageGen.

void FastImageGen::restart void    [virtual]
 

Overriden from ImageGen base class.

Initialises all the member variables for processing 'm_image'. This must be called before process() is called, and whenever the image changes.

Implements ImageGen.


Member Data Documentation

Vector2 FastImageGen::m_curr_pixel [private]
 

Position of bottom left corner of current pixel.

unsigned short* FastImageGen::m_curr_pixel_itns [private]
 

Pointer to current pixel iteration count,.

rgbcolour_t* FastImageGen::m_curr_rgb_pixel [private]
 

Pointer to current RGB pixel.

bool FastImageGen::m_done [private]
 

Flag that is set once processing is finished.

FractalImage* FastImageGen::m_image [private]
 

FractalImage.

int FastImageGen::m_progress [private]
 

Progress counter - increments from 0 to 100 during processing.

Vector2 FastImageGen::m_rowstart [private]
 

Position in fractal space of first pixel on the current row.

int FastImageGen::m_x [private]
 

'x' offset to current pixel.

Vector2 FastImageGen::m_xoffs [private]
 

Offset in fractal space from a pixel to the next.

This is determined from the view transform and the image size.

int FastImageGen::m_y [private]
 

'y' offset to current pixel.

Vector2 FastImageGen::m_yoffs [private]
 

Offset in fractal space from a pixel in one row to the next.

This is determined from the view transform and the image size.


The documentation for this class was generated from the following files:
Generated on Sun Jul 21 11:52:17 2002 for FractalViewer by doxygen1.2.16