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

AAFractalImage Class Reference

AAFractalImage takes a FractalImage that has already been calculated, and adaptively anti-aliases the image. More...

#include <AAFractalImage.h>

List of all members.

Public Methods

 AAFractalImage (FractalImage *)
 Constructor.

void set_subpixel_gridsize (int)
 Sets the sub pixel grid size.

int inq_subpixel_gridsize (void) const
void restart (void)
 Initialises all the member variables for anti-aliasing 'm_image'.

bool process (void)
 Processes the next pixel.

bool inq_done (void) const
int inq_progress (void) const

Private Attributes

FractalImagem_image
 FractalImage.

int m_subpixel_gridsize
 Size of subpixel square grid.

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.

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.

Vector2 m_xsuboffs
 Distance from current sub-pixel row to next.

Vector2 m_ysuboffs
 Distance from current sub-pixel to next sub-pixel on current sub-pixel row.


Detailed Description

AAFractalImage takes a FractalImage that has already been calculated, and adaptively anti-aliases the image.

This is done by comparing each pixel with it's 8 neighbours. If it is different to any of its neighbours, it is anti-aliased. Otherwise, it is assumed to be in a constant region, so it does not need anti-aliasing.


Constructor & Destructor Documentation

AAFractalImage::AAFractalImage FractalImage   image
 

Constructor.

Parameters:
image  The image that this AAFractalImage will anti-alias.


Member Function Documentation

bool AAFractalImage::inq_done void    const [inline]
 

int AAFractalImage::inq_progress void    const [inline]
 

int AAFractalImage::inq_subpixel_gridsize void    const [inline]
 

bool AAFractalImage::process void   
 

Processes the next pixel.

This method should be called repeatedly until inq_done() returns true.

Returns:
Returns true if the display should be updated, otherwise false.

void AAFractalImage::restart void   
 

Initialises all the member variables for anti-aliasing 'm_image'.

This must be called before process() is called, and whenever the image or sub pixel grid size changes.

void AAFractalImage::set_subpixel_gridsize int    subpixel_gridsize
 

Sets the sub pixel grid size.

Parameters:
subpixel_gridsize  Sets the size of the sub-pixel grid used to anti-alias. The number set defines the size of the square grid, so there will be the square of this number of sub-pixels. If 'n'=1, then there is only one sample per pixel, i.e. no anti-aliasing. If 'n'=2, then 2x2 (i.e. 4) samples are calculated per pixel. If 'n'=3, then 3x3 (i.e. 9) samples, and so on.


Member Data Documentation

Vector2 AAFractalImage::m_curr_pixel [private]
 

Position of bottom left corner of current pixel.

rgbcolour_t* AAFractalImage::m_curr_rgb_pixel [private]
 

Pointer to current RGB pixel.

bool AAFractalImage::m_done [private]
 

Flag that is set once processing is finished.

FractalImage* AAFractalImage::m_image [private]
 

FractalImage.

int AAFractalImage::m_progress [private]
 

Progress counter - increments from 0 to 100 during processing.

Vector2 AAFractalImage::m_rowstart [private]
 

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

int AAFractalImage::m_subpixel_gridsize [private]
 

Size of subpixel square grid.

There will be the square of this value subpixels per pixel.

int AAFractalImage::m_x [private]
 

'x' offset to current pixel.

Vector2 AAFractalImage::m_xoffs [private]
 

Offset in fractal space from a pixel to the next.

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

Vector2 AAFractalImage::m_xsuboffs [private]
 

Distance from current sub-pixel row to next.

int AAFractalImage::m_y [private]
 

'y' offset to current pixel.

Vector2 AAFractalImage::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.

Vector2 AAFractalImage::m_ysuboffs [private]
 

Distance from current sub-pixel to next sub-pixel on current sub-pixel row.


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