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 <OP/OP_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 
115  if (baseGetSignature() != src.baseGetSignature()) return false;
116 
117  return true;
118  }
120  {
121  return !operator==(src);
122  }
125 
126 
127 
128  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
129  {
130  myGroup = ""_UTsh;
131  if (true)
132  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
133  myDecaymode = 0;
134  if (true)
135  graph->evalOpParm(myDecaymode, nodeidx, "decaymode", time, graph->isDirect()?nullptr:depnode);
136  myDecay = 1;
137  if (true && ( (true&&!(((int64(getDecaymode())!=0)))) ) )
138  graph->evalOpParm(myDecay, nodeidx, "decay", time, graph->isDirect()?nullptr:depnode);
139  myDecayvoxel = 0.1;
140  if (true && ( (true&&!(((int64(getDecaymode())!=1)))) ) )
141  graph->evalOpParm(myDecayvoxel, nodeidx, "decayvoxel", time, graph->isDirect()?nullptr:depnode);
142  myUnitdist = 1;
143  if (true && ( (true&&!(((int64(getDecaymode())!=2)))) ) )
144  graph->evalOpParm(myUnitdist, nodeidx, "unitdist", time, graph->isDirect()?nullptr:depnode);
145  myUnitvoxel = 1;
146  if (true && ( (true&&!(((int64(getDecaymode())!=3)))) ) )
147  graph->evalOpParm(myUnitvoxel, nodeidx, "unitvoxel", time, graph->isDirect()?nullptr:depnode);
148  myAngle = 45;
149  if (true && ( (true&&!(((int64(getDecaymode())!=4)))) ) )
150  graph->evalOpParm(myAngle, nodeidx, "angle", time, graph->isDirect()?nullptr:depnode);
151  myOutside = false;
152  if (true)
153  graph->evalOpParm(myOutside, nodeidx, "outside", time, graph->isDirect()?nullptr:depnode);
154  myDetect2d = true;
155  if (true)
156  graph->evalOpParm(myDetect2d, nodeidx, "detect2d", time, graph->isDirect()?nullptr:depnode);
157  myBordertype = 0;
158  if (true)
159  graph->evalOpParm(myBordertype, nodeidx, "bordertype", time, graph->isDirect()?nullptr:depnode);
160  myBorderval = 0;
161  if (true && ( (true&&!(((int64(getBordertype())==0)))) ) )
162  graph->evalOpParm(myBorderval, nodeidx, "borderval", time, graph->isDirect()?nullptr:depnode);
163 
164  }
165 
166 
167  void loadFromOpSubclass(const LoadParms &loadparms) override
168  {
169  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
170  }
171 
172 
173  void copyFrom(const OP_NodeParms *src) override
174  {
175  *this = *((const SOP_VolumeFeatherParms *)src);
176  }
177 
178  template <typename T>
179  void
180  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
181  {
182  if (idx.size() < 1)
183  return;
184  UT_ASSERT(idx.size() == instance.size()+1);
185  if (idx.size() != instance.size()+1)
186  return;
187  switch (idx[0])
188  {
189  case 0:
190  coerceValue(value, myGroup);
191  break;
192  case 1:
193  coerceValue(value, myDecaymode);
194  break;
195  case 2:
196  coerceValue(value, myDecay);
197  break;
198  case 3:
199  coerceValue(value, myDecayvoxel);
200  break;
201  case 4:
202  coerceValue(value, myUnitdist);
203  break;
204  case 5:
205  coerceValue(value, myUnitvoxel);
206  break;
207  case 6:
208  coerceValue(value, myAngle);
209  break;
210  case 7:
211  coerceValue(value, myOutside);
212  break;
213  case 8:
214  coerceValue(value, myDetect2d);
215  break;
216  case 9:
217  coerceValue(value, myBordertype);
218  break;
219  case 10:
220  coerceValue(value, myBorderval);
221  break;
222 
223  }
224  }
225 
226  bool isParmColorRamp(exint idx) const override
227  {
228  switch (idx)
229  {
230 
231  }
232  return false;
233  }
234 
235  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
246  { doGetParmValue(idx, instance, value); }
247  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
256  { doGetParmValue(idx, instance, value); }
257 
258  template <typename T>
259  void
260  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
261  {
262  if (idx.size() < 1)
263  return;
264  UT_ASSERT(idx.size() == instance.size()+1);
265  if (idx.size() != instance.size()+1)
266  return;
267  switch (idx[0])
268  {
269  case 0:
270  coerceValue(myGroup, ( ( value ) ));
271  break;
272  case 1:
273  coerceValue(myDecaymode, clampMinValue(0, clampMaxValue(4, value ) ));
274  break;
275  case 2:
276  coerceValue(myDecay, ( ( value ) ));
277  break;
278  case 3:
279  coerceValue(myDecayvoxel, ( ( value ) ));
280  break;
281  case 4:
282  coerceValue(myUnitdist, ( ( value ) ));
283  break;
284  case 5:
285  coerceValue(myUnitvoxel, ( ( value ) ));
286  break;
287  case 6:
288  coerceValue(myAngle, clampMinValue(0, clampMaxValue(90, value ) ));
289  break;
290  case 7:
291  coerceValue(myOutside, ( ( value ) ));
292  break;
293  case 8:
294  coerceValue(myDetect2d, ( ( value ) ));
295  break;
296  case 9:
297  coerceValue(myBordertype, clampMinValue(0, clampMaxValue(3, value ) ));
298  break;
299  case 10:
300  coerceValue(myBorderval, ( ( value ) ));
301  break;
302 
303  }
304  }
305 
306  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
327  { doSetParmValue(idx, instance, value); }
328 
329  exint getNestNumParms(TempIndex idx) const override
330  {
331  if (idx.size() == 0)
332  return 11;
333  switch (idx[0])
334  {
335 
336  }
337  // Invalid
338  return 0;
339  }
340 
341  const char *getNestParmName(TempIndex fieldnum) const override
342  {
343  if (fieldnum.size() < 1)
344  return 0;
345  switch (fieldnum[0])
346  {
347  case 0:
348  return "group";
349  case 1:
350  return "decaymode";
351  case 2:
352  return "decay";
353  case 3:
354  return "decayvoxel";
355  case 4:
356  return "unitdist";
357  case 5:
358  return "unitvoxel";
359  case 6:
360  return "angle";
361  case 7:
362  return "outside";
363  case 8:
364  return "detect2d";
365  case 9:
366  return "bordertype";
367  case 10:
368  return "borderval";
369 
370  }
371  return 0;
372  }
373 
374  ParmType getNestParmType(TempIndex fieldnum) const override
375  {
376  if (fieldnum.size() < 1)
377  return PARM_UNSUPPORTED;
378  switch (fieldnum[0])
379  {
380  case 0:
381  return PARM_STRING;
382  case 1:
383  return PARM_INTEGER;
384  case 2:
385  return PARM_FLOAT;
386  case 3:
387  return PARM_FLOAT;
388  case 4:
389  return PARM_FLOAT;
390  case 5:
391  return PARM_FLOAT;
392  case 6:
393  return PARM_FLOAT;
394  case 7:
395  return PARM_INTEGER;
396  case 8:
397  return PARM_INTEGER;
398  case 9:
399  return PARM_INTEGER;
400  case 10:
401  return PARM_FLOAT;
402 
403  }
404  return PARM_UNSUPPORTED;
405  }
406 
407  // Boiler plate to load individual types.
408  static void loadData(UT_IStream &is, int64 &v)
409  { is.bread(&v, 1); }
410  static void loadData(UT_IStream &is, bool &v)
411  { int64 iv; is.bread(&iv, 1); v = iv; }
412  static void loadData(UT_IStream &is, fpreal64 &v)
413  { is.bread<fpreal64>(&v, 1); }
414  static void loadData(UT_IStream &is, UT_Vector2D &v)
415  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
416  static void loadData(UT_IStream &is, UT_Vector3D &v)
417  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
418  is.bread<fpreal64>(&v.z(), 1); }
419  static void loadData(UT_IStream &is, UT_Vector4D &v)
420  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
421  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
422  static void loadData(UT_IStream &is, UT_Matrix2D &v)
423  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
424  static void loadData(UT_IStream &is, UT_Matrix3D &v)
425  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
426  static void loadData(UT_IStream &is, UT_Matrix4D &v)
427  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
428  static void loadData(UT_IStream &is, UT_Vector2I &v)
429  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
430  static void loadData(UT_IStream &is, UT_Vector3I &v)
431  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
432  is.bread<int64>(&v.z(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector4I &v)
434  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
435  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
437  { is.bread(v); }
439  { UT_StringHolder rampdata;
440  loadData(is, rampdata);
441  if (rampdata.isstring())
442  {
443  v.reset(new UT_Ramp());
444  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
445  v->load(istr);
446  }
447  else v.reset();
448  }
451  loadData(is, data);
452  if (data.isstring())
453  {
454  // Find the data type.
455  const char *colon = UT_StringWrap(data).findChar(':');
456  if (colon)
457  {
458  int typelen = colon - data.buffer();
460  type.strncpy(data.buffer(), typelen);
461  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
462 
463  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
464  }
465  }
466  else v.reset();
467  }
468 
469  static void saveData(std::ostream &os, int64 v)
470  { UTwrite(os, &v); }
471  static void saveData(std::ostream &os, bool v)
472  { int64 iv = v; UTwrite(os, &iv); }
473  static void saveData(std::ostream &os, fpreal64 v)
474  { UTwrite<fpreal64>(os, &v); }
475  static void saveData(std::ostream &os, UT_Vector2D v)
476  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
477  static void saveData(std::ostream &os, UT_Vector3D v)
478  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
479  UTwrite<fpreal64>(os, &v.z()); }
480  static void saveData(std::ostream &os, UT_Vector4D v)
481  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
482  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
483  static void saveData(std::ostream &os, UT_Matrix2D v)
485  static void saveData(std::ostream &os, UT_Matrix3D v)
487  static void saveData(std::ostream &os, UT_Matrix4D v)
489  static void saveData(std::ostream &os, UT_StringHolder s)
490  { UT_StringWrap(s).saveBinary(os); }
491  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
493  UT_OStringStream ostr;
494  if (s) s->save(ostr);
495  result = ostr.str();
496  saveData(os, result);
497  }
498  static void saveData(std::ostream &os, PRM_DataItemHandle s)
500  UT_OStringStream ostr;
501  if (s)
502  {
503  ostr << s->getDataTypeToken();
504  ostr << ":";
505  s->saveBinary(ostr);
506  }
507  result = ostr.str();
508  saveData(os, result);
509  }
510 
511 
512  void save(std::ostream &os) const
513  {
514  int32 v = version();
515  UTwrite(os, &v);
516  saveData(os, myGroup);
517  saveData(os, myDecaymode);
518  saveData(os, myDecay);
519  saveData(os, myDecayvoxel);
520  saveData(os, myUnitdist);
521  saveData(os, myUnitvoxel);
522  saveData(os, myAngle);
523  saveData(os, myOutside);
524  saveData(os, myDetect2d);
525  saveData(os, myBordertype);
526  saveData(os, myBorderval);
527 
528  }
529 
530  bool load(UT_IStream &is)
531  {
532  int32 v;
533  is.bread(&v, 1);
534  if (version() != v)
535  {
536  // Fail incompatible versions
537  return false;
538  }
539  loadData(is, myGroup);
540  loadData(is, myDecaymode);
541  loadData(is, myDecay);
542  loadData(is, myDecayvoxel);
543  loadData(is, myUnitdist);
544  loadData(is, myUnitvoxel);
545  loadData(is, myAngle);
546  loadData(is, myOutside);
547  loadData(is, myDetect2d);
548  loadData(is, myBordertype);
549  loadData(is, myBorderval);
550 
551  return true;
552  }
553 
554  const UT_StringHolder & getGroup() const { return myGroup; }
555  void setGroup(const UT_StringHolder & val) { myGroup = val; }
557  {
558  SOP_Node *thissop = cookparms.getNode();
559  if (!thissop) return getGroup();
561  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
562  return result;
563  }
564  Decaymode getDecaymode() const { return Decaymode(myDecaymode); }
565  void setDecaymode(Decaymode val) { myDecaymode = int64(val); }
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getDecaymode();
570  int64 result;
571  OP_Utils::evalOpParm(result, thissop, "decaymode", cookparms.getCookTime(), 0);
572  return Decaymode(result);
573  }
574  fpreal64 getDecay() const { return myDecay; }
575  void setDecay(fpreal64 val) { myDecay = val; }
576  fpreal64 opDecay(const SOP_NodeVerb::CookParms &cookparms) const
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getDecay();
581  OP_Utils::evalOpParm(result, thissop, "decay", cookparms.getCookTime(), 0);
582  return result;
583  }
584  fpreal64 getDecayvoxel() const { return myDecayvoxel; }
585  void setDecayvoxel(fpreal64 val) { myDecayvoxel = val; }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getDecayvoxel();
591  OP_Utils::evalOpParm(result, thissop, "decayvoxel", cookparms.getCookTime(), 0);
592  return result;
593  }
594  fpreal64 getUnitdist() const { return myUnitdist; }
595  void setUnitdist(fpreal64 val) { myUnitdist = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getUnitdist();
601  OP_Utils::evalOpParm(result, thissop, "unitdist", cookparms.getCookTime(), 0);
602  return result;
603  }
604  fpreal64 getUnitvoxel() const { return myUnitvoxel; }
605  void setUnitvoxel(fpreal64 val) { myUnitvoxel = val; }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getUnitvoxel();
611  OP_Utils::evalOpParm(result, thissop, "unitvoxel", cookparms.getCookTime(), 0);
612  return result;
613  }
614  fpreal64 getAngle() const { return myAngle; }
615  void setAngle(fpreal64 val) { myAngle = val; }
616  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getAngle();
621  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
622  return result;
623  }
624  bool getOutside() const { return myOutside; }
625  void setOutside(bool val) { myOutside = val; }
626  bool opOutside(const SOP_NodeVerb::CookParms &cookparms) const
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getOutside();
630  bool result;
631  OP_Utils::evalOpParm(result, thissop, "outside", cookparms.getCookTime(), 0);
632  return result;
633  }
634  bool getDetect2d() const { return myDetect2d; }
635  void setDetect2d(bool val) { myDetect2d = val; }
636  bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getDetect2d();
640  bool result;
641  OP_Utils::evalOpParm(result, thissop, "detect2d", cookparms.getCookTime(), 0);
642  return result;
643  }
644  Bordertype getBordertype() const { return Bordertype(myBordertype); }
645  void setBordertype(Bordertype val) { myBordertype = int64(val); }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getBordertype();
650  int64 result;
651  OP_Utils::evalOpParm(result, thissop, "bordertype", cookparms.getCookTime(), 0);
652  return Bordertype(result);
653  }
654  fpreal64 getBorderval() const { return myBorderval; }
655  void setBorderval(fpreal64 val) { myBorderval = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getBorderval();
661  OP_Utils::evalOpParm(result, thissop, "borderval", cookparms.getCookTime(), 0);
662  return result;
663  }
664 
665 private:
666  UT_StringHolder myGroup;
667  int64 myDecaymode;
668  fpreal64 myDecay;
669  fpreal64 myDecayvoxel;
670  fpreal64 myUnitdist;
671  fpreal64 myUnitvoxel;
672  fpreal64 myAngle;
673  bool myOutside;
674  bool myDetect2d;
675  int64 myBordertype;
676  fpreal64 myBorderval;
677 
678 };
type
Definition: core.h:556
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:63
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
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:372
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:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
Decaymode opDecaymode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
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