CC-Fractal-Suite
Public Member Functions | List of all members
CC::FractalSpace Class Reference

Object that stores and manipulates the overall 'offset' between the transformation space, and the desired viewing space of a fractal. More...

#include <FractalSpace.h>

Public Member Functions

 FractalSpace ()
 Set Identity Matrix to matrix on construction. More...
 
 FractalSpace (int x, int y)
 
void set_xform (MultiXformStashData &xdata)
 
void set_xform (XformStashData &xdata)
 
void set_xform (UT_Matrix3D &xform)
 
COMPLEX get_fractal_coords (WORLDPIXELCOORDS pixel_coords)
 Return the fractal coordinates, which use the size of the image as a relative size. More...
 
COMPLEX get_fractal_coords (COMPLEX pixel_coords)
 Returns fractal coordinates, but with input coordinates that were determined from double precision values, and not inteter pixels. More...
 
WORLDPIXELCOORDS get_pixel_coords (COMPLEX fractal_coords)
 get_pixel_coords is only configured to work with the Buddhabrot, and may not work with non-default transformation orders or xforms with non-zero pivot points. More...
 
COMPLEX get_minimum ()
 Returns in fractal coords at the bottom-left most pixel. More...
 
COMPLEX get_maximum ()
 Returns in fractal coords at the top-right most pixel. More...
 
void set_image_size (int x, int y)
 A fractal space must be populated with a default image size to be used by the context correctly. More...
 
WORLDPIXELCOORDS get_image_size ()
 Getter for the image size.
 
virtual ~FractalSpace ()
 Destructor.
 

Detailed Description

Object that stores and manipulates the overall 'offset' between the transformation space, and the desired viewing space of a fractal.

The default size of the transformation space that shall be compared against the object's image_x and image_y members. These should be set, either from the constructor or from set_image_size. Then, to 'transform' the fractal, call set_xform with the desired transformation. With these two values, FratalSpace will successfully return coordinates in 'fractal space', which can be passed to fractals.

Constructor & Destructor Documentation

§ FractalSpace()

CC::FractalSpace::FractalSpace ( )

Set Identity Matrix to matrix on construction.

Member Function Documentation

§ get_fractal_coords() [1/2]

COMPLEX CC::FractalSpace::get_fractal_coords ( WORLDPIXELCOORDS  pixel_coords)

Return the fractal coordinates, which use the size of the image as a relative size.

The scale is 0-1 in the x axis of the image.

§ get_fractal_coords() [2/2]

COMPLEX CC::FractalSpace::get_fractal_coords ( COMPLEX  pixel_coords)

Returns fractal coordinates, but with input coordinates that were determined from double precision values, and not inteter pixels.

Primarily used by the Buddhabrot where 'sample' values may not directly match a pixel. See COP2_Buddhabrot for more details.

§ get_maximum()

COMPLEX CC::FractalSpace::get_maximum ( )

Returns in fractal coords at the top-right most pixel.

§ get_minimum()

COMPLEX CC::FractalSpace::get_minimum ( )

Returns in fractal coords at the bottom-left most pixel.

§ get_pixel_coords()

WORLDPIXELCOORDS CC::FractalSpace::get_pixel_coords ( COMPLEX  fractal_coords)

get_pixel_coords is only configured to work with the Buddhabrot, and may not work with non-default transformation orders or xforms with non-zero pivot points.

§ set_image_size()

void CC::FractalSpace::set_image_size ( int  x,
int  y 
)

A fractal space must be populated with a default image size to be used by the context correctly.

The image size is used as a rest size for the fractal, which is normalized by The size of the image. This is done so that changes in resolution don't require Changes in transformation to see the same Fractal.


The documentation for this class was generated from the following files: