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