HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeMerge.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_VolumeMergeEnums
24 {
25  enum class Mergemethod
26  {
27  COPY = 0,
28  ADD,
29  MUL,
30  MAX,
31  MIN,
32  AVERAGE
33  };
34 }
35 
36 
38 {
39 public:
40  static int version() { return 1; }
41 
43  {
44  myGroup = ""_sh;
45  myMergegrp = ""_sh;
46  myMergemethod = 1;
47  myClampvolume = true;
48  myDstpreadd = 0;
49  myDstpremul = 1;
50  mySrcpreadd = 0;
51  mySrcpremul = 1;
52  myPostadd = 0;
53  myPostmul = 1;
54  myDoclampmin = false;
55  myClampmin = 0;
56  myDoclampmax = false;
57  myClampmax = 1;
58 
59  }
60 
61  explicit SOP_VolumeMergeParms(const SOP_VolumeMergeParms &) = default;
62 
63  ~SOP_VolumeMergeParms() override {}
64 
65  bool operator==(const SOP_VolumeMergeParms &src) const
66  {
67  if (myGroup != src.myGroup) return false;
68  if (myMergegrp != src.myMergegrp) return false;
69  if (myMergemethod != src.myMergemethod) return false;
70  if (myClampvolume != src.myClampvolume) return false;
71  if (myDstpreadd != src.myDstpreadd) return false;
72  if (myDstpremul != src.myDstpremul) return false;
73  if (mySrcpreadd != src.mySrcpreadd) return false;
74  if (mySrcpremul != src.mySrcpremul) return false;
75  if (myPostadd != src.myPostadd) return false;
76  if (myPostmul != src.myPostmul) return false;
77  if (myDoclampmin != src.myDoclampmin) return false;
78  if (myClampmin != src.myClampmin) return false;
79  if (myDoclampmax != src.myDoclampmax) return false;
80  if (myClampmax != src.myClampmax) return false;
81 
82  return true;
83  }
84  bool operator!=(const SOP_VolumeMergeParms &src) const
85  {
86  return !operator==(src);
87  }
89 
90 
91 
92  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
93  {
94  myGroup = ""_sh;
95  if (true)
96  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
97  myMergegrp = ""_sh;
98  if (true)
99  graph->evalOpParm(myMergegrp, nodeidx, "mergegrp", time, 0);
100  myMergemethod = 1;
101  if (true)
102  graph->evalOpParm(myMergemethod, nodeidx, "mergemethod", time, 0);
103  myClampvolume = true;
104  if (true)
105  graph->evalOpParm(myClampvolume, nodeidx, "clampvolume", time, 0);
106  myDstpreadd = 0;
107  if (true)
108  graph->evalOpParm(myDstpreadd, nodeidx, "dstpreadd", time, 0);
109  myDstpremul = 1;
110  if (true)
111  graph->evalOpParm(myDstpremul, nodeidx, "dstpremul", time, 0);
112  mySrcpreadd = 0;
113  if (true)
114  graph->evalOpParm(mySrcpreadd, nodeidx, "srcpreadd", time, 0);
115  mySrcpremul = 1;
116  if (true)
117  graph->evalOpParm(mySrcpremul, nodeidx, "srcpremul", time, 0);
118  myPostadd = 0;
119  if (true)
120  graph->evalOpParm(myPostadd, nodeidx, "postadd", time, 0);
121  myPostmul = 1;
122  if (true)
123  graph->evalOpParm(myPostmul, nodeidx, "postmul", time, 0);
124  myDoclampmin = false;
125  if (true)
126  graph->evalOpParm(myDoclampmin, nodeidx, "doclampmin", time, 0);
127  myClampmin = 0;
128  if (true && ( (!(((getDoclampmin()==0)))) ) )
129  graph->evalOpParm(myClampmin, nodeidx, "clampmin", time, 0);
130  myDoclampmax = false;
131  if (true)
132  graph->evalOpParm(myDoclampmax, nodeidx, "doclampmax", time, 0);
133  myClampmax = 1;
134  if (true && ( (!(((getDoclampmax()==0)))) ) )
135  graph->evalOpParm(myClampmax, nodeidx, "clampmax", time, 0);
136 
137  }
138 
139 
140  void loadFromOpSubclass(const LoadParms &loadparms) override
141  {
142  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
143  }
144 
145 
146  void copyFrom(const SOP_NodeParms *src) override
147  {
148  *this = *((const SOP_VolumeMergeParms *)src);
149  }
150 
151  template <typename T>
152  void
153  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
154  {
155  if (idx.size() < 1)
156  return;
157  UT_ASSERT(idx.size() == instance.size()+1);
158  if (idx.size() != instance.size()+1)
159  return;
160  switch (idx[0])
161  {
162  case 0:
163  coerceValue(value, myGroup);
164  break;
165  case 1:
166  coerceValue(value, myMergegrp);
167  break;
168  case 2:
169  coerceValue(value, myMergemethod);
170  break;
171  case 3:
172  coerceValue(value, myClampvolume);
173  break;
174  case 4:
175  coerceValue(value, myDstpreadd);
176  break;
177  case 5:
178  coerceValue(value, myDstpremul);
179  break;
180  case 6:
181  coerceValue(value, mySrcpreadd);
182  break;
183  case 7:
184  coerceValue(value, mySrcpremul);
185  break;
186  case 8:
187  coerceValue(value, myPostadd);
188  break;
189  case 9:
190  coerceValue(value, myPostmul);
191  break;
192  case 10:
193  coerceValue(value, myDoclampmin);
194  break;
195  case 11:
196  coerceValue(value, myClampmin);
197  break;
198  case 12:
199  coerceValue(value, myDoclampmax);
200  break;
201  case 13:
202  coerceValue(value, myClampmax);
203  break;
204 
205  }
206  }
207 
208  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
229  { doGetParmValue(idx, instance, value); }
230 
231  template <typename T>
232  void
233  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
234  {
235  if (idx.size() < 1)
236  return;
237  UT_ASSERT(idx.size() == instance.size()+1);
238  if (idx.size() != instance.size()+1)
239  return;
240  switch (idx[0])
241  {
242  case 0:
243  coerceValue(myGroup, value);
244  break;
245  case 1:
246  coerceValue(myMergegrp, value);
247  break;
248  case 2:
249  coerceValue(myMergemethod, value);
250  break;
251  case 3:
252  coerceValue(myClampvolume, value);
253  break;
254  case 4:
255  coerceValue(myDstpreadd, value);
256  break;
257  case 5:
258  coerceValue(myDstpremul, value);
259  break;
260  case 6:
261  coerceValue(mySrcpreadd, value);
262  break;
263  case 7:
264  coerceValue(mySrcpremul, value);
265  break;
266  case 8:
267  coerceValue(myPostadd, value);
268  break;
269  case 9:
270  coerceValue(myPostmul, value);
271  break;
272  case 10:
273  coerceValue(myDoclampmin, value);
274  break;
275  case 11:
276  coerceValue(myClampmin, value);
277  break;
278  case 12:
279  coerceValue(myDoclampmax, value);
280  break;
281  case 13:
282  coerceValue(myClampmax, value);
283  break;
284 
285  }
286  }
287 
288  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
309  { doSetParmValue(idx, instance, value); }
310 
311  exint getNestNumParms(TempIndex idx) const override
312  {
313  if (idx.size() == 0)
314  return 14;
315  switch (idx[0])
316  {
317 
318  }
319  // Invalid
320  return 0;
321  }
322 
323  const char *getNestParmName(TempIndex fieldnum) const override
324  {
325  if (fieldnum.size() < 1)
326  return 0;
327  switch (fieldnum[0])
328  {
329  case 0:
330  return "group";
331  case 1:
332  return "mergegrp";
333  case 2:
334  return "mergemethod";
335  case 3:
336  return "clampvolume";
337  case 4:
338  return "dstpreadd";
339  case 5:
340  return "dstpremul";
341  case 6:
342  return "srcpreadd";
343  case 7:
344  return "srcpremul";
345  case 8:
346  return "postadd";
347  case 9:
348  return "postmul";
349  case 10:
350  return "doclampmin";
351  case 11:
352  return "clampmin";
353  case 12:
354  return "doclampmax";
355  case 13:
356  return "clampmax";
357 
358  }
359  return 0;
360  }
361 
362  ParmType getNestParmType(TempIndex fieldnum) const override
363  {
364  if (fieldnum.size() < 1)
365  return PARM_UNSUPPORTED;
366  switch (fieldnum[0])
367  {
368  case 0:
369  return PARM_STRING;
370  case 1:
371  return PARM_STRING;
372  case 2:
373  return PARM_INTEGER;
374  case 3:
375  return PARM_INTEGER;
376  case 4:
377  return PARM_FLOAT;
378  case 5:
379  return PARM_FLOAT;
380  case 6:
381  return PARM_FLOAT;
382  case 7:
383  return PARM_FLOAT;
384  case 8:
385  return PARM_FLOAT;
386  case 9:
387  return PARM_FLOAT;
388  case 10:
389  return PARM_INTEGER;
390  case 11:
391  return PARM_FLOAT;
392  case 12:
393  return PARM_INTEGER;
394  case 13:
395  return PARM_FLOAT;
396 
397  }
398  return PARM_UNSUPPORTED;
399  }
400 
401  // Boiler plate to load individual types.
402  static void loadData(UT_IStream &is, int64 &v)
403  { is.bread(&v, 1); }
404  static void loadData(UT_IStream &is, bool &v)
405  { int64 iv; is.bread(&iv, 1); v = iv; }
406  static void loadData(UT_IStream &is, fpreal64 &v)
407  { is.bread<fpreal64>(&v, 1); }
408  static void loadData(UT_IStream &is, UT_Vector2D &v)
409  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
410  static void loadData(UT_IStream &is, UT_Vector3D &v)
411  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
412  is.bread<fpreal64>(&v.z(), 1); }
413  static void loadData(UT_IStream &is, UT_Vector4D &v)
414  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
415  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
416  static void loadData(UT_IStream &is, UT_Matrix2D &v)
417  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
418  static void loadData(UT_IStream &is, UT_Matrix3D &v)
419  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
420  static void loadData(UT_IStream &is, UT_Matrix4D &v)
421  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
422  static void loadData(UT_IStream &is, UT_Vector2I &v)
423  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
424  static void loadData(UT_IStream &is, UT_Vector3I &v)
425  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
426  is.bread<int64>(&v.z(), 1); }
427  static void loadData(UT_IStream &is, UT_Vector4I &v)
428  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
429  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
431  { is.bread(v); }
433  { UT_StringHolder rampdata;
434  loadData(is, rampdata);
435  if (rampdata.isstring())
436  {
437  v.reset(new UT_Ramp());
438  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
439  v->load(istr);
440  }
441  else v.reset();
442  }
445  loadData(is, data);
446  if (data.isstring())
447  {
448  // Find the data type.
449  const char *colon = UT_StringWrap(data).findChar(':');
450  if (colon)
451  {
452  int typelen = colon - data.buffer();
454  type.strncpy(data.buffer(), typelen);
455  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
456 
457  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
458  }
459  }
460  else v.reset();
461  }
462 
463  static void saveData(std::ostream &os, int64 v)
464  { UTwrite(os, &v); }
465  static void saveData(std::ostream &os, bool v)
466  { int64 iv = v; UTwrite(os, &iv); }
467  static void saveData(std::ostream &os, fpreal64 v)
468  { UTwrite<fpreal64>(os, &v); }
469  static void saveData(std::ostream &os, UT_Vector2D v)
470  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
471  static void saveData(std::ostream &os, UT_Vector3D v)
472  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
473  UTwrite<fpreal64>(os, &v.z()); }
474  static void saveData(std::ostream &os, UT_Vector4D v)
475  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
476  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
477  static void saveData(std::ostream &os, UT_Matrix2D v)
479  static void saveData(std::ostream &os, UT_Matrix3D v)
481  static void saveData(std::ostream &os, UT_Matrix4D v)
483  static void saveData(std::ostream &os, UT_StringHolder s)
484  { UT_StringWrap(s).saveBinary(os); }
485  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
487  UT_OStringStream ostr;
488  if (s) s->save(ostr);
489  result = ostr.str();
490  saveData(os, result);
491  }
492  static void saveData(std::ostream &os, PRM_DataItemHandle s)
494  UT_OStringStream ostr;
495  if (s)
496  {
497  ostr << s->getDataTypeToken();
498  ostr << ":";
499  s->saveBinary(ostr);
500  }
501  result = ostr.str();
502  saveData(os, result);
503  }
504 
505 
506  void save(std::ostream &os) const
507  {
508  int32 v = version();
509  UTwrite(os, &v);
510  saveData(os, myGroup);
511  saveData(os, myMergegrp);
512  saveData(os, myMergemethod);
513  saveData(os, myClampvolume);
514  saveData(os, myDstpreadd);
515  saveData(os, myDstpremul);
516  saveData(os, mySrcpreadd);
517  saveData(os, mySrcpremul);
518  saveData(os, myPostadd);
519  saveData(os, myPostmul);
520  saveData(os, myDoclampmin);
521  saveData(os, myClampmin);
522  saveData(os, myDoclampmax);
523  saveData(os, myClampmax);
524 
525  }
526 
527  bool load(UT_IStream &is)
528  {
529  int32 v;
530  is.bread(&v, 1);
531  if (version() != v)
532  {
533  // Fail incompatible versions
534  return false;
535  }
536  loadData(is, myGroup);
537  loadData(is, myMergegrp);
538  loadData(is, myMergemethod);
539  loadData(is, myClampvolume);
540  loadData(is, myDstpreadd);
541  loadData(is, myDstpremul);
542  loadData(is, mySrcpreadd);
543  loadData(is, mySrcpremul);
544  loadData(is, myPostadd);
545  loadData(is, myPostmul);
546  loadData(is, myDoclampmin);
547  loadData(is, myClampmin);
548  loadData(is, myDoclampmax);
549  loadData(is, myClampmax);
550 
551  return true;
552  }
553 
554  const UT_StringHolder & getGroup() const { return myGroup; }
555  void setGroup(const UT_StringHolder & val) { myGroup = val; }
557  {
558  SOP_Node *thissop = cookparms.getNode();
559  if (!thissop) return getGroup();
561  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
562  return result;
563  }
564  const UT_StringHolder & getMergegrp() const { return myMergegrp; }
565  void setMergegrp(const UT_StringHolder & val) { myMergegrp = val; }
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getMergegrp();
571  OP_Utils::evalOpParm(result, thissop, "mergegrp", cookparms.getCookTime(), 0);
572  return result;
573  }
574  Mergemethod getMergemethod() const { return Mergemethod(myMergemethod); }
575  void setMergemethod(Mergemethod val) { myMergemethod = int64(val); }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getMergemethod();
580  int64 result;
581  OP_Utils::evalOpParm(result, thissop, "mergemethod", cookparms.getCookTime(), 0);
582  return Mergemethod(result);
583  }
584  bool getClampvolume() const { return myClampvolume; }
585  void setClampvolume(bool val) { myClampvolume = val; }
586  bool opClampvolume(const SOP_NodeVerb::CookParms &cookparms) const
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getClampvolume();
590  bool result;
591  OP_Utils::evalOpParm(result, thissop, "clampvolume", cookparms.getCookTime(), 0);
592  return result;
593  }
594  fpreal64 getDstpreadd() const { return myDstpreadd; }
595  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getDstpreadd();
601  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
602  return result;
603  }
604  fpreal64 getDstpremul() const { return myDstpremul; }
605  void setDstpremul(fpreal64 val) { myDstpremul = val; }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getDstpremul();
611  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
612  return result;
613  }
614  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
615  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getSrcpreadd();
621  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
622  return result;
623  }
624  fpreal64 getSrcpremul() const { return mySrcpremul; }
625  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getSrcpremul();
631  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
632  return result;
633  }
634  fpreal64 getPostadd() const { return myPostadd; }
635  void setPostadd(fpreal64 val) { myPostadd = val; }
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getPostadd();
641  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
642  return result;
643  }
644  fpreal64 getPostmul() const { return myPostmul; }
645  void setPostmul(fpreal64 val) { myPostmul = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getPostmul();
651  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
652  return result;
653  }
654  bool getDoclampmin() const { return myDoclampmin; }
655  void setDoclampmin(bool val) { myDoclampmin = val; }
656  bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getDoclampmin();
660  bool result;
661  OP_Utils::evalOpParm(result, thissop, "doclampmin", cookparms.getCookTime(), 0);
662  return result;
663  }
664  fpreal64 getClampmin() const { return myClampmin; }
665  void setClampmin(fpreal64 val) { myClampmin = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getClampmin();
671  OP_Utils::evalOpParm(result, thissop, "clampmin", cookparms.getCookTime(), 0);
672  return result;
673  }
674  bool getDoclampmax() const { return myDoclampmax; }
675  void setDoclampmax(bool val) { myDoclampmax = val; }
676  bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getDoclampmax();
680  bool result;
681  OP_Utils::evalOpParm(result, thissop, "doclampmax", cookparms.getCookTime(), 0);
682  return result;
683  }
684  fpreal64 getClampmax() const { return myClampmax; }
685  void setClampmax(fpreal64 val) { myClampmax = val; }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getClampmax();
691  OP_Utils::evalOpParm(result, thissop, "clampmax", cookparms.getCookTime(), 0);
692  return result;
693  }
694 
695 private:
696  UT_StringHolder myGroup;
697  UT_StringHolder myMergegrp;
698  int64 myMergemethod;
699  bool myClampvolume;
700  fpreal64 myDstpreadd;
701  fpreal64 myDstpremul;
702  fpreal64 mySrcpreadd;
703  fpreal64 mySrcpremul;
704  fpreal64 myPostadd;
705  fpreal64 myPostmul;
706  bool myDoclampmin;
707  fpreal64 myClampmin;
708  bool myDoclampmax;
709  fpreal64 myClampmax;
710 
711 };
fpreal64 getClampmax() const
GLdouble s
Definition: glew.h:1390
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
fpreal64 opSrcpremul(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
bool opClampvolume(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void setPostadd(fpreal64 val)
GLenum src
Definition: glew.h:2410
fpreal64 getClampmin() const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 opSrcpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
Mergemethod getMergemethod() const
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_StringHolder s)
void loadFromOpSubclass(const LoadParms &loadparms) override
const GLdouble * v
Definition: glew.h:1391
void setSrcpreadd(fpreal64 val)
const UT_StringHolder & getMergegrp() const
void setDstpremul(fpreal64 val)
bool operator==(const SOP_VolumeMergeParms &src) const
fpreal64 getPostadd() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opMergegrp(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal64 getSrcpremul() const
const UT_StringHolder & getGroup() 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.
void setDstpreadd(fpreal64 val)
fpreal64 getPostmul() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
fpreal64 opClampmax(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
Mergemethod opMergemethod(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
double fpreal64
Definition: SYS_Types.h:201
void setPostmul(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setMergemethod(Mergemethod val)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
const char * getNestParmName(TempIndex fieldnum) const override
exint length() 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 saveData(std::ostream &os, int64 v)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal64 getDstpreadd() const
fpreal64 getDstpremul() const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
static void loadData(UT_IStream &is, UT_Vector2I &v)
const GLfloat * c
Definition: glew.h:16296
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opDstpremul(const SOP_NodeVerb::CookParms &cookparms) const
void setClampmin(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 getSrcpreadd() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
fpreal64 opPostadd(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void saveData(std::ostream &os, fpreal64 v)
void setClampmax(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix4D v)
void copyFrom(const SOP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
void setGroup(const UT_StringHolder &val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
#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
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
bool load(UT_IStream &is)
void setSrcpremul(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix2D v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, bool &v)
bool operator!=(const SOP_VolumeMergeParms &src) const
void setMergegrp(const UT_StringHolder &val)
GLsizei const GLfloat * value
Definition: glew.h:1849
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 opClampmin(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opPostmul(const SOP_NodeVerb::CookParms &cookparms) const