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