HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeVisualization.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 using namespace UT::Literal;
23 
24 class DEP_MicroNode;
25 namespace SOP_VolumeVisualizationEnums
26 {
27  enum class VisMode
28  {
29  NONE = 0,
30  SMOKE,
31  HEIGHTFIELD
32  };
33  enum class Densityrampmode
34  {
35  NONE = 0,
36  CLAMP,
37  PERIODIC
38  };
39  enum class Cdrampmode
40  {
41  NONE = 0,
42  CLAMP,
43  PERIODIC
44  };
45  enum class Emitrampmode
46  {
47  NONE = 0,
48  CLAMP,
49  PERIODIC
50  };
51  enum class Emitcdrampmode
52  {
53  NONE = 0,
54  CLAMP,
55  PERIODIC,
56  PHYSICAL,
57  PLANCK
58  };
59 }
60 
61 
63 {
64 public:
65  static int version() { return 1; }
66 
68  {
69  myVisMode = 1;
70  myRangemin = 0;
71  myRangemax = 1;
72  myDensityscale = 1;
73  myShadowscale = 1;
74  mySetambientshadows = false;
75  myAmbientshadows = 1;
76  mySetshadowcolor = false;
77  myShadowcolor = UT_Vector3D(1,1,1);
78  mySetmaxres = false;
79  myMaxres = 128;
80  myDensityfield = "density"_sh;
81  myDensityrampmode = 1;
82  myDensityramp = UT_SharedPtr<UT_Ramp>(0);
83  myCdfield = ""_sh;
84  myCdrangeoverride = false;
85  myCdrange = UT_Vector2D(0,1);
86  myCdrampmode = 1;
87  myCdramp = UT_SharedPtr<UT_Ramp>(0);
88  myEmitscale = 0;
89  myEmitfield = ""_sh;
90  myEmitrangeoverride = false;
91  myEmitrange = UT_Vector2D(0,1);
92  myEmitrampmode = 1;
93  myEmitramp = UT_SharedPtr<UT_Ramp>(0);
94  myEmitcdfield = ""_sh;
95  myEmitcdrampmode = 1;
96  myEmitcdramp = UT_SharedPtr<UT_Ramp>(0);
97  myEmitcdfieldscale = 1;
98  myEmitcdtemperature0 = 0;
99  myEmitcdtemperature = 5000;
100  myEmitcdtonemap = true;
101  myEmitcdadaptation = 0.15;
102  myEmitcdburn = 0;
103  myEnablescatter = false;
104  myExtinctionratio = 1;
105  myScatteringiter = 25;
106  myEmitcdrangeoverride = false;
107  myEmitcdrange = UT_Vector2D(0,1);
108 
109  }
110 
112 
114 
116  {
117  if (myVisMode != src.myVisMode) return false;
118  if (myRangemin != src.myRangemin) return false;
119  if (myRangemax != src.myRangemax) return false;
120  if (myDensityscale != src.myDensityscale) return false;
121  if (myShadowscale != src.myShadowscale) return false;
122  if (mySetambientshadows != src.mySetambientshadows) return false;
123  if (myAmbientshadows != src.myAmbientshadows) return false;
124  if (mySetshadowcolor != src.mySetshadowcolor) return false;
125  if (myShadowcolor != src.myShadowcolor) return false;
126  if (mySetmaxres != src.mySetmaxres) return false;
127  if (myMaxres != src.myMaxres) return false;
128  if (myDensityfield != src.myDensityfield) return false;
129  if (myDensityrampmode != src.myDensityrampmode) return false;
130  if (myDensityramp != src.myDensityramp)
131  { if (!myDensityramp || !src.myDensityramp || !(*myDensityramp == *src.myDensityramp)) return false; }
132  if (myCdfield != src.myCdfield) return false;
133  if (myCdrangeoverride != src.myCdrangeoverride) return false;
134  if (myCdrange != src.myCdrange) return false;
135  if (myCdrampmode != src.myCdrampmode) return false;
136  if (myCdramp != src.myCdramp)
137  { if (!myCdramp || !src.myCdramp || !(*myCdramp == *src.myCdramp)) return false; }
138  if (myEmitscale != src.myEmitscale) return false;
139  if (myEmitfield != src.myEmitfield) return false;
140  if (myEmitrangeoverride != src.myEmitrangeoverride) return false;
141  if (myEmitrange != src.myEmitrange) return false;
142  if (myEmitrampmode != src.myEmitrampmode) return false;
143  if (myEmitramp != src.myEmitramp)
144  { if (!myEmitramp || !src.myEmitramp || !(*myEmitramp == *src.myEmitramp)) return false; }
145  if (myEmitcdfield != src.myEmitcdfield) return false;
146  if (myEmitcdrampmode != src.myEmitcdrampmode) return false;
147  if (myEmitcdramp != src.myEmitcdramp)
148  { if (!myEmitcdramp || !src.myEmitcdramp || !(*myEmitcdramp == *src.myEmitcdramp)) return false; }
149  if (myEmitcdfieldscale != src.myEmitcdfieldscale) return false;
150  if (myEmitcdtemperature0 != src.myEmitcdtemperature0) return false;
151  if (myEmitcdtemperature != src.myEmitcdtemperature) return false;
152  if (myEmitcdtonemap != src.myEmitcdtonemap) return false;
153  if (myEmitcdadaptation != src.myEmitcdadaptation) return false;
154  if (myEmitcdburn != src.myEmitcdburn) return false;
155  if (myEnablescatter != src.myEnablescatter) return false;
156  if (myExtinctionratio != src.myExtinctionratio) return false;
157  if (myScatteringiter != src.myScatteringiter) return false;
158  if (myEmitcdrangeoverride != src.myEmitcdrangeoverride) return false;
159  if (myEmitcdrange != src.myEmitcdrange) return false;
160 
161  return true;
162  }
164  {
165  return !operator==(src);
166  }
172 
173 
174 
175  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
176  {
177  myVisMode = 1;
178  if (true)
179  graph->evalOpParm(myVisMode, nodeidx, "vismode", time, 0);
180  myRangemin = 0;
181  if (true)
182  graph->evalOpParm(myRangemin, nodeidx, "rangemin", time, 0);
183  myRangemax = 1;
184  if (true)
185  graph->evalOpParm(myRangemax, nodeidx, "rangemax", time, 0);
186  myDensityscale = 1;
187  if (true)
188  graph->evalOpParm(myDensityscale, nodeidx, "densityscale", time, 0);
189  myShadowscale = 1;
190  if (true)
191  graph->evalOpParm(myShadowscale, nodeidx, "shadowscale", time, 0);
192  mySetambientshadows = false;
193  if (true)
194  graph->evalOpParm(mySetambientshadows, nodeidx, "setambientshadows", time, 0);
195  myAmbientshadows = 1;
196  if (true && ( (true&&!(((getSetambientshadows()==0)))) ) )
197  graph->evalOpParm(myAmbientshadows, nodeidx, "ambientshadows", time, 0);
198  mySetshadowcolor = false;
199  if (true)
200  graph->evalOpParm(mySetshadowcolor, nodeidx, "setshadowcolor", time, 0);
201  myShadowcolor = UT_Vector3D(1,1,1);
202  if (true && ( (true&&!(((getSetshadowcolor()==0)))) ) )
203  graph->evalOpParm(myShadowcolor, nodeidx, "shadowcolor", time, 0);
204  mySetmaxres = false;
205  if (true)
206  graph->evalOpParm(mySetmaxres, nodeidx, "setmaxres", time, 0);
207  myMaxres = 128;
208  if (true && ( (true&&!(((getSetmaxres()==0)))) ) )
209  graph->evalOpParm(myMaxres, nodeidx, "maxres", time, 0);
210  myDensityfield = "density"_sh;
211  if (true)
212  graph->evalOpParm(myDensityfield, nodeidx, "densityfield", time, 0);
213  myDensityrampmode = 1;
214  if (true)
215  graph->evalOpParm(myDensityrampmode, nodeidx, "densityrampmode", time, 0);
216  myDensityramp = UT_SharedPtr<UT_Ramp>(0);
217  if (true && ( (true&&!(((int64(getDensityrampmode())==0)))) ) )
218  graph->evalOpParm(myDensityramp, nodeidx, "densityramp", time, 0);
219  myCdfield = ""_sh;
220  if (true)
221  graph->evalOpParm(myCdfield, nodeidx, "cdfield", time, 0);
222  myCdrangeoverride = false;
223  if (true)
224  graph->evalOpParm(myCdrangeoverride, nodeidx, "cdrangeoverride", time, 0);
225  myCdrange = UT_Vector2D(0,1);
226  if (true && ( (true&&!(((getCdrangeoverride()==0)))) ) )
227  graph->evalOpParm(myCdrange, nodeidx, "cdrange", time, 0);
228  myCdrampmode = 1;
229  if (true)
230  graph->evalOpParm(myCdrampmode, nodeidx, "cdrampmode", time, 0);
231  myCdramp = UT_SharedPtr<UT_Ramp>(0);
232  if (true && ( (true&&!(((int64(getCdrampmode())==0)))) ) )
233  graph->evalOpParm(myCdramp, nodeidx, "cdramp", time, 0);
234  myEmitscale = 0;
235  if (true)
236  graph->evalOpParm(myEmitscale, nodeidx, "emitscale", time, 0);
237  myEmitfield = ""_sh;
238  if (true)
239  graph->evalOpParm(myEmitfield, nodeidx, "emitfield", time, 0);
240  myEmitrangeoverride = false;
241  if (true)
242  graph->evalOpParm(myEmitrangeoverride, nodeidx, "emitrangeoverride", time, 0);
243  myEmitrange = UT_Vector2D(0,1);
244  if (true && ( (true&&!(((getEmitrangeoverride()==0)))) ) )
245  graph->evalOpParm(myEmitrange, nodeidx, "emitrange", time, 0);
246  myEmitrampmode = 1;
247  if (true)
248  graph->evalOpParm(myEmitrampmode, nodeidx, "emitrampmode", time, 0);
249  myEmitramp = UT_SharedPtr<UT_Ramp>(0);
250  if (true && ( (true&&!(((int64(getEmitrampmode())==0)))) ) )
251  graph->evalOpParm(myEmitramp, nodeidx, "emitramp", time, 0);
252  myEmitcdfield = ""_sh;
253  if (true)
254  graph->evalOpParm(myEmitcdfield, nodeidx, "emitcdfield", time, 0);
255  myEmitcdrampmode = 1;
256  if (true)
257  graph->evalOpParm(myEmitcdrampmode, nodeidx, "emitcdrampmode", time, 0);
258  myEmitcdramp = UT_SharedPtr<UT_Ramp>(0);
259  if (true && ( (true&&!(((int64(getEmitcdrampmode())==0))||((int64(getEmitcdrampmode())==3))||((int64(getEmitcdrampmode())==4)))) ) )
260  graph->evalOpParm(myEmitcdramp, nodeidx, "emitcdramp", time, 0);
261  myEmitcdfieldscale = 1;
262  if (true && ( (true&&!(((int64(getEmitcdrampmode())!=3)&&(int64(getEmitcdrampmode())!=4)))) ) )
263  graph->evalOpParm(myEmitcdfieldscale, nodeidx, "emitcdfieldscale", time, 0);
264  myEmitcdtemperature0 = 0;
265  if (true && ( (true&&!(((int64(getEmitcdrampmode())!=3)&&(int64(getEmitcdrampmode())!=4)))) ) )
266  graph->evalOpParm(myEmitcdtemperature0, nodeidx, "emitcdtemperature0", time, 0);
267  myEmitcdtemperature = 5000;
268  if (true && ( (true&&!(((int64(getEmitcdrampmode())!=3)&&(int64(getEmitcdrampmode())!=4)))) ) )
269  graph->evalOpParm(myEmitcdtemperature, nodeidx, "emitcdtemperature", time, 0);
270  myEmitcdtonemap = true;
271  if (true && ( (true&&!(((int64(getEmitcdrampmode())!=3)))) ) )
272  graph->evalOpParm(myEmitcdtonemap, nodeidx, "emitcdtonemap", time, 0);
273  myEmitcdadaptation = 0.15;
274  if (true && ( (true&&!(((int64(getEmitcdrampmode())!=3))||((getEmitcdtonemap()==0)))) ) )
275  graph->evalOpParm(myEmitcdadaptation, nodeidx, "emitcdadaptation", time, 0);
276  myEmitcdburn = 0;
277  if (true && ( (true&&!(((int64(getEmitcdrampmode())!=3))||((getEmitcdtonemap()==0)))) ) )
278  graph->evalOpParm(myEmitcdburn, nodeidx, "emitcdburn", time, 0);
279  myEnablescatter = false;
280  if (true)
281  graph->evalOpParm(myEnablescatter, nodeidx, "enablescatter", time, 0);
282  myExtinctionratio = 1;
283  if (true && ( (true&&!(((getEnablescatter()==0)))) ) )
284  graph->evalOpParm(myExtinctionratio, nodeidx, "extinctionratio", time, 0);
285  myScatteringiter = 25;
286  if (true && ( (true&&!(((getEnablescatter()==0)))) ) )
287  graph->evalOpParm(myScatteringiter, nodeidx, "scatteringiter", time, 0);
288  myEmitcdrangeoverride = false;
289  if (true && ( (true&&!(((int64(getEmitcdrampmode())==3))||((int64(getEmitcdrampmode())==4)))) ) )
290  graph->evalOpParm(myEmitcdrangeoverride, nodeidx, "emitcdrangeoverride", time, 0);
291  myEmitcdrange = UT_Vector2D(0,1);
292  if (true && ( (true&&!(((getEmitcdrangeoverride()==0))||((int64(getEmitcdrampmode())==3))||((int64(getEmitcdrampmode())==4)))) ) )
293  graph->evalOpParm(myEmitcdrange, nodeidx, "emitcdrange", time, 0);
294 
295  }
296 
297 
298  void loadFromOpSubclass(const LoadParms &loadparms) override
299  {
300  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
301  }
302 
303 
304  void copyFrom(const SOP_NodeParms *src) override
305  {
306  *this = *((const SOP_VolumeVisualizationParms *)src);
307  }
308 
309  template <typename T>
310  void
311  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
312  {
313  if (idx.size() < 1)
314  return;
315  UT_ASSERT(idx.size() == instance.size()+1);
316  if (idx.size() != instance.size()+1)
317  return;
318  switch (idx[0])
319  {
320  case 0:
321  coerceValue(value, myVisMode);
322  break;
323  case 1:
324  coerceValue(value, myRangemin);
325  break;
326  case 2:
327  coerceValue(value, myRangemax);
328  break;
329  case 3:
330  coerceValue(value, myDensityscale);
331  break;
332  case 4:
333  coerceValue(value, myShadowscale);
334  break;
335  case 5:
336  coerceValue(value, mySetambientshadows);
337  break;
338  case 6:
339  coerceValue(value, myAmbientshadows);
340  break;
341  case 7:
342  coerceValue(value, mySetshadowcolor);
343  break;
344  case 8:
345  coerceValue(value, myShadowcolor);
346  break;
347  case 9:
348  coerceValue(value, mySetmaxres);
349  break;
350  case 10:
351  coerceValue(value, myMaxres);
352  break;
353  case 11:
354  coerceValue(value, myDensityfield);
355  break;
356  case 12:
357  coerceValue(value, myDensityrampmode);
358  break;
359  case 13:
360  coerceValue(value, myDensityramp);
361  break;
362  case 14:
363  coerceValue(value, myCdfield);
364  break;
365  case 15:
366  coerceValue(value, myCdrangeoverride);
367  break;
368  case 16:
369  coerceValue(value, myCdrange);
370  break;
371  case 17:
372  coerceValue(value, myCdrampmode);
373  break;
374  case 18:
375  coerceValue(value, myCdramp);
376  break;
377  case 19:
378  coerceValue(value, myEmitscale);
379  break;
380  case 20:
381  coerceValue(value, myEmitfield);
382  break;
383  case 21:
384  coerceValue(value, myEmitrangeoverride);
385  break;
386  case 22:
387  coerceValue(value, myEmitrange);
388  break;
389  case 23:
390  coerceValue(value, myEmitrampmode);
391  break;
392  case 24:
393  coerceValue(value, myEmitramp);
394  break;
395  case 25:
396  coerceValue(value, myEmitcdfield);
397  break;
398  case 26:
399  coerceValue(value, myEmitcdrampmode);
400  break;
401  case 27:
402  coerceValue(value, myEmitcdramp);
403  break;
404  case 28:
405  coerceValue(value, myEmitcdfieldscale);
406  break;
407  case 29:
408  coerceValue(value, myEmitcdtemperature0);
409  break;
410  case 30:
411  coerceValue(value, myEmitcdtemperature);
412  break;
413  case 31:
414  coerceValue(value, myEmitcdtonemap);
415  break;
416  case 32:
417  coerceValue(value, myEmitcdadaptation);
418  break;
419  case 33:
420  coerceValue(value, myEmitcdburn);
421  break;
422  case 34:
423  coerceValue(value, myEnablescatter);
424  break;
425  case 35:
426  coerceValue(value, myExtinctionratio);
427  break;
428  case 36:
429  coerceValue(value, myScatteringiter);
430  break;
431  case 37:
432  coerceValue(value, myEmitcdrangeoverride);
433  break;
434  case 38:
435  coerceValue(value, myEmitcdrange);
436  break;
437 
438  }
439  }
440 
441  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
442  { doGetParmValue(idx, instance, value); }
443  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
444  { doGetParmValue(idx, instance, value); }
445  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
446  { doGetParmValue(idx, instance, value); }
447  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
448  { doGetParmValue(idx, instance, value); }
449  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
450  { doGetParmValue(idx, instance, value); }
451  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
452  { doGetParmValue(idx, instance, value); }
453  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
454  { doGetParmValue(idx, instance, value); }
455  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
456  { doGetParmValue(idx, instance, value); }
457  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
458  { doGetParmValue(idx, instance, value); }
459  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
460  { doGetParmValue(idx, instance, value); }
461  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
462  { doGetParmValue(idx, instance, value); }
463 
464  template <typename T>
465  void
466  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
467  {
468  if (idx.size() < 1)
469  return;
470  UT_ASSERT(idx.size() == instance.size()+1);
471  if (idx.size() != instance.size()+1)
472  return;
473  switch (idx[0])
474  {
475  case 0:
476  coerceValue(myVisMode, clampMinValue(0, clampMaxValue(2, value ) ));
477  break;
478  case 1:
479  coerceValue(myRangemin, ( ( value ) ));
480  break;
481  case 2:
482  coerceValue(myRangemax, ( ( value ) ));
483  break;
484  case 3:
485  coerceValue(myDensityscale, clampMinValue(0, ( value ) ));
486  break;
487  case 4:
488  coerceValue(myShadowscale, clampMinValue(0, ( value ) ));
489  break;
490  case 5:
491  coerceValue(mySetambientshadows, ( ( value ) ));
492  break;
493  case 6:
494  coerceValue(myAmbientshadows, clampMinValue(0, ( value ) ));
495  break;
496  case 7:
497  coerceValue(mySetshadowcolor, ( ( value ) ));
498  break;
499  case 8:
500  coerceValue(myShadowcolor, clampMinValue(0, clampMaxValue(1, value ) ));
501  break;
502  case 9:
503  coerceValue(mySetmaxres, ( ( value ) ));
504  break;
505  case 10:
506  coerceValue(myMaxres, clampMinValue(1, ( value ) ));
507  break;
508  case 11:
509  coerceValue(myDensityfield, ( ( value ) ));
510  break;
511  case 12:
512  coerceValue(myDensityrampmode, clampMinValue(0, clampMaxValue(2, value ) ));
513  break;
514  case 13:
515  coerceValue(myDensityramp, clampMinValue(1, ( value ) ));
516  break;
517  case 14:
518  coerceValue(myCdfield, ( ( value ) ));
519  break;
520  case 15:
521  coerceValue(myCdrangeoverride, ( ( value ) ));
522  break;
523  case 16:
524  coerceValue(myCdrange, ( ( value ) ));
525  break;
526  case 17:
527  coerceValue(myCdrampmode, clampMinValue(0, clampMaxValue(2, value ) ));
528  break;
529  case 18:
530  coerceValue(myCdramp, clampMinValue(1, ( value ) ));
531  break;
532  case 19:
533  coerceValue(myEmitscale, clampMinValue(0, ( value ) ));
534  break;
535  case 20:
536  coerceValue(myEmitfield, ( ( value ) ));
537  break;
538  case 21:
539  coerceValue(myEmitrangeoverride, ( ( value ) ));
540  break;
541  case 22:
542  coerceValue(myEmitrange, ( ( value ) ));
543  break;
544  case 23:
545  coerceValue(myEmitrampmode, clampMinValue(0, clampMaxValue(2, value ) ));
546  break;
547  case 24:
548  coerceValue(myEmitramp, clampMinValue(1, ( value ) ));
549  break;
550  case 25:
551  coerceValue(myEmitcdfield, ( ( value ) ));
552  break;
553  case 26:
554  coerceValue(myEmitcdrampmode, clampMinValue(0, clampMaxValue(4, value ) ));
555  break;
556  case 27:
557  coerceValue(myEmitcdramp, clampMinValue(1, ( value ) ));
558  break;
559  case 28:
560  coerceValue(myEmitcdfieldscale, ( ( value ) ));
561  break;
562  case 29:
563  coerceValue(myEmitcdtemperature0, clampMinValue(0, ( value ) ));
564  break;
565  case 30:
566  coerceValue(myEmitcdtemperature, clampMinValue(350, ( value ) ));
567  break;
568  case 31:
569  coerceValue(myEmitcdtonemap, ( ( value ) ));
570  break;
571  case 32:
572  coerceValue(myEmitcdadaptation, clampMinValue(0, ( value ) ));
573  break;
574  case 33:
575  coerceValue(myEmitcdburn, ( ( value ) ));
576  break;
577  case 34:
578  coerceValue(myEnablescatter, ( ( value ) ));
579  break;
580  case 35:
581  coerceValue(myExtinctionratio, clampMinValue(0, clampMaxValue(1, value ) ));
582  break;
583  case 36:
584  coerceValue(myScatteringiter, clampMinValue(1, ( value ) ));
585  break;
586  case 37:
587  coerceValue(myEmitcdrangeoverride, ( ( value ) ));
588  break;
589  case 38:
590  coerceValue(myEmitcdrange, ( ( value ) ));
591  break;
592 
593  }
594  }
595 
596  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
597  { doSetParmValue(idx, instance, value); }
598  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
599  { doSetParmValue(idx, instance, value); }
600  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
601  { doSetParmValue(idx, instance, value); }
602  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
603  { doSetParmValue(idx, instance, value); }
604  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
605  { doSetParmValue(idx, instance, value); }
606  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
607  { doSetParmValue(idx, instance, value); }
608  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
609  { doSetParmValue(idx, instance, value); }
610  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
611  { doSetParmValue(idx, instance, value); }
612  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
613  { doSetParmValue(idx, instance, value); }
614  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
615  { doSetParmValue(idx, instance, value); }
616  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
617  { doSetParmValue(idx, instance, value); }
618 
619  exint getNestNumParms(TempIndex idx) const override
620  {
621  if (idx.size() == 0)
622  return 39;
623  switch (idx[0])
624  {
625 
626  }
627  // Invalid
628  return 0;
629  }
630 
631  const char *getNestParmName(TempIndex fieldnum) const override
632  {
633  if (fieldnum.size() < 1)
634  return 0;
635  switch (fieldnum[0])
636  {
637  case 0:
638  return "vismode";
639  case 1:
640  return "rangemin";
641  case 2:
642  return "rangemax";
643  case 3:
644  return "densityscale";
645  case 4:
646  return "shadowscale";
647  case 5:
648  return "setambientshadows";
649  case 6:
650  return "ambientshadows";
651  case 7:
652  return "setshadowcolor";
653  case 8:
654  return "shadowcolor";
655  case 9:
656  return "setmaxres";
657  case 10:
658  return "maxres";
659  case 11:
660  return "densityfield";
661  case 12:
662  return "densityrampmode";
663  case 13:
664  return "densityramp";
665  case 14:
666  return "cdfield";
667  case 15:
668  return "cdrangeoverride";
669  case 16:
670  return "cdrange";
671  case 17:
672  return "cdrampmode";
673  case 18:
674  return "cdramp";
675  case 19:
676  return "emitscale";
677  case 20:
678  return "emitfield";
679  case 21:
680  return "emitrangeoverride";
681  case 22:
682  return "emitrange";
683  case 23:
684  return "emitrampmode";
685  case 24:
686  return "emitramp";
687  case 25:
688  return "emitcdfield";
689  case 26:
690  return "emitcdrampmode";
691  case 27:
692  return "emitcdramp";
693  case 28:
694  return "emitcdfieldscale";
695  case 29:
696  return "emitcdtemperature0";
697  case 30:
698  return "emitcdtemperature";
699  case 31:
700  return "emitcdtonemap";
701  case 32:
702  return "emitcdadaptation";
703  case 33:
704  return "emitcdburn";
705  case 34:
706  return "enablescatter";
707  case 35:
708  return "extinctionratio";
709  case 36:
710  return "scatteringiter";
711  case 37:
712  return "emitcdrangeoverride";
713  case 38:
714  return "emitcdrange";
715 
716  }
717  return 0;
718  }
719 
720  ParmType getNestParmType(TempIndex fieldnum) const override
721  {
722  if (fieldnum.size() < 1)
723  return PARM_UNSUPPORTED;
724  switch (fieldnum[0])
725  {
726  case 0:
727  return PARM_INTEGER;
728  case 1:
729  return PARM_FLOAT;
730  case 2:
731  return PARM_FLOAT;
732  case 3:
733  return PARM_FLOAT;
734  case 4:
735  return PARM_FLOAT;
736  case 5:
737  return PARM_INTEGER;
738  case 6:
739  return PARM_FLOAT;
740  case 7:
741  return PARM_INTEGER;
742  case 8:
743  return PARM_VECTOR3;
744  case 9:
745  return PARM_INTEGER;
746  case 10:
747  return PARM_INTEGER;
748  case 11:
749  return PARM_STRING;
750  case 12:
751  return PARM_INTEGER;
752  case 13:
753  return PARM_RAMP;
754  case 14:
755  return PARM_STRING;
756  case 15:
757  return PARM_INTEGER;
758  case 16:
759  return PARM_VECTOR2;
760  case 17:
761  return PARM_INTEGER;
762  case 18:
763  return PARM_RAMP;
764  case 19:
765  return PARM_FLOAT;
766  case 20:
767  return PARM_STRING;
768  case 21:
769  return PARM_INTEGER;
770  case 22:
771  return PARM_VECTOR2;
772  case 23:
773  return PARM_INTEGER;
774  case 24:
775  return PARM_RAMP;
776  case 25:
777  return PARM_STRING;
778  case 26:
779  return PARM_INTEGER;
780  case 27:
781  return PARM_RAMP;
782  case 28:
783  return PARM_FLOAT;
784  case 29:
785  return PARM_FLOAT;
786  case 30:
787  return PARM_FLOAT;
788  case 31:
789  return PARM_INTEGER;
790  case 32:
791  return PARM_FLOAT;
792  case 33:
793  return PARM_FLOAT;
794  case 34:
795  return PARM_INTEGER;
796  case 35:
797  return PARM_FLOAT;
798  case 36:
799  return PARM_INTEGER;
800  case 37:
801  return PARM_INTEGER;
802  case 38:
803  return PARM_VECTOR2;
804 
805  }
806  return PARM_UNSUPPORTED;
807  }
808 
809  // Boiler plate to load individual types.
810  static void loadData(UT_IStream &is, int64 &v)
811  { is.bread(&v, 1); }
812  static void loadData(UT_IStream &is, bool &v)
813  { int64 iv; is.bread(&iv, 1); v = iv; }
814  static void loadData(UT_IStream &is, fpreal64 &v)
815  { is.bread<fpreal64>(&v, 1); }
816  static void loadData(UT_IStream &is, UT_Vector2D &v)
817  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
818  static void loadData(UT_IStream &is, UT_Vector3D &v)
819  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
820  is.bread<fpreal64>(&v.z(), 1); }
821  static void loadData(UT_IStream &is, UT_Vector4D &v)
822  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
823  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
824  static void loadData(UT_IStream &is, UT_Matrix2D &v)
825  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
826  static void loadData(UT_IStream &is, UT_Matrix3D &v)
827  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
828  static void loadData(UT_IStream &is, UT_Matrix4D &v)
829  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
830  static void loadData(UT_IStream &is, UT_Vector2I &v)
831  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
832  static void loadData(UT_IStream &is, UT_Vector3I &v)
833  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
834  is.bread<int64>(&v.z(), 1); }
835  static void loadData(UT_IStream &is, UT_Vector4I &v)
836  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
837  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
839  { is.bread(v); }
841  { UT_StringHolder rampdata;
842  loadData(is, rampdata);
843  if (rampdata.isstring())
844  {
845  v.reset(new UT_Ramp());
846  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
847  v->load(istr);
848  }
849  else v.reset();
850  }
853  loadData(is, data);
854  if (data.isstring())
855  {
856  // Find the data type.
857  const char *colon = UT_StringWrap(data).findChar(':');
858  if (colon)
859  {
860  int typelen = colon - data.buffer();
862  type.strncpy(data.buffer(), typelen);
863  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
864 
865  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
866  }
867  }
868  else v.reset();
869  }
870 
871  static void saveData(std::ostream &os, int64 v)
872  { UTwrite(os, &v); }
873  static void saveData(std::ostream &os, bool v)
874  { int64 iv = v; UTwrite(os, &iv); }
875  static void saveData(std::ostream &os, fpreal64 v)
876  { UTwrite<fpreal64>(os, &v); }
877  static void saveData(std::ostream &os, UT_Vector2D v)
878  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
879  static void saveData(std::ostream &os, UT_Vector3D v)
880  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
881  UTwrite<fpreal64>(os, &v.z()); }
882  static void saveData(std::ostream &os, UT_Vector4D v)
883  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
884  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
885  static void saveData(std::ostream &os, UT_Matrix2D v)
887  static void saveData(std::ostream &os, UT_Matrix3D v)
889  static void saveData(std::ostream &os, UT_Matrix4D v)
891  static void saveData(std::ostream &os, UT_StringHolder s)
892  { UT_StringWrap(s).saveBinary(os); }
893  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
895  UT_OStringStream ostr;
896  if (s) s->save(ostr);
897  result = ostr.str();
898  saveData(os, result);
899  }
900  static void saveData(std::ostream &os, PRM_DataItemHandle s)
902  UT_OStringStream ostr;
903  if (s)
904  {
905  ostr << s->getDataTypeToken();
906  ostr << ":";
907  s->saveBinary(ostr);
908  }
909  result = ostr.str();
910  saveData(os, result);
911  }
912 
913 
914  void save(std::ostream &os) const
915  {
916  int32 v = version();
917  UTwrite(os, &v);
918  saveData(os, myVisMode);
919  saveData(os, myRangemin);
920  saveData(os, myRangemax);
921  saveData(os, myDensityscale);
922  saveData(os, myShadowscale);
923  saveData(os, mySetambientshadows);
924  saveData(os, myAmbientshadows);
925  saveData(os, mySetshadowcolor);
926  saveData(os, myShadowcolor);
927  saveData(os, mySetmaxres);
928  saveData(os, myMaxres);
929  saveData(os, myDensityfield);
930  saveData(os, myDensityrampmode);
931  saveData(os, myDensityramp);
932  saveData(os, myCdfield);
933  saveData(os, myCdrangeoverride);
934  saveData(os, myCdrange);
935  saveData(os, myCdrampmode);
936  saveData(os, myCdramp);
937  saveData(os, myEmitscale);
938  saveData(os, myEmitfield);
939  saveData(os, myEmitrangeoverride);
940  saveData(os, myEmitrange);
941  saveData(os, myEmitrampmode);
942  saveData(os, myEmitramp);
943  saveData(os, myEmitcdfield);
944  saveData(os, myEmitcdrampmode);
945  saveData(os, myEmitcdramp);
946  saveData(os, myEmitcdfieldscale);
947  saveData(os, myEmitcdtemperature0);
948  saveData(os, myEmitcdtemperature);
949  saveData(os, myEmitcdtonemap);
950  saveData(os, myEmitcdadaptation);
951  saveData(os, myEmitcdburn);
952  saveData(os, myEnablescatter);
953  saveData(os, myExtinctionratio);
954  saveData(os, myScatteringiter);
955  saveData(os, myEmitcdrangeoverride);
956  saveData(os, myEmitcdrange);
957 
958  }
959 
960  bool load(UT_IStream &is)
961  {
962  int32 v;
963  is.bread(&v, 1);
964  if (version() != v)
965  {
966  // Fail incompatible versions
967  return false;
968  }
969  loadData(is, myVisMode);
970  loadData(is, myRangemin);
971  loadData(is, myRangemax);
972  loadData(is, myDensityscale);
973  loadData(is, myShadowscale);
974  loadData(is, mySetambientshadows);
975  loadData(is, myAmbientshadows);
976  loadData(is, mySetshadowcolor);
977  loadData(is, myShadowcolor);
978  loadData(is, mySetmaxres);
979  loadData(is, myMaxres);
980  loadData(is, myDensityfield);
981  loadData(is, myDensityrampmode);
982  loadData(is, myDensityramp);
983  loadData(is, myCdfield);
984  loadData(is, myCdrangeoverride);
985  loadData(is, myCdrange);
986  loadData(is, myCdrampmode);
987  loadData(is, myCdramp);
988  loadData(is, myEmitscale);
989  loadData(is, myEmitfield);
990  loadData(is, myEmitrangeoverride);
991  loadData(is, myEmitrange);
992  loadData(is, myEmitrampmode);
993  loadData(is, myEmitramp);
994  loadData(is, myEmitcdfield);
995  loadData(is, myEmitcdrampmode);
996  loadData(is, myEmitcdramp);
997  loadData(is, myEmitcdfieldscale);
998  loadData(is, myEmitcdtemperature0);
999  loadData(is, myEmitcdtemperature);
1000  loadData(is, myEmitcdtonemap);
1001  loadData(is, myEmitcdadaptation);
1002  loadData(is, myEmitcdburn);
1003  loadData(is, myEnablescatter);
1004  loadData(is, myExtinctionratio);
1005  loadData(is, myScatteringiter);
1006  loadData(is, myEmitcdrangeoverride);
1007  loadData(is, myEmitcdrange);
1008 
1009  return true;
1010  }
1011 
1012  VisMode getVisMode() const { return VisMode(myVisMode); }
1013  void setVisMode(VisMode val) { myVisMode = int64(val); }
1015  {
1016  SOP_Node *thissop = cookparms.getNode();
1017  if (!thissop) return getVisMode();
1018  int64 result;
1019  OP_Utils::evalOpParm(result, thissop, "vismode", cookparms.getCookTime(), 0);
1020  return VisMode(result);
1021  }
1022  fpreal64 getRangemin() const { return myRangemin; }
1023  void setRangemin(fpreal64 val) { myRangemin = val; }
1025  {
1026  SOP_Node *thissop = cookparms.getNode();
1027  if (!thissop) return getRangemin();
1028  fpreal64 result;
1029  OP_Utils::evalOpParm(result, thissop, "rangemin", cookparms.getCookTime(), 0);
1030  return result;
1031  }
1032  fpreal64 getRangemax() const { return myRangemax; }
1033  void setRangemax(fpreal64 val) { myRangemax = val; }
1035  {
1036  SOP_Node *thissop = cookparms.getNode();
1037  if (!thissop) return getRangemax();
1038  fpreal64 result;
1039  OP_Utils::evalOpParm(result, thissop, "rangemax", cookparms.getCookTime(), 0);
1040  return result;
1041  }
1042  fpreal64 getDensityscale() const { return myDensityscale; }
1043  void setDensityscale(fpreal64 val) { myDensityscale = val; }
1045  {
1046  SOP_Node *thissop = cookparms.getNode();
1047  if (!thissop) return getDensityscale();
1048  fpreal64 result;
1049  OP_Utils::evalOpParm(result, thissop, "densityscale", cookparms.getCookTime(), 0);
1050  return result;
1051  }
1052  fpreal64 getShadowscale() const { return myShadowscale; }
1053  void setShadowscale(fpreal64 val) { myShadowscale = val; }
1055  {
1056  SOP_Node *thissop = cookparms.getNode();
1057  if (!thissop) return getShadowscale();
1058  fpreal64 result;
1059  OP_Utils::evalOpParm(result, thissop, "shadowscale", cookparms.getCookTime(), 0);
1060  return result;
1061  }
1062  bool getSetambientshadows() const { return mySetambientshadows; }
1063  void setSetambientshadows(bool val) { mySetambientshadows = val; }
1064  bool opSetambientshadows(const SOP_NodeVerb::CookParms &cookparms) const
1065  {
1066  SOP_Node *thissop = cookparms.getNode();
1067  if (!thissop) return getSetambientshadows();
1068  bool result;
1069  OP_Utils::evalOpParm(result, thissop, "setambientshadows", cookparms.getCookTime(), 0);
1070  return result;
1071  }
1072  fpreal64 getAmbientshadows() const { return myAmbientshadows; }
1073  void setAmbientshadows(fpreal64 val) { myAmbientshadows = val; }
1075  {
1076  SOP_Node *thissop = cookparms.getNode();
1077  if (!thissop) return getAmbientshadows();
1078  fpreal64 result;
1079  OP_Utils::evalOpParm(result, thissop, "ambientshadows", cookparms.getCookTime(), 0);
1080  return result;
1081  }
1082  bool getSetshadowcolor() const { return mySetshadowcolor; }
1083  void setSetshadowcolor(bool val) { mySetshadowcolor = val; }
1084  bool opSetshadowcolor(const SOP_NodeVerb::CookParms &cookparms) const
1085  {
1086  SOP_Node *thissop = cookparms.getNode();
1087  if (!thissop) return getSetshadowcolor();
1088  bool result;
1089  OP_Utils::evalOpParm(result, thissop, "setshadowcolor", cookparms.getCookTime(), 0);
1090  return result;
1091  }
1092  UT_Vector3D getShadowcolor() const { return myShadowcolor; }
1093  void setShadowcolor(UT_Vector3D val) { myShadowcolor = val; }
1095  {
1096  SOP_Node *thissop = cookparms.getNode();
1097  if (!thissop) return getShadowcolor();
1099  OP_Utils::evalOpParm(result, thissop, "shadowcolor", cookparms.getCookTime(), 0);
1100  return result;
1101  }
1102  bool getSetmaxres() const { return mySetmaxres; }
1103  void setSetmaxres(bool val) { mySetmaxres = val; }
1104  bool opSetmaxres(const SOP_NodeVerb::CookParms &cookparms) const
1105  {
1106  SOP_Node *thissop = cookparms.getNode();
1107  if (!thissop) return getSetmaxres();
1108  bool result;
1109  OP_Utils::evalOpParm(result, thissop, "setmaxres", cookparms.getCookTime(), 0);
1110  return result;
1111  }
1112  int64 getMaxres() const { return myMaxres; }
1113  void setMaxres(int64 val) { myMaxres = val; }
1114  int64 opMaxres(const SOP_NodeVerb::CookParms &cookparms) const
1115  {
1116  SOP_Node *thissop = cookparms.getNode();
1117  if (!thissop) return getMaxres();
1118  int64 result;
1119  OP_Utils::evalOpParm(result, thissop, "maxres", cookparms.getCookTime(), 0);
1120  return result;
1121  }
1122  const UT_StringHolder & getDensityfield() const { return myDensityfield; }
1123  void setDensityfield(const UT_StringHolder & val) { myDensityfield = val; }
1125  {
1126  SOP_Node *thissop = cookparms.getNode();
1127  if (!thissop) return getDensityfield();
1129  OP_Utils::evalOpParm(result, thissop, "densityfield", cookparms.getCookTime(), 0);
1130  return result;
1131  }
1132  Densityrampmode getDensityrampmode() const { return Densityrampmode(myDensityrampmode); }
1133  void setDensityrampmode(Densityrampmode val) { myDensityrampmode = int64(val); }
1135  {
1136  SOP_Node *thissop = cookparms.getNode();
1137  if (!thissop) return getDensityrampmode();
1138  int64 result;
1139  OP_Utils::evalOpParm(result, thissop, "densityrampmode", cookparms.getCookTime(), 0);
1140  return Densityrampmode(result);
1141  }
1142  UT_SharedPtr<UT_Ramp> getDensityramp() const { return myDensityramp; }
1143  void setDensityramp(UT_SharedPtr<UT_Ramp> val) { myDensityramp = val; }
1145  {
1146  SOP_Node *thissop = cookparms.getNode();
1147  if (!thissop) return getDensityramp();
1149  OP_Utils::evalOpParm(result, thissop, "densityramp", cookparms.getCookTime(), 0);
1150  return result;
1151  }
1152  const UT_StringHolder & getCdfield() const { return myCdfield; }
1153  void setCdfield(const UT_StringHolder & val) { myCdfield = val; }
1155  {
1156  SOP_Node *thissop = cookparms.getNode();
1157  if (!thissop) return getCdfield();
1159  OP_Utils::evalOpParm(result, thissop, "cdfield", cookparms.getCookTime(), 0);
1160  return result;
1161  }
1162  bool getCdrangeoverride() const { return myCdrangeoverride; }
1163  void setCdrangeoverride(bool val) { myCdrangeoverride = val; }
1164  bool opCdrangeoverride(const SOP_NodeVerb::CookParms &cookparms) const
1165  {
1166  SOP_Node *thissop = cookparms.getNode();
1167  if (!thissop) return getCdrangeoverride();
1168  bool result;
1169  OP_Utils::evalOpParm(result, thissop, "cdrangeoverride", cookparms.getCookTime(), 0);
1170  return result;
1171  }
1172  UT_Vector2D getCdrange() const { return myCdrange; }
1173  void setCdrange(UT_Vector2D val) { myCdrange = val; }
1175  {
1176  SOP_Node *thissop = cookparms.getNode();
1177  if (!thissop) return getCdrange();
1179  OP_Utils::evalOpParm(result, thissop, "cdrange", cookparms.getCookTime(), 0);
1180  return result;
1181  }
1182  Cdrampmode getCdrampmode() const { return Cdrampmode(myCdrampmode); }
1183  void setCdrampmode(Cdrampmode val) { myCdrampmode = int64(val); }
1185  {
1186  SOP_Node *thissop = cookparms.getNode();
1187  if (!thissop) return getCdrampmode();
1188  int64 result;
1189  OP_Utils::evalOpParm(result, thissop, "cdrampmode", cookparms.getCookTime(), 0);
1190  return Cdrampmode(result);
1191  }
1192  UT_SharedPtr<UT_Ramp> getCdramp() const { return myCdramp; }
1193  void setCdramp(UT_SharedPtr<UT_Ramp> val) { myCdramp = val; }
1195  {
1196  SOP_Node *thissop = cookparms.getNode();
1197  if (!thissop) return getCdramp();
1199  OP_Utils::evalOpParm(result, thissop, "cdramp", cookparms.getCookTime(), 0);
1200  return result;
1201  }
1202  fpreal64 getEmitscale() const { return myEmitscale; }
1203  void setEmitscale(fpreal64 val) { myEmitscale = val; }
1205  {
1206  SOP_Node *thissop = cookparms.getNode();
1207  if (!thissop) return getEmitscale();
1208  fpreal64 result;
1209  OP_Utils::evalOpParm(result, thissop, "emitscale", cookparms.getCookTime(), 0);
1210  return result;
1211  }
1212  const UT_StringHolder & getEmitfield() const { return myEmitfield; }
1213  void setEmitfield(const UT_StringHolder & val) { myEmitfield = val; }
1215  {
1216  SOP_Node *thissop = cookparms.getNode();
1217  if (!thissop) return getEmitfield();
1219  OP_Utils::evalOpParm(result, thissop, "emitfield", cookparms.getCookTime(), 0);
1220  return result;
1221  }
1222  bool getEmitrangeoverride() const { return myEmitrangeoverride; }
1223  void setEmitrangeoverride(bool val) { myEmitrangeoverride = val; }
1224  bool opEmitrangeoverride(const SOP_NodeVerb::CookParms &cookparms) const
1225  {
1226  SOP_Node *thissop = cookparms.getNode();
1227  if (!thissop) return getEmitrangeoverride();
1228  bool result;
1229  OP_Utils::evalOpParm(result, thissop, "emitrangeoverride", cookparms.getCookTime(), 0);
1230  return result;
1231  }
1232  UT_Vector2D getEmitrange() const { return myEmitrange; }
1233  void setEmitrange(UT_Vector2D val) { myEmitrange = val; }
1235  {
1236  SOP_Node *thissop = cookparms.getNode();
1237  if (!thissop) return getEmitrange();
1239  OP_Utils::evalOpParm(result, thissop, "emitrange", cookparms.getCookTime(), 0);
1240  return result;
1241  }
1242  Emitrampmode getEmitrampmode() const { return Emitrampmode(myEmitrampmode); }
1243  void setEmitrampmode(Emitrampmode val) { myEmitrampmode = int64(val); }
1245  {
1246  SOP_Node *thissop = cookparms.getNode();
1247  if (!thissop) return getEmitrampmode();
1248  int64 result;
1249  OP_Utils::evalOpParm(result, thissop, "emitrampmode", cookparms.getCookTime(), 0);
1250  return Emitrampmode(result);
1251  }
1252  UT_SharedPtr<UT_Ramp> getEmitramp() const { return myEmitramp; }
1253  void setEmitramp(UT_SharedPtr<UT_Ramp> val) { myEmitramp = val; }
1255  {
1256  SOP_Node *thissop = cookparms.getNode();
1257  if (!thissop) return getEmitramp();
1259  OP_Utils::evalOpParm(result, thissop, "emitramp", cookparms.getCookTime(), 0);
1260  return result;
1261  }
1262  const UT_StringHolder & getEmitcdfield() const { return myEmitcdfield; }
1263  void setEmitcdfield(const UT_StringHolder & val) { myEmitcdfield = val; }
1265  {
1266  SOP_Node *thissop = cookparms.getNode();
1267  if (!thissop) return getEmitcdfield();
1269  OP_Utils::evalOpParm(result, thissop, "emitcdfield", cookparms.getCookTime(), 0);
1270  return result;
1271  }
1272  Emitcdrampmode getEmitcdrampmode() const { return Emitcdrampmode(myEmitcdrampmode); }
1273  void setEmitcdrampmode(Emitcdrampmode val) { myEmitcdrampmode = int64(val); }
1275  {
1276  SOP_Node *thissop = cookparms.getNode();
1277  if (!thissop) return getEmitcdrampmode();
1278  int64 result;
1279  OP_Utils::evalOpParm(result, thissop, "emitcdrampmode", cookparms.getCookTime(), 0);
1280  return Emitcdrampmode(result);
1281  }
1282  UT_SharedPtr<UT_Ramp> getEmitcdramp() const { return myEmitcdramp; }
1283  void setEmitcdramp(UT_SharedPtr<UT_Ramp> val) { myEmitcdramp = val; }
1285  {
1286  SOP_Node *thissop = cookparms.getNode();
1287  if (!thissop) return getEmitcdramp();
1289  OP_Utils::evalOpParm(result, thissop, "emitcdramp", cookparms.getCookTime(), 0);
1290  return result;
1291  }
1292  fpreal64 getEmitcdfieldscale() const { return myEmitcdfieldscale; }
1293  void setEmitcdfieldscale(fpreal64 val) { myEmitcdfieldscale = val; }
1295  {
1296  SOP_Node *thissop = cookparms.getNode();
1297  if (!thissop) return getEmitcdfieldscale();
1298  fpreal64 result;
1299  OP_Utils::evalOpParm(result, thissop, "emitcdfieldscale", cookparms.getCookTime(), 0);
1300  return result;
1301  }
1302  fpreal64 getEmitcdtemperature0() const { return myEmitcdtemperature0; }
1303  void setEmitcdtemperature0(fpreal64 val) { myEmitcdtemperature0 = val; }
1305  {
1306  SOP_Node *thissop = cookparms.getNode();
1307  if (!thissop) return getEmitcdtemperature0();
1308  fpreal64 result;
1309  OP_Utils::evalOpParm(result, thissop, "emitcdtemperature0", cookparms.getCookTime(), 0);
1310  return result;
1311  }
1312  fpreal64 getEmitcdtemperature() const { return myEmitcdtemperature; }
1313  void setEmitcdtemperature(fpreal64 val) { myEmitcdtemperature = val; }
1315  {
1316  SOP_Node *thissop = cookparms.getNode();
1317  if (!thissop) return getEmitcdtemperature();
1318  fpreal64 result;
1319  OP_Utils::evalOpParm(result, thissop, "emitcdtemperature", cookparms.getCookTime(), 0);
1320  return result;
1321  }
1322  bool getEmitcdtonemap() const { return myEmitcdtonemap; }
1323  void setEmitcdtonemap(bool val) { myEmitcdtonemap = val; }
1324  bool opEmitcdtonemap(const SOP_NodeVerb::CookParms &cookparms) const
1325  {
1326  SOP_Node *thissop = cookparms.getNode();
1327  if (!thissop) return getEmitcdtonemap();
1328  bool result;
1329  OP_Utils::evalOpParm(result, thissop, "emitcdtonemap", cookparms.getCookTime(), 0);
1330  return result;
1331  }
1332  fpreal64 getEmitcdadaptation() const { return myEmitcdadaptation; }
1333  void setEmitcdadaptation(fpreal64 val) { myEmitcdadaptation = val; }
1335  {
1336  SOP_Node *thissop = cookparms.getNode();
1337  if (!thissop) return getEmitcdadaptation();
1338  fpreal64 result;
1339  OP_Utils::evalOpParm(result, thissop, "emitcdadaptation", cookparms.getCookTime(), 0);
1340  return result;
1341  }
1342  fpreal64 getEmitcdburn() const { return myEmitcdburn; }
1343  void setEmitcdburn(fpreal64 val) { myEmitcdburn = val; }
1345  {
1346  SOP_Node *thissop = cookparms.getNode();
1347  if (!thissop) return getEmitcdburn();
1348  fpreal64 result;
1349  OP_Utils::evalOpParm(result, thissop, "emitcdburn", cookparms.getCookTime(), 0);
1350  return result;
1351  }
1352  bool getEnablescatter() const { return myEnablescatter; }
1353  void setEnablescatter(bool val) { myEnablescatter = val; }
1354  bool opEnablescatter(const SOP_NodeVerb::CookParms &cookparms) const
1355  {
1356  SOP_Node *thissop = cookparms.getNode();
1357  if (!thissop) return getEnablescatter();
1358  bool result;
1359  OP_Utils::evalOpParm(result, thissop, "enablescatter", cookparms.getCookTime(), 0);
1360  return result;
1361  }
1362  fpreal64 getExtinctionratio() const { return myExtinctionratio; }
1363  void setExtinctionratio(fpreal64 val) { myExtinctionratio = val; }
1365  {
1366  SOP_Node *thissop = cookparms.getNode();
1367  if (!thissop) return getExtinctionratio();
1368  fpreal64 result;
1369  OP_Utils::evalOpParm(result, thissop, "extinctionratio", cookparms.getCookTime(), 0);
1370  return result;
1371  }
1372  int64 getScatteringiter() const { return myScatteringiter; }
1373  void setScatteringiter(int64 val) { myScatteringiter = val; }
1375  {
1376  SOP_Node *thissop = cookparms.getNode();
1377  if (!thissop) return getScatteringiter();
1378  int64 result;
1379  OP_Utils::evalOpParm(result, thissop, "scatteringiter", cookparms.getCookTime(), 0);
1380  return result;
1381  }
1382  bool getEmitcdrangeoverride() const { return myEmitcdrangeoverride; }
1383  void setEmitcdrangeoverride(bool val) { myEmitcdrangeoverride = val; }
1384  bool opEmitcdrangeoverride(const SOP_NodeVerb::CookParms &cookparms) const
1385  {
1386  SOP_Node *thissop = cookparms.getNode();
1387  if (!thissop) return getEmitcdrangeoverride();
1388  bool result;
1389  OP_Utils::evalOpParm(result, thissop, "emitcdrangeoverride", cookparms.getCookTime(), 0);
1390  return result;
1391  }
1392  UT_Vector2D getEmitcdrange() const { return myEmitcdrange; }
1393  void setEmitcdrange(UT_Vector2D val) { myEmitcdrange = val; }
1395  {
1396  SOP_Node *thissop = cookparms.getNode();
1397  if (!thissop) return getEmitcdrange();
1399  OP_Utils::evalOpParm(result, thissop, "emitcdrange", cookparms.getCookTime(), 0);
1400  return result;
1401  }
1402 
1403 private:
1404  int64 myVisMode;
1405  fpreal64 myRangemin;
1406  fpreal64 myRangemax;
1407  fpreal64 myDensityscale;
1408  fpreal64 myShadowscale;
1409  bool mySetambientshadows;
1410  fpreal64 myAmbientshadows;
1411  bool mySetshadowcolor;
1412  UT_Vector3D myShadowcolor;
1413  bool mySetmaxres;
1414  int64 myMaxres;
1415  UT_StringHolder myDensityfield;
1416  int64 myDensityrampmode;
1417  UT_SharedPtr<UT_Ramp> myDensityramp;
1418  UT_StringHolder myCdfield;
1419  bool myCdrangeoverride;
1420  UT_Vector2D myCdrange;
1421  int64 myCdrampmode;
1422  UT_SharedPtr<UT_Ramp> myCdramp;
1423  fpreal64 myEmitscale;
1424  UT_StringHolder myEmitfield;
1425  bool myEmitrangeoverride;
1426  UT_Vector2D myEmitrange;
1427  int64 myEmitrampmode;
1428  UT_SharedPtr<UT_Ramp> myEmitramp;
1429  UT_StringHolder myEmitcdfield;
1430  int64 myEmitcdrampmode;
1431  UT_SharedPtr<UT_Ramp> myEmitcdramp;
1432  fpreal64 myEmitcdfieldscale;
1433  fpreal64 myEmitcdtemperature0;
1434  fpreal64 myEmitcdtemperature;
1435  bool myEmitcdtonemap;
1436  fpreal64 myEmitcdadaptation;
1437  fpreal64 myEmitcdburn;
1438  bool myEnablescatter;
1439  fpreal64 myExtinctionratio;
1440  int64 myScatteringiter;
1441  bool myEmitcdrangeoverride;
1442  UT_Vector2D myEmitcdrange;
1443 
1444 };
type
Definition: core.h:977
bool opEmitrangeoverride(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:102
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:734
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool opSetambientshadows(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool opSetshadowcolor(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opEmitscale(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opEmitcdtemperature(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< UT_Ramp > opEmitcdramp(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
UT_SharedPtr< UT_Ramp > opDensityramp(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2T< fpreal64 > UT_Vector2D
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
bool operator==(const SOP_VolumeVisualizationParms &src) const
void save(std::ostream &os) const
const GLfloat * c
Definition: glew.h:16631
static void loadData(UT_IStream &is, UT_Matrix3D &v)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:101
UT_SharedPtr< UT_Ramp > opEmitramp(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setEmitcdfield(const UT_StringHolder &val)
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opEmitcdfield(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_SharedPtr< UT_Ramp > getEmitcdramp() const
exint getNestNumParms(TempIndex idx) const override
UT_SharedPtr< UT_Ramp > getDensityramp() const
GLenum src
Definition: glcorearb.h:1792
bool opEmitcdrangeoverride(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
Densityrampmode opDensityrampmode(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opDensityscale(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool opEnablescatter(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< UT_Ramp > getEmitramp() const
void setDensityramp(UT_SharedPtr< UT_Ramp > val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_SharedPtr< UT_Ramp > opCdramp(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opExtinctionratio(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
fpreal64 opShadowscale(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
fpreal64 opRangemin(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opDensityfield(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const SOP_NodeParms *src) override
Emitrampmode opEmitrampmode(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:508
int64 opMaxres(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opEmitrange(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
exint length() const
bool operator!=(const SOP_VolumeVisualizationParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
UT_Vector2D opEmitcdrange(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:30
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
fpreal64 opEmitcdburn(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_SharedPtr< UT_Ramp > getCdramp() const
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 opEmitcdadaptation(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:510
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opCdrangeoverride(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setEmitramp(UT_SharedPtr< UT_Ramp > val)
long long int64
Definition: SYS_Types.h:116
UT_Vector2D opCdrange(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getEmitcdfield() const
UT_Vector3T< fpreal64 > UT_Vector3D
bool opEmitcdtonemap(const SOP_NodeVerb::CookParms &cookparms) const
void setDensityfield(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, fpreal64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:287
int64 opScatteringiter(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:109
GLboolean * data
Definition: glcorearb.h:130
fpreal64 opEmitcdfieldscale(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
fpreal64 opRangemax(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
fpreal64 opAmbientshadows(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opEmitcdtemperature0(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_StringHolder opCdfield(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
Emitcdrampmode opEmitcdrampmode(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
const UT_StringHolder & getDensityfield() const
void setCdramp(UT_SharedPtr< UT_Ramp > val)
fpreal64 fpreal
Definition: SYS_Types.h:277
static void loadData(UT_IStream &is, UT_Matrix2D &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setCdfield(const UT_StringHolder &val)
#define SOP_API
Definition: SOP_API.h:10
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_Vector3D opShadowcolor(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:506
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:748
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1371
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:171
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getEmitfield() const
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opEmitfield(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getCdfield() const
void setEmitcdramp(UT_SharedPtr< UT_Ramp > val)
GLboolean r
Definition: glcorearb.h:1221
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
void setDensityrampmode(Densityrampmode val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GLdouble s
Definition: glew.h:1395
bool opSetmaxres(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setEmitfield(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:107
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, int64 &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
Cdrampmode opCdrampmode(const SOP_NodeVerb::CookParms &cookparms) const
VisMode opVisMode(const SOP_NodeVerb::CookParms &cookparms) const