CC-Fractal-Suite
StashData.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15  // Local
16 #include "typedefs.h"
17 
18 // STL
19 #include <vector>
20 #include <initializer_list>
21 
22 // HDK
23 #include <OP/OP_Node.h>
24 
25 namespace CC
26 {
28 class StashData
29 {
30 public:
32  virtual void evalArgs(const OP_Node* node, fpreal t) = 0;
33 };
34 
38 struct XformStashData : public StashData
39 {
41  fpreal offset_x{ 0 }, offset_y{ 0 };
42 
44  fpreal rotate{ 0 };
45 
47  fpreal scale{ 1 };
48 
50  RSTORDER xord{ RSTORDER::RST };
51 
53  fpreal offset_x = 0,
54  fpreal offset_y = 0,
55  fpreal rotate = 0,
56  fpreal scale = 0,
57  RSTORDER xord = RSTORDER::RST);
58 
59  void evalArgs(const OP_Node* node, fpreal t);
60 };
61 
67 {
69  std::vector<XformStashData> xforms;
70 
71  void evalArgs(const OP_Node* node, fpreal t) override;
72 };
73 
76 {
78  int iters{ 50 };
79 
81  fpreal power{ 0 };
82 
84  fpreal bailout{ 2 };
85 
87  int jdepth{ 0 };
88 
90  COMPLEX joffset{ 0.0f, 0.0f };
91 
93  bool blackhole{ false };
94 
96  int iters = 50,
97  fpreal power = 2,
98  fpreal bailout = 2,
99  int jdepth = 0,
100  COMPLEX joffset = (0.0f, 0.0f),
101  bool blackhole = false);
102 
103  void evalArgs(const OP_Node* node, fpreal t);
104 };
105 
111 {
113  COMPLEX popoint{ 0, 0 };
114 
116  fpreal porotate{ 0 };
117 
119  bool pomode{ false };
120 
122  bool poref{ true };
123 
125  fpreal porefsize{ 10.0 };
126 
128  int iters = 50,
129  fpreal power = 2.0,
130  fpreal bailout = 2.0,
131  int jdepth = 0,
132  COMPLEX joffset = (0.0, 0.0),
133  bool blackhole = false,
134  COMPLEX popoint = (0.0, 0.0),
135  fpreal porotate = 0.0,
136  bool pomode = false,
137  bool poref = true,
138  fpreal porefsize = 10.0);
139 
140  void evalArgs(const OP_Node* node, fpreal t);
141 };
142 
148 {
150  int iters{ 25 };
151 
153  fpreal start{ 0.5 };
154 
156  fpreal maxval{ 5.0f };
157 
159  bool invertnegative{ true };
160 
163  std::vector<fpreal> seq;
164 
165  void evalArgs(const OP_Node* node, fpreal t);
166 
167  virtual ~LyapunovStashData();
168 };
169 } // 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
virtual void evalArgs(const OP_Node *node, fpreal t)=0
Method that sets parm values from node, based on time.
Struct that stashes of transformation parameter data for FractalSpace.
Definition: StashData.h:38
Struct that stashes the data required to create a Lyapunov Fractal.
Definition: StashData.h:147
Base class for stash data defining pure virtual methods.
Definition: StashData.h:28
Struct that stashes the data required to create a Pickover Fractal.
Definition: StashData.h:110
Struct that stashes the data required to construct a Mandelbrot Fractal.
Definition: StashData.h:75
Header with shared typedefs and parameter name declarations.
Definition: COP2_Buddhabrot.h:17
std::vector< XformStashData > xforms
Vector of Xform populated by evalArgs.
Definition: StashData.h:69
std::vector< fpreal > seq
Sequence of 0-1 values, where 0 represents an X axis, 1 represents a Y axis, and intermediary values ...
Definition: StashData.h:163