HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VolumeFeather.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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_VolumeFeatherEnums
24 {
25  enum class Decaymode
26  {
27  DECAY = 0,
28  DECAYVOXEL,
29  UNITDIST,
30  UNITVOXEL,
31  ANGLE
32  };
33 
35  getToken(Decaymode enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Decaymode::DECAY: return "decay"_sh;
40  case Decaymode::DECAYVOXEL: return "decayvoxel"_sh;
41  case Decaymode::UNITDIST: return "unitdist"_sh;
42  case Decaymode::UNITVOXEL: return "unitvoxel"_sh;
43  case Decaymode::ANGLE: return "angle"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Bordertype
49  {
50  NONE = 0,
51  CONSTANT,
52  REPEAT,
53  STREAK
54  };
55 
57  getToken(Bordertype enum_value)
58  {
59  using namespace UT::Literal;
60  switch (enum_value) {
61  case Bordertype::NONE: return "none"_sh;
62  case Bordertype::CONSTANT: return "constant"_sh;
63  case Bordertype::REPEAT: return "repeat"_sh;
64  case Bordertype::STREAK: return "streak"_sh;
65  default: UT_ASSERT(false); return ""_sh;
66  }
67  }
68 
69 }
70 
71 
73 {
74 public:
75  static int version() { return 1; }
76 
78  {
79  myGroup = ""_UTsh;
80  myDecaymode = 0;
81  myDecay = 1;
82  myDecayvoxel = 0.1;
83  myUnitdist = 1;
84  myUnitvoxel = 1;
85  myAngle = 45;
86  myOutside = false;
87  myDetect2d = true;
88  myBordertype = 0;
89  myBorderval = 0;
90 
91  }
92 
93  explicit SOP_VolumeFeatherParms(const SOP_VolumeFeatherParms &) = default;
95  SOP_VolumeFeatherParms(SOP_VolumeFeatherParms &&) noexcept = default;
96  SOP_VolumeFeatherParms &operator=(SOP_VolumeFeatherParms &&) noexcept = default;
97 
98  ~SOP_VolumeFeatherParms() override {}
99 
101  {
102  if (myGroup != src.myGroup) return false;
103  if (myDecaymode != src.myDecaymode) return false;
104  if (myDecay != src.myDecay) return false;
105  if (myDecayvoxel != src.myDecayvoxel) return false;
106  if (myUnitdist != src.myUnitdist) return false;
107  if (myUnitvoxel != src.myUnitvoxel) return false;
108  if (myAngle != src.myAngle) return false;
109  if (myOutside != src.myOutside) return false;
110  if (myDetect2d != src.myDetect2d) return false;
111  if (myBordertype != src.myBordertype) return false;
112  if (myBorderval != src.myBorderval) return false;
113 
114  return true;
115  }
117  {
118  return !operator==(src);
119  }
122 
123 
124 
125  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
126  {
127  myGroup = ""_UTsh;
128  if (true)
129  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
130  myDecaymode = 0;
131  if (true)
132  graph->evalOpParm(myDecaymode, nodeidx, "decaymode", time, 0);
133  myDecay = 1;
134  if (true && ( (true&&!(((int64(getDecaymode())!=0)))) ) )
135  graph->evalOpParm(myDecay, nodeidx, "decay", time, 0);
136  myDecayvoxel = 0.1;
137  if (true && ( (true&&!(((int64(getDecaymode())!=1)))) ) )
138  graph->evalOpParm(myDecayvoxel, nodeidx, "decayvoxel", time, 0);
139  myUnitdist = 1;
140  if (true && ( (true&&!(((int64(getDecaymode())!=2)))) ) )
141  graph->evalOpParm(myUnitdist, nodeidx, "unitdist", time, 0);
142  myUnitvoxel = 1;
143  if (true && ( (true&&!(((int64(getDecaymode())!=3)))) ) )
144  graph->evalOpParm(myUnitvoxel, nodeidx, "unitvoxel", time, 0);
145  myAngle = 45;
146  if (true && ( (true&&!(((int64(getDecaymode())!=4)))) ) )
147  graph->evalOpParm(myAngle, nodeidx, "angle", time, 0);
148  myOutside = false;
149  if (true)
150  graph->evalOpParm(myOutside, nodeidx, "outside", time, 0);
151  myDetect2d = true;
152  if (true)
153  graph->evalOpParm(myDetect2d, nodeidx, "detect2d", time, 0);
154  myBordertype = 0;
155  if (true)
156  graph->evalOpParm(myBordertype, nodeidx, "bordertype", time, 0);
157  myBorderval = 0;
158  if (true && ( (true&&!(((int64(getBordertype())==0)))) ) )
159  graph->evalOpParm(myBorderval, nodeidx, "borderval", time, 0);
160 
161  }
162 
163 
164  void loadFromOpSubclass(const LoadParms &loadparms) override
165  {
166  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
167  }
168 
169 
170  void copyFrom(const OP_NodeParms *src) override
171  {
172  *this = *((const SOP_VolumeFeatherParms *)src);
173  }
174 
175  template <typename T>
176  void
177  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
178  {
179  if (idx.size() < 1)
180  return;
181  UT_ASSERT(idx.size() == instance.size()+1);
182  if (idx.size() != instance.size()+1)
183  return;
184  switch (idx[0])
185  {
186  case 0:
187  coerceValue(value, myGroup);
188  break;
189  case 1:
190  coerceValue(value, myDecaymode);
191  break;
192  case 2:
193  coerceValue(value, myDecay);
194  break;
195  case 3:
196  coerceValue(value, myDecayvoxel);
197  break;
198  case 4:
199  coerceValue(value, myUnitdist);
200  break;
201  case 5:
202  coerceValue(value, myUnitvoxel);
203  break;
204  case 6:
205  coerceValue(value, myAngle);
206  break;
207  case 7:
208  coerceValue(value, myOutside);
209  break;
210  case 8:
211  coerceValue(value, myDetect2d);
212  break;
213  case 9:
214  coerceValue(value, myBordertype);
215  break;
216  case 10:
217  coerceValue(value, myBorderval);
218  break;
219 
220  }
221  }
222 
223  bool isParmColorRamp(exint idx) const override
224  {
225  switch (idx)
226  {
227 
228  }
229  return false;
230  }
231 
232  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
253  { doGetParmValue(idx, instance, value); }
254 
255  template <typename T>
256  void
257  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
258  {
259  if (idx.size() < 1)
260  return;
261  UT_ASSERT(idx.size() == instance.size()+1);
262  if (idx.size() != instance.size()+1)
263  return;
264  switch (idx[0])
265  {
266  case 0:
267  coerceValue(myGroup, ( ( value ) ));
268  break;
269  case 1:
270  coerceValue(myDecaymode, clampMinValue(0, clampMaxValue(4, value ) ));
271  break;
272  case 2:
273  coerceValue(myDecay, ( ( value ) ));
274  break;
275  case 3:
276  coerceValue(myDecayvoxel, ( ( value ) ));
277  break;
278  case 4:
279  coerceValue(myUnitdist, ( ( value ) ));
280  break;
281  case 5:
282  coerceValue(myUnitvoxel, ( ( value ) ));
283  break;
284  case 6:
285  coerceValue(myAngle, clampMinValue(0, clampMaxValue(90, value ) ));
286  break;
287  case 7:
288  coerceValue(myOutside, ( ( value ) ));
289  break;
290  case 8:
291  coerceValue(myDetect2d, ( ( value ) ));
292  break;
293  case 9:
294  coerceValue(myBordertype, clampMinValue(0, clampMaxValue(3, value ) ));
295  break;
296  case 10:
297  coerceValue(myBorderval, ( ( value ) ));
298  break;
299 
300  }
301  }
302 
303  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
324  { doSetParmValue(idx, instance, value); }
325 
326  exint getNestNumParms(TempIndex idx) const override
327  {
328  if (idx.size() == 0)
329  return 11;
330  switch (idx[0])
331  {
332 
333  }
334  // Invalid
335  return 0;
336  }
337 
338  const char *getNestParmName(TempIndex fieldnum) const override
339  {
340  if (fieldnum.size() < 1)
341  return 0;
342  switch (fieldnum[0])
343  {
344  case 0:
345  return "group";
346  case 1:
347  return "decaymode";
348  case 2:
349  return "decay";
350  case 3:
351  return "decayvoxel";
352  case 4:
353  return "unitdist";
354  case 5:
355  return "unitvoxel";
356  case 6:
357  return "angle";
358  case 7:
359  return "outside";
360  case 8:
361  return "detect2d";
362  case 9:
363  return "bordertype";
364  case 10:
365  return "borderval";
366 
367  }
368  return 0;
369  }
370 
371  ParmType getNestParmType(TempIndex fieldnum) const override
372  {
373  if (fieldnum.size() < 1)
374  return PARM_UNSUPPORTED;
375  switch (fieldnum[0])
376  {
377  case 0:
378  return PARM_STRING;
379  case 1:
380  return PARM_INTEGER;
381  case 2:
382  return PARM_FLOAT;
383  case 3:
384  return PARM_FLOAT;
385  case 4:
386  return PARM_FLOAT;
387  case 5:
388  return PARM_FLOAT;
389  case 6:
390  return PARM_FLOAT;
391  case 7:
392  return PARM_INTEGER;
393  case 8:
394  return PARM_INTEGER;
395  case 9:
396  return PARM_INTEGER;
397  case 10:
398  return PARM_FLOAT;
399 
400  }
401  return PARM_UNSUPPORTED;
402  }
403 
404  // Boiler plate to load individual types.
405  static void loadData(UT_IStream &is, int64 &v)
406  { is.bread(&v, 1); }
407  static void loadData(UT_IStream &is, bool &v)
408  { int64 iv; is.bread(&iv, 1); v = iv; }
409  static void loadData(UT_IStream &is, fpreal64 &v)
410  { is.bread<fpreal64>(&v, 1); }
411  static void loadData(UT_IStream &is, UT_Vector2D &v)
412  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
413  static void loadData(UT_IStream &is, UT_Vector3D &v)
414  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
415  is.bread<fpreal64>(&v.z(), 1); }
416  static void loadData(UT_IStream &is, UT_Vector4D &v)
417  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
418  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
419  static void loadData(UT_IStream &is, UT_Matrix2D &v)
420  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
421  static void loadData(UT_IStream &is, UT_Matrix3D &v)
422  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
423  static void loadData(UT_IStream &is, UT_Matrix4D &v)
424  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
425  static void loadData(UT_IStream &is, UT_Vector2I &v)
426  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
427  static void loadData(UT_IStream &is, UT_Vector3I &v)
428  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
429  is.bread<int64>(&v.z(), 1); }
430  static void loadData(UT_IStream &is, UT_Vector4I &v)
431  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
432  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
434  { is.bread(v); }
436  { UT_StringHolder rampdata;
437  loadData(is, rampdata);
438  if (rampdata.isstring())
439  {
440  v.reset(new UT_Ramp());
441  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
442  v->load(istr);
443  }
444  else v.reset();
445  }
448  loadData(is, data);
449  if (data.isstring())
450  {
451  // Find the data type.
452  const char *colon = UT_StringWrap(data).findChar(':');
453  if (colon)
454  {
455  int typelen = colon - data.buffer();
457  type.strncpy(data.buffer(), typelen);
458  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
459 
460  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
461  }
462  }
463  else v.reset();
464  }
465 
466  static void saveData(std::ostream &os, int64 v)
467  { UTwrite(os, &v); }
468  static void saveData(std::ostream &os, bool v)
469  { int64 iv = v; UTwrite(os, &iv); }
470  static void saveData(std::ostream &os, fpreal64 v)
471  { UTwrite<fpreal64>(os, &v); }
472  static void saveData(std::ostream &os, UT_Vector2D v)
473  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
474  static void saveData(std::ostream &os, UT_Vector3D v)
475  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
476  UTwrite<fpreal64>(os, &v.z()); }
477  static void saveData(std::ostream &os, UT_Vector4D v)
478  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
479  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
480  static void saveData(std::ostream &os, UT_Matrix2D v)
482  static void saveData(std::ostream &os, UT_Matrix3D v)
484  static void saveData(std::ostream &os, UT_Matrix4D v)
486  static void saveData(std::ostream &os, UT_StringHolder s)
487  { UT_StringWrap(s).saveBinary(os); }
488  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
490  UT_OStringStream ostr;
491  if (s) s->save(ostr);
492  result = ostr.str();
493  saveData(os, result);
494  }
495  static void saveData(std::ostream &os, PRM_DataItemHandle s)
497  UT_OStringStream ostr;
498  if (s)
499  {
500  ostr << s->getDataTypeToken();
501  ostr << ":";
502  s->saveBinary(ostr);
503  }
504  result = ostr.str();
505  saveData(os, result);
506  }
507 
508 
509  void save(std::ostream &os) const
510  {
511  int32 v = version();
512  UTwrite(os, &v);
513  saveData(os, myGroup);
514  saveData(os, myDecaymode);
515  saveData(os, myDecay);
516  saveData(os, myDecayvoxel);
517  saveData(os, myUnitdist);
518  saveData(os, myUnitvoxel);
519  saveData(os, myAngle);
520  saveData(os, myOutside);
521  saveData(os, myDetect2d);
522  saveData(os, myBordertype);
523  saveData(os, myBorderval);
524 
525  }
526 
527  bool load(UT_IStream &is)
528  {
529  int32 v;
530  is.bread(&v, 1);
531  if (version() != v)
532  {
533  // Fail incompatible versions
534  return false;
535  }
536  loadData(is, myGroup);
537  loadData(is, myDecaymode);
538  loadData(is, myDecay);
539  loadData(is, myDecayvoxel);
540  loadData(is, myUnitdist);
541  loadData(is, myUnitvoxel);
542  loadData(is, myAngle);
543  loadData(is, myOutside);
544  loadData(is, myDetect2d);
545  loadData(is, myBordertype);
546  loadData(is, myBorderval);
547 
548  return true;
549  }
550 
551  const UT_StringHolder & getGroup() const { return myGroup; }
552  void setGroup(const UT_StringHolder & val) { myGroup = val; }
554  {
555  SOP_Node *thissop = cookparms.getNode();
556  if (!thissop) return getGroup();
558  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
559  return result;
560  }
561  Decaymode getDecaymode() const { return Decaymode(myDecaymode); }
562  void setDecaymode(Decaymode val) { myDecaymode = int64(val); }
564  {
565  SOP_Node *thissop = cookparms.getNode();
566  if (!thissop) return getDecaymode();
567  int64 result;
568  OP_Utils::evalOpParm(result, thissop, "decaymode", cookparms.getCookTime(), 0);
569  return Decaymode(result);
570  }
571  fpreal64 getDecay() const { return myDecay; }
572  void setDecay(fpreal64 val) { myDecay = val; }
573  fpreal64 opDecay(const SOP_NodeVerb::CookParms &cookparms) const
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getDecay();
578  OP_Utils::evalOpParm(result, thissop, "decay", cookparms.getCookTime(), 0);
579  return result;
580  }
581  fpreal64 getDecayvoxel() const { return myDecayvoxel; }
582  void setDecayvoxel(fpreal64 val) { myDecayvoxel = val; }
584  {
585  SOP_Node *thissop = cookparms.getNode();
586  if (!thissop) return getDecayvoxel();
588  OP_Utils::evalOpParm(result, thissop, "decayvoxel", cookparms.getCookTime(), 0);
589  return result;
590  }
591  fpreal64 getUnitdist() const { return myUnitdist; }
592  void setUnitdist(fpreal64 val) { myUnitdist = val; }
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getUnitdist();
598  OP_Utils::evalOpParm(result, thissop, "unitdist", cookparms.getCookTime(), 0);
599  return result;
600  }
601  fpreal64 getUnitvoxel() const { return myUnitvoxel; }
602  void setUnitvoxel(fpreal64 val) { myUnitvoxel = val; }
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getUnitvoxel();
608  OP_Utils::evalOpParm(result, thissop, "unitvoxel", cookparms.getCookTime(), 0);
609  return result;
610  }
611  fpreal64 getAngle() const { return myAngle; }
612  void setAngle(fpreal64 val) { myAngle = val; }
613  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getAngle();
618  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
619  return result;
620  }
621  bool getOutside() const { return myOutside; }
622  void setOutside(bool val) { myOutside = val; }
623  bool opOutside(const SOP_NodeVerb::CookParms &cookparms) const
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getOutside();
627  bool result;
628  OP_Utils::evalOpParm(result, thissop, "outside", cookparms.getCookTime(), 0);
629  return result;
630  }
631  bool getDetect2d() const { return myDetect2d; }
632  void setDetect2d(bool val) { myDetect2d = val; }
633  bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getDetect2d();
637  bool result;
638  OP_Utils::evalOpParm(result, thissop, "detect2d", cookparms.getCookTime(), 0);
639  return result;
640  }
641  Bordertype getBordertype() const { return Bordertype(myBordertype); }
642  void setBordertype(Bordertype val) { myBordertype = int64(val); }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getBordertype();
647  int64 result;
648  OP_Utils::evalOpParm(result, thissop, "bordertype", cookparms.getCookTime(), 0);
649  return Bordertype(result);
650  }
651  fpreal64 getBorderval() const { return myBorderval; }
652  void setBorderval(fpreal64 val) { myBorderval = val; }
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getBorderval();
658  OP_Utils::evalOpParm(result, thissop, "borderval", cookparms.getCookTime(), 0);
659  return result;
660  }
661 
662 private:
663  UT_StringHolder myGroup;
664  int64 myDecaymode;
665  fpreal64 myDecay;
666  fpreal64 myDecayvoxel;
667  fpreal64 myUnitdist;
668  fpreal64 myUnitvoxel;
669  fpreal64 myAngle;
670  bool myOutside;
671  bool myDetect2d;
672  int64 myBordertype;
673  fpreal64 myBorderval;
674 
675 };
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, bool v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opUnitdist(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opUnitvoxel(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool operator!=(const SOP_VolumeFeatherParms &src) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void copyFrom(const OP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
ParmType getNestParmType(TempIndex fieldnum) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GLdouble s
Definition: glad.h:3009
fpreal64 opDecay(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opBorderval(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
**But if you need a result
Definition: thread.h:613
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool operator==(const SOP_VolumeFeatherParms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
bool opOutside(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
Bordertype getBordertype() const
exint length() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setBordertype(Bordertype val)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, int64 v)
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
exint getNestNumParms(TempIndex idx) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const char * getNestParmName(TempIndex fieldnum) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
GT_API const UT_StringHolder version
bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
fpreal64 opDecayvoxel(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setDecaymode(Decaymode val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
Bordertype opBordertype(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setDecayvoxel(fpreal64 val)
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
type
Definition: core.h:1059
Decaymode opDecaymode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Decaymode enum_value)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663