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