HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeFromAttrib.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_VolumeFromAttribEnums
22 {
23  enum class Calculationtype
24  {
25  COPY = 0,
26  ADD,
27  SUB,
28  MUL,
29  DIV,
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  myPointgrp = ""_sh;
46  myUseattrib = false;
47  myAttrib = ""_sh;
48  myDisableonmissing = false;
49  myAccumulate = false;
50  myExtrapolate = false;
51  myUsemaxextrapolate = false;
52  myMaxextrapolate = 2;
53  myUsemaxextrapolatedist = false;
54  myMaxextrapolatedist = 0;
55  myThreshold = 1;
56  myBandwidth = 0;
57  myCalculationtype = 0;
58  myDstpreadd = 0;
59  myDstpremul = 1;
60  myScalebyvolume = false;
61  mySrcpreadd = 0;
62  mySrcpremul = 1;
63  myPostadd = 0;
64  myPostmul = 1;
65 
66  }
67 
68  explicit SOP_VolumeFromAttribParms(const SOP_VolumeFromAttribParms &) = default;
69 
71 
73  {
74  if (myGroup != src.myGroup) return false;
75  if (myPointgrp != src.myPointgrp) return false;
76  if (myUseattrib != src.myUseattrib) return false;
77  if (myAttrib != src.myAttrib) return false;
78  if (myDisableonmissing != src.myDisableonmissing) return false;
79  if (myAccumulate != src.myAccumulate) return false;
80  if (myExtrapolate != src.myExtrapolate) return false;
81  if (myUsemaxextrapolate != src.myUsemaxextrapolate) return false;
82  if (myMaxextrapolate != src.myMaxextrapolate) return false;
83  if (myUsemaxextrapolatedist != src.myUsemaxextrapolatedist) return false;
84  if (myMaxextrapolatedist != src.myMaxextrapolatedist) return false;
85  if (myThreshold != src.myThreshold) return false;
86  if (myBandwidth != src.myBandwidth) return false;
87  if (myCalculationtype != src.myCalculationtype) return false;
88  if (myDstpreadd != src.myDstpreadd) return false;
89  if (myDstpremul != src.myDstpremul) return false;
90  if (myScalebyvolume != src.myScalebyvolume) return false;
91  if (mySrcpreadd != src.mySrcpreadd) return false;
92  if (mySrcpremul != src.mySrcpremul) return false;
93  if (myPostadd != src.myPostadd) return false;
94  if (myPostmul != src.myPostmul) return false;
95 
96  return true;
97  }
99  {
100  return !operator==(src);
101  }
103 
104 
105 
106  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
107  {
108  if (true)
109  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
110  else myGroup = ""_sh;
111  if (true)
112  OP_Utils::evalOpParm(myPointgrp, node, "pointgrp", time, 0);
113  else myPointgrp = ""_sh;
114  if (true)
115  OP_Utils::evalOpParm(myUseattrib, node, "useattrib", time, 0);
116  else myUseattrib = false;
117  if (true && ( (!(((getUseattrib()==0)))) ) )
118  OP_Utils::evalOpParm(myAttrib, node, "attrib", time, 0);
119  else myAttrib = ""_sh;
120  if (true && ( (!(((getUseattrib()==0)))) ) )
121  OP_Utils::evalOpParm(myDisableonmissing, node, "disableonmissing", time, 0);
122  else myDisableonmissing = false;
123  if (true)
124  OP_Utils::evalOpParm(myAccumulate, node, "accumulate", time, 0);
125  else myAccumulate = false;
126  if (true && ( (!(((getAccumulate()==1)))) ) )
127  OP_Utils::evalOpParm(myExtrapolate, node, "extrapolate", time, 0);
128  else myExtrapolate = false;
129  if (true && ( (!(((getAccumulate()==1))||((getExtrapolate()==0)))) ) )
130  OP_Utils::evalOpParm(myUsemaxextrapolate, node, "usemaxextrapolate", time, 0);
131  else myUsemaxextrapolate = false;
132  if (true && ( (!(((getAccumulate()==1))||((getExtrapolate()==0))||((getUsemaxextrapolate()==0)))) ) )
133  OP_Utils::evalOpParm(myMaxextrapolate, node, "maxextrapolate", time, 0);
134  else myMaxextrapolate = 2;
135  if (true && ( (!(((getAccumulate()==1))||((getExtrapolate()==0)))) ) )
136  OP_Utils::evalOpParm(myUsemaxextrapolatedist, node, "usemaxextrapolatedist", time, 0);
137  else myUsemaxextrapolatedist = false;
138  if (true && ( (!(((getAccumulate()==1))||((getExtrapolate()==0))||((getUsemaxextrapolatedist()==0)))) ) )
139  OP_Utils::evalOpParm(myMaxextrapolatedist, node, "maxextrapolatedist", time, 0);
140  else myMaxextrapolatedist = 0;
141  if (true && ( (!(((getAccumulate()==1))||((getExtrapolate()==1)))) ) )
142  OP_Utils::evalOpParm(myThreshold, node, "threshold", time, 0);
143  else myThreshold = 1;
144  if (true && ( (!(((getAccumulate()==1))||((getExtrapolate()==1)))) ) )
145  OP_Utils::evalOpParm(myBandwidth, node, "bandwidth", time, 0);
146  else myBandwidth = 0;
147  if (true)
148  OP_Utils::evalOpParm(myCalculationtype, node, "calculationtype", time, 0);
149  else myCalculationtype = 0;
150  if (true)
151  OP_Utils::evalOpParm(myDstpreadd, node, "dstpreadd", time, 0);
152  else myDstpreadd = 0;
153  if (true)
154  OP_Utils::evalOpParm(myDstpremul, node, "dstpremul", time, 0);
155  else myDstpremul = 1;
156  if (true)
157  OP_Utils::evalOpParm(myScalebyvolume, node, "scalebyvolume", time, 0);
158  else myScalebyvolume = false;
159  if (true)
160  OP_Utils::evalOpParm(mySrcpreadd, node, "srcpreadd", time, 0);
161  else mySrcpreadd = 0;
162  if (true)
163  OP_Utils::evalOpParm(mySrcpremul, node, "srcpremul", time, 0);
164  else mySrcpremul = 1;
165  if (true)
166  OP_Utils::evalOpParm(myPostadd, node, "postadd", time, 0);
167  else myPostadd = 0;
168  if (true)
169  OP_Utils::evalOpParm(myPostmul, node, "postmul", time, 0);
170  else myPostmul = 1;
171 
172  }
173 
174 
175  virtual void loadFromOpSubclass(const LoadParms &loadparms)
176  {
177  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
178  }
179 
180 
181  virtual void copyFrom(const SOP_NodeParms *src)
182  {
183  *this = *((const SOP_VolumeFromAttribParms *)src);
184  }
185 
186  template <typename T>
187  void
188  doGetParmValue(exint idx, T &value) const
189  {
190  switch (idx)
191  {
192  case 0:
193  coerceValue(value, myGroup);
194  break;
195  case 1:
196  coerceValue(value, myPointgrp);
197  break;
198  case 2:
199  coerceValue(value, myUseattrib);
200  break;
201  case 3:
202  coerceValue(value, myAttrib);
203  break;
204  case 4:
205  coerceValue(value, myDisableonmissing);
206  break;
207  case 5:
208  coerceValue(value, myAccumulate);
209  break;
210  case 6:
211  coerceValue(value, myExtrapolate);
212  break;
213  case 7:
214  coerceValue(value, myUsemaxextrapolate);
215  break;
216  case 8:
217  coerceValue(value, myMaxextrapolate);
218  break;
219  case 9:
220  coerceValue(value, myUsemaxextrapolatedist);
221  break;
222  case 10:
223  coerceValue(value, myMaxextrapolatedist);
224  break;
225  case 11:
226  coerceValue(value, myThreshold);
227  break;
228  case 12:
229  coerceValue(value, myBandwidth);
230  break;
231  case 13:
232  coerceValue(value, myCalculationtype);
233  break;
234  case 14:
235  coerceValue(value, myDstpreadd);
236  break;
237  case 15:
238  coerceValue(value, myDstpremul);
239  break;
240  case 16:
241  coerceValue(value, myScalebyvolume);
242  break;
243  case 17:
244  coerceValue(value, mySrcpreadd);
245  break;
246  case 18:
247  coerceValue(value, mySrcpremul);
248  break;
249  case 19:
250  coerceValue(value, myPostadd);
251  break;
252  case 20:
253  coerceValue(value, myPostmul);
254  break;
255 
256  }
257  }
258 
259  void getParmValue(exint idx, exint &value) const
260  { doGetParmValue(idx, value); }
261  void getParmValue(exint idx, fpreal &value) const
262  { doGetParmValue(idx, value); }
264  { doGetParmValue(idx, value); }
266  { doGetParmValue(idx, value); }
268  { doGetParmValue(idx, value); }
270  { doGetParmValue(idx, value); }
272  { doGetParmValue(idx, value); }
274  { doGetParmValue(idx, value); }
276  { doGetParmValue(idx, value); }
278  { doGetParmValue(idx, value); }
280  { doGetParmValue(idx, value); }
281 
282  template <typename T>
283  void
284  doSetParmValue(exint idx, const T &value)
285  {
286  switch (idx)
287  {
288  case 0:
289  coerceValue(myGroup, value);
290  break;
291  case 1:
292  coerceValue(myPointgrp, value);
293  break;
294  case 2:
295  coerceValue(myUseattrib, value);
296  break;
297  case 3:
298  coerceValue(myAttrib, value);
299  break;
300  case 4:
301  coerceValue(myDisableonmissing, value);
302  break;
303  case 5:
304  coerceValue(myAccumulate, value);
305  break;
306  case 6:
307  coerceValue(myExtrapolate, value);
308  break;
309  case 7:
310  coerceValue(myUsemaxextrapolate, value);
311  break;
312  case 8:
313  coerceValue(myMaxextrapolate, value);
314  break;
315  case 9:
316  coerceValue(myUsemaxextrapolatedist, value);
317  break;
318  case 10:
319  coerceValue(myMaxextrapolatedist, value);
320  break;
321  case 11:
322  coerceValue(myThreshold, value);
323  break;
324  case 12:
325  coerceValue(myBandwidth, value);
326  break;
327  case 13:
328  coerceValue(myCalculationtype, value);
329  break;
330  case 14:
331  coerceValue(myDstpreadd, value);
332  break;
333  case 15:
334  coerceValue(myDstpremul, value);
335  break;
336  case 16:
337  coerceValue(myScalebyvolume, value);
338  break;
339  case 17:
340  coerceValue(mySrcpreadd, value);
341  break;
342  case 18:
343  coerceValue(mySrcpremul, value);
344  break;
345  case 19:
346  coerceValue(myPostadd, value);
347  break;
348  case 20:
349  coerceValue(myPostmul, value);
350  break;
351 
352  }
353  }
354 
355  void setParmValue(exint idx, const exint &value)
356  { doSetParmValue(idx, value); }
357  void setParmValue(exint idx, const fpreal &value)
358  { doSetParmValue(idx, value); }
359  void setParmValue(exint idx, const UT_Vector2D &value)
360  { doSetParmValue(idx, value); }
361  void setParmValue(exint idx, const UT_Vector3D &value)
362  { doSetParmValue(idx, value); }
363  void setParmValue(exint idx, const UT_Vector4D &value)
364  { doSetParmValue(idx, value); }
365  void setParmValue(exint idx, const UT_Matrix2D &value)
366  { doSetParmValue(idx, value); }
367  void setParmValue(exint idx, const UT_Matrix3D &value)
368  { doSetParmValue(idx, value); }
369  void setParmValue(exint idx, const UT_Matrix4D &value)
370  { doSetParmValue(idx, value); }
372  { doSetParmValue(idx, value); }
374  { doSetParmValue(idx, value); }
376  { doSetParmValue(idx, value); }
377 
378  virtual exint getNumParms() const
379  {
380  return 21;
381  }
382 
383  virtual const char *getParmName(exint fieldnum) const
384  {
385  switch (fieldnum)
386  {
387  case 0:
388  return "group";
389  case 1:
390  return "pointgrp";
391  case 2:
392  return "useattrib";
393  case 3:
394  return "attrib";
395  case 4:
396  return "disableonmissing";
397  case 5:
398  return "accumulate";
399  case 6:
400  return "extrapolate";
401  case 7:
402  return "usemaxextrapolate";
403  case 8:
404  return "maxextrapolate";
405  case 9:
406  return "usemaxextrapolatedist";
407  case 10:
408  return "maxextrapolatedist";
409  case 11:
410  return "threshold";
411  case 12:
412  return "bandwidth";
413  case 13:
414  return "calculationtype";
415  case 14:
416  return "dstpreadd";
417  case 15:
418  return "dstpremul";
419  case 16:
420  return "scalebyvolume";
421  case 17:
422  return "srcpreadd";
423  case 18:
424  return "srcpremul";
425  case 19:
426  return "postadd";
427  case 20:
428  return "postmul";
429 
430  }
431  return 0;
432  }
433 
434  virtual ParmType getParmType(exint fieldnum) const
435  {
436  switch (fieldnum)
437  {
438  case 0:
439  return PARM_STRING;
440  case 1:
441  return PARM_STRING;
442  case 2:
443  return PARM_INTEGER;
444  case 3:
445  return PARM_STRING;
446  case 4:
447  return PARM_INTEGER;
448  case 5:
449  return PARM_INTEGER;
450  case 6:
451  return PARM_INTEGER;
452  case 7:
453  return PARM_INTEGER;
454  case 8:
455  return PARM_FLOAT;
456  case 9:
457  return PARM_INTEGER;
458  case 10:
459  return PARM_FLOAT;
460  case 11:
461  return PARM_FLOAT;
462  case 12:
463  return PARM_FLOAT;
464  case 13:
465  return PARM_INTEGER;
466  case 14:
467  return PARM_FLOAT;
468  case 15:
469  return PARM_FLOAT;
470  case 16:
471  return PARM_INTEGER;
472  case 17:
473  return PARM_FLOAT;
474  case 18:
475  return PARM_FLOAT;
476  case 19:
477  return PARM_FLOAT;
478  case 20:
479  return PARM_FLOAT;
480 
481  }
482  return PARM_UNSUPPORTED;
483  }
484 
485  // Boiler plate to load individual types.
486  static void loadData(UT_IStream &is, int64 &v)
487  { is.bread(&v, 1); }
488  static void loadData(UT_IStream &is, bool &v)
489  { int64 iv; is.bread(&iv, 1); v = iv; }
490  static void loadData(UT_IStream &is, fpreal64 &v)
491  { is.bread<fpreal64>(&v, 1); }
492  static void loadData(UT_IStream &is, UT_Vector2D &v)
493  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
494  static void loadData(UT_IStream &is, UT_Vector3D &v)
495  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
496  is.bread<fpreal64>(&v.z(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector4D &v)
498  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
499  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
500  static void loadData(UT_IStream &is, UT_Matrix2D &v)
501  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
502  static void loadData(UT_IStream &is, UT_Matrix3D &v)
503  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
504  static void loadData(UT_IStream &is, UT_Matrix4D &v)
505  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
506  static void loadData(UT_IStream &is, UT_Vector2I &v)
507  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
508  static void loadData(UT_IStream &is, UT_Vector3I &v)
509  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
510  is.bread<int64>(&v.z(), 1); }
511  static void loadData(UT_IStream &is, UT_Vector4I &v)
512  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
513  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
515  { is.bread(v); }
517  { UT_StringHolder rampdata;
518  loadData(is, rampdata);
519  if (rampdata.isstring())
520  {
521  v.reset(new UT_Ramp());
522  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
523  v->load(istr);
524  }
525  else v.reset();
526  }
529  loadData(is, data);
530  if (data.isstring())
531  {
532  // Find the data type.
533  char *colon = UT_StringWrap(data).findChar(':');
534  if (colon)
535  {
536  int typelen = colon - data.buffer();
538  type.strncpy(data.buffer(), typelen);
539  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
540 
541  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
542  }
543  }
544  else v.reset();
545  }
546 
547  static void saveData(std::ostream &os, int64 v)
548  { UTwrite(os, &v); }
549  static void saveData(std::ostream &os, bool v)
550  { int64 iv = v; UTwrite(os, &iv); }
551  static void saveData(std::ostream &os, fpreal64 v)
552  { UTwrite<fpreal64>(os, &v); }
553  static void saveData(std::ostream &os, UT_Vector2D v)
554  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
555  static void saveData(std::ostream &os, UT_Vector3D v)
556  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
557  UTwrite<fpreal64>(os, &v.z()); }
558  static void saveData(std::ostream &os, UT_Vector4D v)
559  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
560  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
561  static void saveData(std::ostream &os, UT_Matrix2D v)
563  static void saveData(std::ostream &os, UT_Matrix3D v)
565  static void saveData(std::ostream &os, UT_Matrix4D v)
567  static void saveData(std::ostream &os, UT_StringHolder s)
568  { UT_StringWrap(s).saveBinary(os); }
569  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
570  { UT_StringHolder result;
571  UT_OStringStream ostr;
572  if (s) s->save(ostr);
573  result = ostr.str();
574  saveData(os, result);
575  }
576  static void saveData(std::ostream &os, PRM_DataItemHandle s)
577  { UT_StringHolder result;
578  UT_OStringStream ostr;
579  if (s)
580  {
581  ostr << s->getDataTypeToken();
582  ostr << ":";
583  s->saveBinary(ostr);
584  }
585  result = ostr.str();
586  saveData(os, result);
587  }
588 
589 
590  void save(std::ostream &os) const
591  {
592  int32 v = version();
593  UTwrite(os, &v);
594  saveData(os, myGroup);
595  saveData(os, myPointgrp);
596  saveData(os, myUseattrib);
597  saveData(os, myAttrib);
598  saveData(os, myDisableonmissing);
599  saveData(os, myAccumulate);
600  saveData(os, myExtrapolate);
601  saveData(os, myUsemaxextrapolate);
602  saveData(os, myMaxextrapolate);
603  saveData(os, myUsemaxextrapolatedist);
604  saveData(os, myMaxextrapolatedist);
605  saveData(os, myThreshold);
606  saveData(os, myBandwidth);
607  saveData(os, myCalculationtype);
608  saveData(os, myDstpreadd);
609  saveData(os, myDstpremul);
610  saveData(os, myScalebyvolume);
611  saveData(os, mySrcpreadd);
612  saveData(os, mySrcpremul);
613  saveData(os, myPostadd);
614  saveData(os, myPostmul);
615 
616  }
617 
618  bool load(UT_IStream &is)
619  {
620  int32 v;
621  is.bread(&v, 1);
622  if (version() != v)
623  {
624  // Fail incompatible versions
625  return false;
626  }
627  loadData(is, myGroup);
628  loadData(is, myPointgrp);
629  loadData(is, myUseattrib);
630  loadData(is, myAttrib);
631  loadData(is, myDisableonmissing);
632  loadData(is, myAccumulate);
633  loadData(is, myExtrapolate);
634  loadData(is, myUsemaxextrapolate);
635  loadData(is, myMaxextrapolate);
636  loadData(is, myUsemaxextrapolatedist);
637  loadData(is, myMaxextrapolatedist);
638  loadData(is, myThreshold);
639  loadData(is, myBandwidth);
640  loadData(is, myCalculationtype);
641  loadData(is, myDstpreadd);
642  loadData(is, myDstpremul);
643  loadData(is, myScalebyvolume);
644  loadData(is, mySrcpreadd);
645  loadData(is, mySrcpremul);
646  loadData(is, myPostadd);
647  loadData(is, myPostmul);
648 
649  return true;
650  }
651 
652  const UT_StringHolder & getGroup() const { return myGroup; }
653  void setGroup(const UT_StringHolder & val) { myGroup = val; }
655  {
656  SOP_Node *thissop = cookparms.getNode();
657  if (!thissop) return getGroup();
658  UT_StringHolder result;
659  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
660  return result;
661  }
662  const UT_StringHolder & getPointgrp() const { return myPointgrp; }
663  void setPointgrp(const UT_StringHolder & val) { myPointgrp = val; }
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getPointgrp();
668  UT_StringHolder result;
669  OP_Utils::evalOpParm(result, thissop, "pointgrp", cookparms.getCookTime(), 0);
670  return result;
671  }
672  bool getUseattrib() const { return myUseattrib; }
673  void setUseattrib(bool val) { myUseattrib = val; }
674  bool opUseattrib(const SOP_NodeVerb::CookParms &cookparms) const
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getUseattrib();
678  bool result;
679  OP_Utils::evalOpParm(result, thissop, "useattrib", cookparms.getCookTime(), 0);
680  return result;
681  }
682  const UT_StringHolder & getAttrib() const { return myAttrib; }
683  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getAttrib();
688  UT_StringHolder result;
689  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
690  return result;
691  }
692  bool getDisableonmissing() const { return myDisableonmissing; }
693  void setDisableonmissing(bool val) { myDisableonmissing = val; }
694  bool opDisableonmissing(const SOP_NodeVerb::CookParms &cookparms) const
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getDisableonmissing();
698  bool result;
699  OP_Utils::evalOpParm(result, thissop, "disableonmissing", cookparms.getCookTime(), 0);
700  return result;
701  }
702  bool getAccumulate() const { return myAccumulate; }
703  void setAccumulate(bool val) { myAccumulate = val; }
704  bool opAccumulate(const SOP_NodeVerb::CookParms &cookparms) const
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getAccumulate();
708  bool result;
709  OP_Utils::evalOpParm(result, thissop, "accumulate", cookparms.getCookTime(), 0);
710  return result;
711  }
712  bool getExtrapolate() const { return myExtrapolate; }
713  void setExtrapolate(bool val) { myExtrapolate = val; }
714  bool opExtrapolate(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getExtrapolate();
718  bool result;
719  OP_Utils::evalOpParm(result, thissop, "extrapolate", cookparms.getCookTime(), 0);
720  return result;
721  }
722  bool getUsemaxextrapolate() const { return myUsemaxextrapolate; }
723  void setUsemaxextrapolate(bool val) { myUsemaxextrapolate = val; }
724  bool opUsemaxextrapolate(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getUsemaxextrapolate();
728  bool result;
729  OP_Utils::evalOpParm(result, thissop, "usemaxextrapolate", cookparms.getCookTime(), 0);
730  return result;
731  }
732  fpreal64 getMaxextrapolate() const { return myMaxextrapolate; }
733  void setMaxextrapolate(fpreal64 val) { myMaxextrapolate = val; }
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getMaxextrapolate();
738  fpreal64 result;
739  OP_Utils::evalOpParm(result, thissop, "maxextrapolate", cookparms.getCookTime(), 0);
740  return result;
741  }
742  bool getUsemaxextrapolatedist() const { return myUsemaxextrapolatedist; }
743  void setUsemaxextrapolatedist(bool val) { myUsemaxextrapolatedist = val; }
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getUsemaxextrapolatedist();
748  bool result;
749  OP_Utils::evalOpParm(result, thissop, "usemaxextrapolatedist", cookparms.getCookTime(), 0);
750  return result;
751  }
752  fpreal64 getMaxextrapolatedist() const { return myMaxextrapolatedist; }
753  void setMaxextrapolatedist(fpreal64 val) { myMaxextrapolatedist = val; }
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getMaxextrapolatedist();
758  fpreal64 result;
759  OP_Utils::evalOpParm(result, thissop, "maxextrapolatedist", cookparms.getCookTime(), 0);
760  return result;
761  }
762  fpreal64 getThreshold() const { return myThreshold; }
763  void setThreshold(fpreal64 val) { myThreshold = val; }
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getThreshold();
768  fpreal64 result;
769  OP_Utils::evalOpParm(result, thissop, "threshold", cookparms.getCookTime(), 0);
770  return result;
771  }
772  fpreal64 getBandwidth() const { return myBandwidth; }
773  void setBandwidth(fpreal64 val) { myBandwidth = val; }
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getBandwidth();
778  fpreal64 result;
779  OP_Utils::evalOpParm(result, thissop, "bandwidth", cookparms.getCookTime(), 0);
780  return result;
781  }
782  Calculationtype getCalculationtype() const { return Calculationtype(myCalculationtype); }
783  void setCalculationtype(Calculationtype val) { myCalculationtype = int64(val); }
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getCalculationtype();
788  int64 result;
789  OP_Utils::evalOpParm(result, thissop, "calculationtype", cookparms.getCookTime(), 0);
790  return Calculationtype(result);
791  }
792  fpreal64 getDstpreadd() const { return myDstpreadd; }
793  void setDstpreadd(fpreal64 val) { myDstpreadd = val; }
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getDstpreadd();
798  fpreal64 result;
799  OP_Utils::evalOpParm(result, thissop, "dstpreadd", cookparms.getCookTime(), 0);
800  return result;
801  }
802  fpreal64 getDstpremul() const { return myDstpremul; }
803  void setDstpremul(fpreal64 val) { myDstpremul = val; }
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getDstpremul();
808  fpreal64 result;
809  OP_Utils::evalOpParm(result, thissop, "dstpremul", cookparms.getCookTime(), 0);
810  return result;
811  }
812  bool getScalebyvolume() const { return myScalebyvolume; }
813  void setScalebyvolume(bool val) { myScalebyvolume = val; }
814  bool opScalebyvolume(const SOP_NodeVerb::CookParms &cookparms) const
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getScalebyvolume();
818  bool result;
819  OP_Utils::evalOpParm(result, thissop, "scalebyvolume", cookparms.getCookTime(), 0);
820  return result;
821  }
822  fpreal64 getSrcpreadd() const { return mySrcpreadd; }
823  void setSrcpreadd(fpreal64 val) { mySrcpreadd = val; }
825  {
826  SOP_Node *thissop = cookparms.getNode();
827  if (!thissop) return getSrcpreadd();
828  fpreal64 result;
829  OP_Utils::evalOpParm(result, thissop, "srcpreadd", cookparms.getCookTime(), 0);
830  return result;
831  }
832  fpreal64 getSrcpremul() const { return mySrcpremul; }
833  void setSrcpremul(fpreal64 val) { mySrcpremul = val; }
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return getSrcpremul();
838  fpreal64 result;
839  OP_Utils::evalOpParm(result, thissop, "srcpremul", cookparms.getCookTime(), 0);
840  return result;
841  }
842  fpreal64 getPostadd() const { return myPostadd; }
843  void setPostadd(fpreal64 val) { myPostadd = val; }
845  {
846  SOP_Node *thissop = cookparms.getNode();
847  if (!thissop) return getPostadd();
848  fpreal64 result;
849  OP_Utils::evalOpParm(result, thissop, "postadd", cookparms.getCookTime(), 0);
850  return result;
851  }
852  fpreal64 getPostmul() const { return myPostmul; }
853  void setPostmul(fpreal64 val) { myPostmul = val; }
855  {
856  SOP_Node *thissop = cookparms.getNode();
857  if (!thissop) return getPostmul();
858  fpreal64 result;
859  OP_Utils::evalOpParm(result, thissop, "postmul", cookparms.getCookTime(), 0);
860  return result;
861  }
862 
863 private:
864  UT_StringHolder myGroup;
865  UT_StringHolder myPointgrp;
866  bool myUseattrib;
867  UT_StringHolder myAttrib;
868  bool myDisableonmissing;
869  bool myAccumulate;
870  bool myExtrapolate;
871  bool myUsemaxextrapolate;
872  fpreal64 myMaxextrapolate;
873  bool myUsemaxextrapolatedist;
874  fpreal64 myMaxextrapolatedist;
875  fpreal64 myThreshold;
876  fpreal64 myBandwidth;
877  int64 myCalculationtype;
878  fpreal64 myDstpreadd;
879  fpreal64 myDstpremul;
880  bool myScalebyvolume;
881  fpreal64 mySrcpreadd;
882  fpreal64 mySrcpremul;
883  fpreal64 myPostadd;
884  fpreal64 myPostmul;
885 
886 };
void setParmValue(exint idx, const UT_Vector4D &value)
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
virtual void copyFrom(const SOP_NodeParms *src)
static void saveData(std::ostream &os, int64 v)
const UT_StringHolder & getPointgrp() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
fpreal64 opMaxextrapolatedist(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setParmValue(exint idx, const UT_Matrix4D &value)
static void loadData(UT_IStream &is, bool &v)
void setParmValue(exint idx, const UT_Vector3D &value)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void setCalculationtype(Calculationtype val)
fpreal getTime() const
Definition: OP_Context.h:60
virtual void loadFromOpSubclass(const LoadParms &loadparms)
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_StringHolder & getGroup() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void getParmValue(exint idx, UT_StringHolder &value) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
bool opDisableonmissing(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void doSetParmValue(exint idx, const T &value)
void getParmValue(exint idx, fpreal &value) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getAttrib() const
void setPointgrp(const UT_StringHolder &val)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const SOP_VolumeFromAttribParms &src) const
virtual const char * getParmName(exint fieldnum) const
bool opScalebyvolume(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
fpreal64 opBandwidth(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
void getParmValue(exint idx, PRM_DataItemHandle &value) const
UT_StringHolder opPointgrp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
Calculationtype getCalculationtype() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_Vector2D &value) const
void setParmValue(exint idx, const UT_Matrix3D &value)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
void setParmValue(exint idx, const UT_Vector2D &value)
int64 exint
Definition: SYS_Types.h:116
void setParmValue(exint idx, const fpreal &value)
static void loadData(UT_IStream &is, fpreal64 &v)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
fpreal64 opSrcpremul(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
bool opUsemaxextrapolatedist(const SOP_NodeVerb::CookParms &cookparms) const
virtual ParmType getParmType(exint fieldnum) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
bool opUseattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix3D &value) const
static void saveData(std::ostream &os, UT_Vector4D v)
GLboolean * data
Definition: glcorearb.h:130
bool opExtrapolate(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
int int32
Definition: SYS_Types.h:35
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
T & y(void)
Definition: UT_Vector4.h:377
Calculationtype opCalculationtype(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
fpreal64 opPostadd(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opDstpremul(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
void setParmValue(exint idx, const UT_StringHolder &value)
double fpreal
Definition: SYS_Types.h:270
void setParmValue(exint idx, const UT_Matrix2D &value)
fpreal64 opMaxextrapolate(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(exint idx, T &value) const
bool operator!=(const SOP_VolumeFromAttribParms &src) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
fpreal64 opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void saveData(std::ostream &os, UT_Vector3D v)
#define SOP_API
Definition: SOP_API.h:10
void setAttrib(const UT_StringHolder &val)
fpreal64 opSrcpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
T & y(void)
Definition: UT_Vector2.h:287
GLboolean r
Definition: glcorearb.h:1221
bool opUsemaxextrapolate(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
void getParmValue(exint idx, UT_Matrix4D &value) const
T & w(void)
Definition: UT_Vector4.h:381
fpreal64 opPostmul(const SOP_NodeVerb::CookParms &cookparms) const
bool opAccumulate(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void setParmValue(exint idx, const exint &value)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1792
void getParmValue(exint idx, UT_Vector4D &value) const
void getParmValue(exint idx, UT_Vector3D &value) const