CC-Fractal-Suite
FractalSpace.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10  // Local
11 #include "typedefs.h"
12 #include "StashData.h"
13 
14 // STL
15 #include <utility>
16 #include <vector>
17 #include <initializer_list>
18 
19 // HDK
20 #include <TIL/TIL_Tile.h>
21 #include <TIL/TIL_TileList.h>
22 #include <UT/UT_Matrix3.h>
23 #include <TIL/TIL_Tile.h>
24 
25 
26 namespace CC
27 {
29 RSTORDER get_rst_order(const int val);
30 
34  TIL_Tile* tile,
35  WORLDPIXELCOORDS& min,
36  WORLDPIXELCOORDS& max);
37 
41  TIL_TileList* tiles,
42  TIL_Tile* tile,
43  int pixel_index);
44 
57 {
58  int image_x{ 0 };
59  int image_y{ 0 };
60  UT_Matrix3D post_matrix;
62  XformStashData xdata;
63 
66  COMPLEX _get_fractal_coords(COMPLEX pixel_coords);
67 
68 public:
69 
70  FractalSpace();
71  FractalSpace(int x, int y);
72 
73  void set_xform(MultiXformStashData& xdata);
74  void set_xform(XformStashData& xdata);
75  void set_xform(UT_Matrix3D& xform);
76 
81 
87  COMPLEX get_fractal_coords(COMPLEX pixel_coords);
88 
93 
98 
105  void set_image_size(int x, int y);
106 
109 
110  virtual ~FractalSpace();
111 
112 };
113 
114 } // End of CC Namespace
Struct that stashes a vector of XformStashDatas for FractalSpace.
Definition: StashData.h:66
std::complex< fpreal64 > COMPLEX
Double precision complex numbers, as defined by the HDK.
Definition: typedefs.h:25
UT_XformOrder::rstOrder RSTORDER
Short definition of Houdini&#39;s Transform Order enum used by matrices.
Definition: typedefs.h:29
COMPLEX get_maximum()
Returns in fractal coords at the top-right most pixel.
Definition: FractalSpace.cpp:208
Struct that stashes of transformation parameter data for FractalSpace.
Definition: StashData.h:38
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 tr...
Definition: FractalSpace.cpp:178
RSTORDER get_rst_order(const int val)
Get the Houdini rstOrder enum value from the interface.
Definition: FractalSpace.cpp:15
void calculate_tile_minmax(TIL_Tile *tile, WORLDPIXELCOORDS &min, WORLDPIXELCOORDS &max)
Calculates the minimum and maximum pixel coords for the Tile, and returns as pixel coords...
Definition: FractalSpace.cpp:26
COMPLEX get_minimum()
Returns in fractal coords at the bottom-left most pixel.
Definition: FractalSpace.cpp:202
WORLDPIXELCOORDS calculate_world_pixel(TIL_TileList *tiles, TIL_Tile *tile, int pixel_index)
Returns the &#39;world&#39; pixel X, Y coordinates from a tile, which Houdini provides in coordinates relativ...
Definition: FractalSpace.cpp:46
WORLDPIXELCOORDS get_image_size()
Getter for the image size.
Definition: FractalSpace.cpp:222
Header that defines objects that stash cooked parameter data.
Object that stores and manipulates the overall &#39;offset&#39; between the transformation space...
Definition: FractalSpace.h:56
COMPLEX get_fractal_coords(WORLDPIXELCOORDS pixel_coords)
Return the fractal coordinates, which use the size of the image as a relative size.
Definition: FractalSpace.cpp:161
FractalSpace()
Set Identity Matrix to matrix on construction.
Definition: FractalSpace.cpp:65
Header with shared typedefs and parameter name declarations.
Definition: COP2_Buddhabrot.h:17
virtual ~FractalSpace()
Destructor.
Definition: FractalSpace.cpp:228
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...
Definition: FractalSpace.cpp:215
std::pair< int, int > WORLDPIXELCOORDS
Integer pixel coordinate data type.
Definition: typedefs.h:27