CC-Fractal-Suite
|
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. | |
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.
CC::FractalSpace::FractalSpace | ( | ) |
Set Identity Matrix to matrix on construction.
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.
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.
COMPLEX CC::FractalSpace::get_maximum | ( | ) |
Returns in fractal coords at the top-right most pixel.
COMPLEX CC::FractalSpace::get_minimum | ( | ) |
Returns in fractal coords at the bottom-left most pixel.
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.
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.