HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_VolumeMix.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 <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_VolumeMixEnums
22 {
23  enum class Mixmethod
24  {
25  COPY = 0,
26  ADD,
27  SUB,
28  DIFF,
29  MUL,
30  DIV,
31  INVERT,
32  MAX,
33  MIN,
34  CLAMP,
35  BLEND,
36  USER
37  };
38 }
39 
40 
42 {
43 public:
44  static int version() { return 1; }
45 
47  {
48  myGroup = ""_sh;
49  myMixgrp = ""_sh;
50  myMixmethod = 0;
51  myRange = UT_Vector2D(0,1);
52  myBlend = 0.5;
53  myExpr = 0;
54  myDstpreadd = 0;
55  myDstpremul = 1;
56  mySrcpreadd = 0;
57  mySrcpremul = 1;
58  myPostadd = 0;
59  myPostmul = 1;
60  myDoclampmin = false;
61  myClampmin = 0;
62  myDoclampmax = false;
63  myClampmax = 1;
64  myExpandvdb = false;
65 
66  }
67 
68  explicit SOP_VolumeMixParms(const SOP_VolumeMixParms &) = default;
69 
70  virtual ~SOP_VolumeMixParms() {}
71 
72  bool operator==(const SOP_VolumeMixParms &src) const
73  {
74  if (myGroup != src.myGroup) return false;
75  if (myMixgrp != src.myMixgrp) return false;
76  if (myMixmethod != src.myMixmethod) return false;
77  if (myRange != src.myRange) return false;
78  if (myBlend != src.myBlend) return false;
79  if (myExpr != src.myExpr) return false;
80  if (myDstpreadd != src.myDstpreadd) return false;
81  if (myDstpremul != src.myDstpremul) return false;
82  if (mySrcpreadd != src.mySrcpreadd) return false;
83  if (mySrcpremul != src.mySrcpremul) return false;
84  if (myPostadd != src.myPostadd) return false;
85  if (myPostmul != src.myPostmul) return false;
86  if (myDoclampmin != src.myDoclampmin) return false;
87  if (myClampmin != src.myClampmin) return false;
88  if (myDoclampmax != src.myDoclampmax) return false;
89  if (myClampmax != src.myClampmax) return false;
90  if (myExpandvdb != src.myExpandvdb) return false;
91 
92  return true;
93  }
95 
96 
97 
98  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
99  {
100  if (true)
101  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
102  else myGroup = ""_sh;
103  if (true)
104  OP_Utils::evalOpParm(myMixgrp, node, "mixgrp", time, 0);
105  else myMixgrp = ""_sh;
106  if (true)
107  OP_Utils::evalOpParm(myMixmethod, node, "mixmethod", time, 0);
108  else myMixmethod = 0;
109  if (true && ( (!(((int64(getMixmethod())!=9)))) ) )
110  OP_Utils::evalOpParm(myRange, node, "range", time, 0);
111  else myRange = UT_Vector2D(0,1);
112  if (true && ( (!(((int64(getMixmethod())!=10)))) ) )
113  OP_Utils::evalOpParm(myBlend, node, "blend", time, 0);
114  else myBlend = 0.5;
115  if (true && ( (!(((int64(getMixmethod())!=11)))) ) )
116  OP_Utils::evalOpParm(myExpr, node, "expr", time, 0);
117  else myExpr = 0;
118  if (true)
119  OP_Utils::evalOpParm(myDstpreadd, node, "dstpreadd", time, 0);
120  else myDstpreadd = 0;
121  if (true)
122  OP_Utils::evalOpParm(myDstpremul, node, "dstpremul", time, 0);
123  else myDstpremul = 1;
124  if (true)
125  OP_Utils::evalOpParm(mySrcpreadd, node, "srcpreadd", time, 0);
126  else mySrcpreadd = 0;
127  if (true)
128  OP_Utils::evalOpParm(mySrcpremul, node, "srcpremul", time, 0);
129  else mySrcpremul = 1;
130  if (true)
131  OP_Utils::evalOpParm(myPostadd, node, "postadd", time, 0);
132  else myPostadd = 0;
133  if (true)
134  OP_Utils::evalOpParm(myPostmul, node, "postmul", time, 0);
135  else myPostmul = 1;
136  if (true)
137  OP_Utils::evalOpParm(myDoclampmin, node, "doclampmin", time, 0);
138  else myDoclampmin = false;
139  if (true && ( (!(((getDoclampmin()==0)))) ) )
140  OP_Utils::evalOpParm(myClampmin, node, "clampmin", time, 0);
141  else myClampmin = 0;
142  if (true)
143  OP_Utils::evalOpParm(myDoclampmax, node, "doclampmax", time, 0);
144  else myDoclampmax = false;
145  if (true && ( (!(((getDoclampmax()==0)))) ) )
146  OP_Utils::evalOpParm(myClampmax, node, "clampmax", time, 0);
147  else myClampmax = 1;
148  if (true)
149  OP_Utils::evalOpParm(myExpandvdb, node, "expandvdb", time, 0);
150  else myExpandvdb = false;
151 
152  }
153 
154 
155  virtual void loadFromOpSubclass(const LoadParms &loadparms)
156  {
157  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
158  }
159 
160 
161  virtual void copyFrom(const SOP_NodeParms *src)
162  {
163  *this = *((const SOP_VolumeMixParms *)src);
164  }
165 
166  template <typename T>
167  void
168  doGetParmValue(exint idx, T &value) const
169  {
170  switch (idx)
171  {
172  case 0:
173  coerceValue(value, myGroup);
174  break;
175  case 1:
176  coerceValue(value, myMixgrp);
177  break;
178  case 2:
179  coerceValue(value, myMixmethod);
180  break;
181  case 3:
182  coerceValue(value, myRange);
183  break;
184  case 4:
185  coerceValue(value, myBlend);
186  break;
187  case 5:
188  coerceValue(value, myExpr);
189  break;
190  case 6:
191  coerceValue(value, myDstpreadd);
192  break;
193  case 7:
194  coerceValue(value, myDstpremul);
195  break;
196  case 8:
197  coerceValue(value, mySrcpreadd);
198  break;
199  case 9:
200  coerceValue(value, mySrcpremul);
201  break;
202  case 10:
203  coerceValue(value, myPostadd);
204  break;
205  case 11:
206  coerceValue(value, myPostmul);
207  break;
208  case 12:
209  coerceValue(value, myDoclampmin);
210  break;
211  case 13:
212  coerceValue(value, myClampmin);
213  break;
214  case 14:
215  coerceValue(value, myDoclampmax);
216  break;
217  case 15:
218  coerceValue(value, myClampmax);
219  break;
220  case 16:
221  coerceValue(value, myExpandvdb);
222  break;
223 
224  }
225  }
226 
227  void getParmValue(exint idx, exint &value) const
228  { doGetParmValue(idx, value); }
229  void getParmValue(exint idx, fpreal &value) const
230  { doGetParmValue(idx, value); }
232  { doGetParmValue(idx, value); }
234  { doGetParmValue(idx, value); }
236  { doGetParmValue(idx, value); }
238  { doGetParmValue(idx, value); }
240  { doGetParmValue(idx, value); }
242  { doGetParmValue(idx, value); }
244  { doGetParmValue(idx, value); }
246  { doGetParmValue(idx, value); }
248  { doGetParmValue(idx, value); }
249 
250  template <typename T>
251  void
252  doSetParmValue(exint idx, const T &value)
253  {
254  switch (idx)
255  {
256  case 0:
257  coerceValue(myGroup, value);
258  break;
259  case 1:
260  coerceValue(myMixgrp, value);
261  break;
262  case 2:
263  coerceValue(myMixmethod, value);
264  break;
265  case 3:
266  coerceValue(myRange, value);
267  break;
268  case 4:
269  coerceValue(myBlend, value);
270  break;
271  case 5:
272  coerceValue(myExpr, value);
273  break;
274  case 6:
275  coerceValue(myDstpreadd, value);
276  break;
277  case 7:
278  coerceValue(myDstpremul, value);
279  break;
280  case 8:
281  coerceValue(mySrcpreadd, value);
282  break;
283  case 9:
284  coerceValue(mySrcpremul, value);
285  break;
286  case 10:
287  coerceValue(myPostadd, value);
288  break;
289  case 11:
290  coerceValue(myPostmul, value);
291  break;
292  case 12:
293  coerceValue(myDoclampmin, value);
294  break;
295  case 13:
296  coerceValue(myClampmin, value);
297  break;
298  case 14:
299  coerceValue(myDoclampmax, value);
300  break;
301  case 15:
302  coerceValue(myClampmax, value);
303  break;
304  case 16:
305  coerceValue(myExpandvdb, value);
306  break;
307 
308  }
309  }
310 
311  void setParmValue(exint idx, const exint &value)
312  { doSetParmValue(idx, value); }
313  void setParmValue(exint idx, const fpreal &value)
314  { doSetParmValue(idx, value); }
315  void setParmValue(exint idx, const UT_Vector2D &value)
316  { doSetParmValue(idx, value); }
317  void setParmValue(exint idx, const UT_Vector3D &value)
318  { doSetParmValue(idx, value); }
319  void setParmValue(exint idx, const UT_Vector4D &value)
320  { doSetParmValue(idx, value); }
321  void setParmValue(exint idx, const UT_Matrix2D &value)
322  { doSetParmValue(idx, value); }
323  void setParmValue(exint idx, const UT_Matrix3D &value)
324  { doSetParmValue(idx, value); }
325  void setParmValue(exint idx, const UT_Matrix4D &value)
326  { doSetParmValue(idx, value); }
328  { doSetParmValue(idx, value); }
330  { doSetParmValue(idx, value); }
332  { doSetParmValue(idx, value); }
333 
334  virtual exint getNumParms() const
335  {
336  return 17;
337  }
338 
339  virtual const char *getParmName(exint fieldnum) const
340  {
341  switch (fieldnum)
342  {
343  case 0:
344  return "group";
345  case 1:
346  return "mixgrp";
347  case 2:
348  return "mixmethod";
349  case 3:
350  return "range";
351  case 4:
352  return "blend";
353  case 5:
354  return "expr";
355  case 6:
356  return "dstpreadd";
357  case 7:
358  return "dstpremul";
359  case 8:
360  return "srcpreadd";
361  case 9:
362  return "srcpremul";
363  case 10:
364  return "postadd";
365  case 11:
366  return "postmul";
367  case 12:
368  return "doclampmin";
369  case 13:
370  return "clampmin";
371  case 14:
372  return "doclampmax";
373  case 15:
374  return "clampmax";
375  case 16:
376  return "expandvdb";
377 
378  }
379  return 0;
380  }
381 
382  virtual ParmType getParmType(exint fieldnum) const
383  {
384  switch (fieldnum)
385  {
386  case 0:
387  return PARM_STRING;
388  case 1:
389  return PARM_STRING;
390  case 2:
391  return PARM_INTEGER;
392  case 3:
393  return PARM_VECTOR2;
394  case 4:
395  return PARM_FLOAT;
396  case 5:
397  return PARM_FLOAT;
398  case 6:
399  return PARM_FLOAT;
400  case 7:
401  return PARM_FLOAT;
402  case 8:
403  return PARM_FLOAT;
404  case 9:
405  return PARM_FLOAT;
406  case 10:
407  return PARM_FLOAT;
408  case 11:
409  return PARM_FLOAT;
410  case 12:
411  return PARM_INTEGER;
412  case 13:
413  return PARM_FLOAT;
414  case 14:
415  return PARM_INTEGER;
416  case 15:
417  return PARM_FLOAT;
418  case 16:
419  return PARM_INTEGER;
420 
421  }
422  return PARM_UNSUPPORTED;
423  }
424 
425  // Boiler plate to load individual types.
426  static void loadData(UT_IStream &is, int64 &v)
427  { is.bread(&v, 1); }
428  static void loadData(UT_IStream &is, bool &v)
429  { int64 iv; is.bread(&iv, 1); v = iv; }
430  static void loadData(UT_IStream &is, fpreal64 &v)
431  { is.bread<fpreal64>(&v, 1); }
432  static void loadData(UT_IStream &is, UT_Vector2D &v)
433  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
434  static void loadData(UT_IStream &is, UT_Vector3D &v)
435  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
436  is.bread<fpreal64>(&v.z(), 1); }
437  static void loadData(UT_IStream &is, UT_Vector4D &v)
438  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
439  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
440  static void loadData(UT_IStream &is, UT_Matrix2D &v)
441  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
442  static void loadData(UT_IStream &is, UT_Matrix3D &v)
443  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
444  static void loadData(UT_IStream &is, UT_Matrix4D &v)
445  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
446  static void loadData(UT_IStream &is, UT_Vector2I &v)
447  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
448  static void loadData(UT_IStream &is, UT_Vector3I &v)
449  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
450  is.bread<int64>(&v.z(), 1); }
451  static void loadData(UT_IStream &is, UT_Vector4I &v)
452  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
453  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
455  { is.bread(v); }
457  { UT_StringHolder rampdata;
458  loadData(is, rampdata);
459  if (rampdata.isstring())
460  {
461  v.reset(new UT_Ramp());
462  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
463  v->load(istr);
464  }
465  else v.reset();
466  }
469  loadData(is, data);
470  if (data.isstring())
471  {
472  // Find the data type.
473  char *colon = UT_StringWrap(data).findChar(':');
474  if (colon)
475  {
476  int typelen = colon - data.buffer();
478  type.strncpy(data.buffer(), typelen);
479  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
480 
481  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
482  }
483  }
484  else v.reset();
485  }
486 
487  static void saveData(std::ostream &os, int64 v)
488  { UTwrite(os, &v); }
489  static void saveData(std::ostream &os, bool v)
490  { int64 iv = v; UTwrite(os, &iv); }
491  static void saveData(std::ostream &os, fpreal64 v)
492  { UTwrite<fpreal64>(os, &v); }
493  static void saveData(std::ostream &os, UT_Vector2D v)
494  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
495  static void saveData(std::ostream &os, UT_Vector3D v)
496  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
497  UTwrite<fpreal64>(os, &v.z()); }
498  static void saveData(std::ostream &os, UT_Vector4D v)
499  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
500  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
501  static void saveData(std::ostream &os, UT_Matrix2D v)
503  static void saveData(std::ostream &os, UT_Matrix3D v)
505  static void saveData(std::ostream &os, UT_Matrix4D v)
507  static void saveData(std::ostream &os, UT_StringHolder s)
508  { UT_StringWrap(s).saveBinary(os); }
509  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
510  { UT_StringHolder result;
511  UT_OStringStream ostr;
512  if (s) s->save(ostr);
513  result = ostr.str();
514  saveData(os, result);
515  }
516  static void saveData(std::ostream &os, PRM_DataItemHandle s)
517  { UT_StringHolder result;
518  UT_OStringStream ostr;
519  if (s)
520  {
521  ostr << s->getDataTypeToken();
522  ostr << ":";
523  s->saveBinary(ostr);
524  }
525  result = ostr.str();
526  saveData(os, result);
527  }
528 
529 
530  void save(std::ostream &os) const
531  {
532  int32 v = version();
533  UTwrite(os, &v);
534  saveData(os, myGroup);
535  saveData(os, myMixgrp);
536  saveData(os, myMixmethod);
537  saveData(os, myRange);
538  saveData(os, myBlend);
539  saveData(os, myExpr);
540  saveData(os, myDstpreadd);
541  saveData(os, myDstpremul);
542  saveData(os, mySrcpreadd);
543  saveData(os, mySrcpremul);
544  saveData(os, myPostadd);
545  saveData(os, myPostmul);
546  saveData(os, myDoclampmin);
547  saveData(os, myClampmin);
548  saveData(os, myDoclampmax);
549  saveData(os, myClampmax);
550  saveData(os, myExpandvdb);
551 
552  }
553 
554  bool load(UT_IStream &is)
555  {
556  int32 v;
557  is.bread(&v, 1);
558  if (version() != v)
559  {
560  // Fail incompatible versions
561  return false;
562  }
563  loadData(is, myGroup);
564  loadData(is, myMixgrp);
565  loadData(is, myMixmethod);
566  loadData(is, myRange);
567  loadData(is, myBlend);
568  loadData(is, myExpr);
569  loadData(is, myDstpreadd);
570  loadData(is, myDstpremul);
571  loadData(is, mySrcpreadd);
572  loadData(is, mySrcpremul);
573  loadData(is, myPostadd);
574  loadData(is, myPostmul);
575  loadData(is, myDoclampmin);
576  loadData(is, myClampmin);
577  loadData(is, myDoclampmax);
578  loadData(is, myClampmax);
579  loadData(is, myExpandvdb);
580 
581  return true;
582  }
583 
584  const UT_StringHolder & getGroup() const { return myGroup; }
585  void setGroup(const UT_StringHolder & val) { myGroup = val; }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getGroup();
590  UT_StringHolder result;
591  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
592  return result;
593  }
594  const UT_StringHolder & getMixgrp() const { return myMixgrp; }
595  void setMixgrp(const UT_StringHolder & val) { myMixgrp = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getMixgrp();
600  UT_StringHolder result;
601  OP_Utils::evalOpParm(result, thissop, "mixgrp", cookparms.getCookTime(), 0);
602  return result;
603  }
604  Mixmethod getMixmethod() const { return Mixmethod(myMixmethod); }
605  void setMixmethod(Mixmethod val) { myMixmethod = int64(val); }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getMixmethod();
610  int64 result;
611  OP_Utils::evalOpParm(result, thissop, "mixmethod", cookparms.getCookTime(), 0);
612  return Mixmethod(result);
613  }
614  UT_Vector2D getRange() const { return myRange; }
615  void setRange(UT_Vector2D val) { myRange = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getRange();
620  UT_Vector2D result;
621  OP_Utils::evalOpParm(result, thissop, "range", cookparms.getCookTime(), 0);
622  return result;
623  }
624  fpreal64 getBlend() const { return myBlend; }
625  void setBlend(fpreal64 val) { myBlend = val; }
626  fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getBlend();
630  fpreal64 result;
631  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
632  return result;
633  }
634  fpreal64 getExpr() const { return myExpr; }
635  void setExpr(fpreal64 val) { myExpr = val; }
636  fpreal64 opExpr(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getExpr();
640  fpreal64 result;
641  OP_Utils::evalOpParm(result, thissop, "expr", cookparms.getCookTime(), 0);
642  return result;
643  }
644  fpreal64 getDstpreadd() const { return myDstpreadd; }
645  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getDstpreadd();
650  fpreal64 result;
651  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
652  return result;
653  }
654  fpreal64 getDstpremul() const { return myDstpremul; }
655  void setDstpremul(fpreal64 val) { myDstpremul = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getDstpremul();
660  fpreal64 result;
661  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
662  return result;
663  }
664  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
665  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getSrcpreadd();
670  fpreal64 result;
671  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
672  return result;
673  }
674  fpreal64 getSrcpremul() const { return mySrcpremul; }
675  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getSrcpremul();
680  fpreal64 result;
681  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
682  return result;
683  }
684  fpreal64 getPostadd() const { return myPostadd; }
685  void setPostadd(fpreal64 val) { myPostadd = val; }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getPostadd();
690  fpreal64 result;
691  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
692  return result;
693  }
694  fpreal64 getPostmul() const { return myPostmul; }
695  void setPostmul(fpreal64 val) { myPostmul = val; }
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getPostmul();
700  fpreal64 result;
701  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
702  return result;
703  }
704  bool getDoclampmin() const { return myDoclampmin; }
705  void setDoclampmin(bool val) { myDoclampmin = val; }
706  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getDoclampmin();
710  bool result;
711  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
712  return result;
713  }
714  fpreal64 getClampmin() const { return myClampmin; }
715  void setClampmin(fpreal64 val) { myClampmin = val; }
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getClampmin();
720  fpreal64 result;
721  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
722  return result;
723  }
724  bool getDoclampmax() const { return myDoclampmax; }
725  void setDoclampmax(bool val) { myDoclampmax = val; }
726  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getDoclampmax();
730  bool result;
731  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
732  return result;
733  }
734  fpreal64 getClampmax() const { return myClampmax; }
735  void setClampmax(fpreal64 val) { myClampmax = val; }
737  {
738  SOP_Node *thissop = cookparms.getNode();
739  if (!thissop) return getClampmax();
740  fpreal64 result;
741  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
742  return result;
743  }
744  bool getExpandvdb() const { return myExpandvdb; }
745  void setExpandvdb(bool val) { myExpandvdb = val; }
746  bool opExpandvdb(const SOP_NodeVerb::CookParms &cookparms) const
747  {
748  SOP_Node *thissop = cookparms.getNode();
749  if (!thissop) return getExpandvdb();
750  bool result;
751  OP_Utils::evalOpParm(result, thissop, "expandvdb", cookparms.getCookTime(), 0);
752  return result;
753  }
754 
755 private:
756  UT_StringHolder myGroup;
757  UT_StringHolder myMixgrp;
758  int64 myMixmethod;
759  UT_Vector2D myRange;
760  fpreal64 myBlend;
761  fpreal64 myExpr;
762  fpreal64 myDstpreadd;
763  fpreal64 myDstpremul;
764  fpreal64 mySrcpreadd;
765  fpreal64 mySrcpremul;
766  fpreal64 myPostadd;
767  fpreal64 myPostmul;
768  bool myDoclampmin;
769  fpreal64 myClampmin;
770  bool myDoclampmax;
771  fpreal64 myClampmax;
772  bool myExpandvdb;
773 
774 };
fpreal64 getDstpremul() const
static void saveData(std::ostream &os, UT_Matrix3D v)
virtual void copyFrom(const SOP_NodeParms *src)
void setMixgrp(const UT_StringHolder &val)
Mixmethod getMixmethod() const
void doGetParmValue(exint idx, T &value) const
void setParmValue(exint idx, const fpreal &value)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
void setRange(UT_Vector2D val)
static void saveData(std::ostream &os, UT_StringHolder s)
T & z(void)
Definition: UT_Vector4.h:372
void setGroup(const UT_StringHolder &val)
virtual ParmType getParmType(exint fieldnum) const
bool load(UT_IStream &is)
void getParmValue(exint idx, UT_Vector3D &value) const
Mixmethod opMixmethod(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void getParmValue(exint idx, exint &value) const
fpreal64 opClampmax(const SOP_NodeVerb::CookParms &cookparms) const
bool getDoclampmin() const
virtual const char * getParmName(exint fieldnum) const
void setMixmethod(Mixmethod val)
fpreal64 getPostadd() const
exint bread(int32 *buffer, exint asize=1)
bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
UT_Vector2T< fpreal64 > UT_Vector2D
void setParmValue(exint idx, const UT_Vector3D &value)
const UT_StringHolder & getMixgrp() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
T & x(void)
Definition: UT_Vector2.h:284
void setSrcpreadd(fpreal64 val)
fpreal64 opClampmin(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setExpandvdb(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 opDstpremul(const SOP_NodeVerb::CookParms &cookparms) const
void setSrcpremul(fpreal64 val)
void setParmValue(exint idx, const UT_Matrix4D &value)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
fpreal64 getSrcpremul() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getParmValue(exint idx, UT_StringHolder &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void setClampmax(fpreal64 val)
void setBlend(fpreal64 val)
void setClampmin(fpreal64 val)
bool opExpandvdb(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opRange(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
void save(std::ostream &os) const
long long int64
Definition: SYS_Types.h:100
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setParmValue(exint idx, const UT_Matrix2D &value)
void setParmValue(exint idx, const UT_Matrix3D &value)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
fpreal64 getClampmax() const
fpreal64 getClampmin() const
int64 exint
Definition: SYS_Types.h:109
void getParmValue(exint idx, UT_Matrix3D &value) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:185
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual exint getNumParms() const
void getParmValue(exint idx, UT_Matrix4D &value) const
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getBlend() const
void getParmValue(exint idx, UT_Vector4D &value) const
void setDstpremul(fpreal64 val)
void getParmValue(exint idx, UT_Vector2D &value) const
bool operator==(const SOP_VolumeMixParms &src) const
GLboolean * data
Definition: glcorearb.h:130
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:28
T & y(void)
Definition: UT_Vector4.h:370
static void loadData(UT_IStream &is, fpreal64 &v)
void getParmValue(exint idx, fpreal &value) const
void setDoclampmax(bool val)
void setPostadd(fpreal64 val)
fpreal64 opSrcpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 getDstpreadd() const
bool getDoclampmax() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opMixgrp(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:263
void strncpy(const char *src, exint maxlen)
void getParmValue(exint idx, UT_Matrix2D &value) const
static void loadData(UT_IStream &is, bool &v)
void setParmValue(exint idx, const UT_StringHolder &value)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, int64 &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 getExpr() const
bool getExpandvdb() const
void setDstpreadd(fpreal64 val)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
fpreal64 opSrcpremul(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opExpr(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setExpr(fpreal64 val)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
fpreal64 getPostmul() const
#define SOP_API
Definition: SOP_API.h:10
const char * buffer() const
void setDoclampmin(bool val)
static void saveData(std::ostream &os, int64 v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
void setParmValue(exint idx, const UT_Vector4D &value)
T & x(void)
Definition: UT_Vector4.h:368
void doSetParmValue(exint idx, const T &value)
static void loadData(UT_IStream &is, UT_Vector4I &v)
T & y(void)
Definition: UT_Vector2.h:286
static void saveData(std::ostream &os, UT_Matrix2D v)
void setParmValue(exint idx, const UT_Vector2D &value)
UT_Vector2D getRange() const
fpreal64 opPostmul(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
GLboolean r
Definition: glcorearb.h:1221
T & w(void)
Definition: UT_Vector4.h:374
fpreal64 getSrcpreadd() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 opPostadd(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const exint &value)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
void setPostmul(fpreal64 val)
SYS_FORCE_INLINE bool isstring() const
GLenum src
Definition: glcorearb.h:1792