HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Relax.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 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myGroup = ""_UTsh;
32  myInfluenceGroup = ""_UTsh;
33  mySurfaceGroup = ""_UTsh;
34  myMaxIterations = 10;
35  myRadius = 1;
36  myUseRadiusAttrib = true;
37  myRadiusAttrib = "pscale"_UTsh;
38  myRelaxIn3D = false;
39  myUseNormals = true;
40  myUseGeometricNormals = false;
41  myNormal = UT_Vector3D(0,1,0);
42  myUseMaxStepAttrib = false;
43  myMaxStepAttrib = "maxstep"_UTsh;
44  myUsePrimNumAttrib = false;
45  myPrimNumAttrib = "sourceprim"_UTsh;
46  myUsePrimUVWAttrib = false;
47  myPrimUVWAttrib = "sourceprimuv"_UTsh;
48 
49  }
50 
51  explicit SOP_RelaxParms(const SOP_RelaxParms &) = default;
52  SOP_RelaxParms &operator=(const SOP_RelaxParms &) = default;
53  SOP_RelaxParms(SOP_RelaxParms &&) noexcept = default;
54  SOP_RelaxParms &operator=(SOP_RelaxParms &&) noexcept = default;
55 
56  ~SOP_RelaxParms() override {}
57 
58  bool operator==(const SOP_RelaxParms &src) const
59  {
60  if (myGroup != src.myGroup) return false;
61  if (myInfluenceGroup != src.myInfluenceGroup) return false;
62  if (mySurfaceGroup != src.mySurfaceGroup) return false;
63  if (myMaxIterations != src.myMaxIterations) return false;
64  if (myRadius != src.myRadius) return false;
65  if (myUseRadiusAttrib != src.myUseRadiusAttrib) return false;
66  if (myRadiusAttrib != src.myRadiusAttrib) return false;
67  if (myRelaxIn3D != src.myRelaxIn3D) return false;
68  if (myUseNormals != src.myUseNormals) return false;
69  if (myUseGeometricNormals != src.myUseGeometricNormals) return false;
70  if (myNormal != src.myNormal) return false;
71  if (myUseMaxStepAttrib != src.myUseMaxStepAttrib) return false;
72  if (myMaxStepAttrib != src.myMaxStepAttrib) return false;
73  if (myUsePrimNumAttrib != src.myUsePrimNumAttrib) return false;
74  if (myPrimNumAttrib != src.myPrimNumAttrib) return false;
75  if (myUsePrimUVWAttrib != src.myUsePrimUVWAttrib) return false;
76  if (myPrimUVWAttrib != src.myPrimUVWAttrib) return false;
77 
78  return true;
79  }
80  bool operator!=(const SOP_RelaxParms &src) const
81  {
82  return !operator==(src);
83  }
84 
85 
86 
87  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
88  {
89  myGroup = ""_UTsh;
90  if (true)
91  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
92  myInfluenceGroup = ""_UTsh;
93  if (true)
94  graph->evalOpParm(myInfluenceGroup, nodeidx, "influencegroup", time, 0);
95  mySurfaceGroup = ""_UTsh;
96  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==0)))) ) )
97  graph->evalOpParm(mySurfaceGroup, nodeidx, "surfacegroup", time, 0);
98  myMaxIterations = 10;
99  if (true)
100  graph->evalOpParm(myMaxIterations, nodeidx, "maxiterations", time, 0);
101  myRadius = 1;
102  if (true)
103  graph->evalOpParm(myRadius, nodeidx, "radius", time, 0);
104  myUseRadiusAttrib = true;
105  if (true)
106  graph->evalOpParm(myUseRadiusAttrib, nodeidx, "useradiusattrib", time, 0);
107  myRadiusAttrib = "pscale"_UTsh;
108  if (true && ( (true&&!(((getUseRadiusAttrib()==0)))) ) )
109  graph->evalOpParm(myRadiusAttrib, nodeidx, "radiusattrib", time, 0);
110  myRelaxIn3D = false;
111  if (true)
112  graph->evalOpParm(myRelaxIn3D, nodeidx, "relaxin3d", time, 0);
113  myUseNormals = true;
114  if (true && ( (true&&!(((getRelaxIn3D()==1)))) ) )
115  graph->evalOpParm(myUseNormals, nodeidx, "usenormals", time, 0);
116  myUseGeometricNormals = false;
117  if (true && ( (true&&!(((getRelaxIn3D()==1))||((getUseNormals()==0)))) ) )
118  graph->evalOpParm(myUseGeometricNormals, nodeidx, "usegeometricnormals", time, 0);
119  myNormal = UT_Vector3D(0,1,0);
120  if (true && ( (true&&!(((getRelaxIn3D()==1))||((getUseNormals()==1)))) ) )
121  graph->evalOpParm(myNormal, nodeidx, "normal", time, 0);
122  myUseMaxStepAttrib = false;
123  if (true)
124  graph->evalOpParm(myUseMaxStepAttrib, nodeidx, "usemaxstepattrib", time, 0);
125  myMaxStepAttrib = "maxstep"_UTsh;
126  if (true && ( (true&&!(((getUseMaxStepAttrib()==0)))) ) )
127  graph->evalOpParm(myMaxStepAttrib, nodeidx, "maxstepattrib", time, 0);
128  myUsePrimNumAttrib = false;
129  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==0)))) ) )
130  graph->evalOpParm(myUsePrimNumAttrib, nodeidx, "useprimnumattrib", time, 0);
131  myPrimNumAttrib = "sourceprim"_UTsh;
132  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==0))||((getUsePrimNumAttrib()==0)))) ) )
133  graph->evalOpParm(myPrimNumAttrib, nodeidx, "primnumattrib", time, 0);
134  myUsePrimUVWAttrib = false;
135  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==0)))) ) )
136  graph->evalOpParm(myUsePrimUVWAttrib, nodeidx, "useprimuvwattrib", time, 0);
137  myPrimUVWAttrib = "sourceprimuv"_UTsh;
138  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==0))||((getUsePrimUVWAttrib()==0)))) ) )
139  graph->evalOpParm(myPrimUVWAttrib, nodeidx, "primuvwattrib", time, 0);
140 
141  }
142 
143 
144  void loadFromOpSubclass(const LoadParms &loadparms) override
145  {
146  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
147  }
148 
149 
150  void copyFrom(const OP_NodeParms *src) override
151  {
152  *this = *((const SOP_RelaxParms *)src);
153  }
154 
155  template <typename T>
156  void
157  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
158  {
159  if (idx.size() < 1)
160  return;
161  UT_ASSERT(idx.size() == instance.size()+1);
162  if (idx.size() != instance.size()+1)
163  return;
164  switch (idx[0])
165  {
166  case 0:
167  coerceValue(value, myGroup);
168  break;
169  case 1:
170  coerceValue(value, myInfluenceGroup);
171  break;
172  case 2:
173  coerceValue(value, mySurfaceGroup);
174  break;
175  case 3:
176  coerceValue(value, myMaxIterations);
177  break;
178  case 4:
179  coerceValue(value, myRadius);
180  break;
181  case 5:
182  coerceValue(value, myUseRadiusAttrib);
183  break;
184  case 6:
185  coerceValue(value, myRadiusAttrib);
186  break;
187  case 7:
188  coerceValue(value, myRelaxIn3D);
189  break;
190  case 8:
191  coerceValue(value, myUseNormals);
192  break;
193  case 9:
194  coerceValue(value, myUseGeometricNormals);
195  break;
196  case 10:
197  coerceValue(value, myNormal);
198  break;
199  case 11:
200  coerceValue(value, myUseMaxStepAttrib);
201  break;
202  case 12:
203  coerceValue(value, myMaxStepAttrib);
204  break;
205  case 13:
206  coerceValue(value, myUsePrimNumAttrib);
207  break;
208  case 14:
209  coerceValue(value, myPrimNumAttrib);
210  break;
211  case 15:
212  coerceValue(value, myUsePrimUVWAttrib);
213  break;
214  case 16:
215  coerceValue(value, myPrimUVWAttrib);
216  break;
217 
218  }
219  }
220 
221  bool isParmColorRamp(exint idx) const override
222  {
223  switch (idx)
224  {
225 
226  }
227  return false;
228  }
229 
230  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
251  { doGetParmValue(idx, instance, value); }
252 
253  template <typename T>
254  void
255  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
256  {
257  if (idx.size() < 1)
258  return;
259  UT_ASSERT(idx.size() == instance.size()+1);
260  if (idx.size() != instance.size()+1)
261  return;
262  switch (idx[0])
263  {
264  case 0:
265  coerceValue(myGroup, ( ( value ) ));
266  break;
267  case 1:
268  coerceValue(myInfluenceGroup, ( ( value ) ));
269  break;
270  case 2:
271  coerceValue(mySurfaceGroup, ( ( value ) ));
272  break;
273  case 3:
274  coerceValue(myMaxIterations, clampMinValue(0, ( value ) ));
275  break;
276  case 4:
277  coerceValue(myRadius, ( ( value ) ));
278  break;
279  case 5:
280  coerceValue(myUseRadiusAttrib, ( ( value ) ));
281  break;
282  case 6:
283  coerceValue(myRadiusAttrib, ( ( value ) ));
284  break;
285  case 7:
286  coerceValue(myRelaxIn3D, ( ( value ) ));
287  break;
288  case 8:
289  coerceValue(myUseNormals, ( ( value ) ));
290  break;
291  case 9:
292  coerceValue(myUseGeometricNormals, ( ( value ) ));
293  break;
294  case 10:
295  coerceValue(myNormal, ( ( value ) ));
296  break;
297  case 11:
298  coerceValue(myUseMaxStepAttrib, ( ( value ) ));
299  break;
300  case 12:
301  coerceValue(myMaxStepAttrib, ( ( value ) ));
302  break;
303  case 13:
304  coerceValue(myUsePrimNumAttrib, ( ( value ) ));
305  break;
306  case 14:
307  coerceValue(myPrimNumAttrib, ( ( value ) ));
308  break;
309  case 15:
310  coerceValue(myUsePrimUVWAttrib, ( ( value ) ));
311  break;
312  case 16:
313  coerceValue(myPrimUVWAttrib, ( ( value ) ));
314  break;
315 
316  }
317  }
318 
319  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
322  { doSetParmValue(idx, instance, value); }
323  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
324  { doSetParmValue(idx, instance, value); }
325  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
340  { doSetParmValue(idx, instance, value); }
341 
342  exint getNestNumParms(TempIndex idx) const override
343  {
344  if (idx.size() == 0)
345  return 17;
346  switch (idx[0])
347  {
348 
349  }
350  // Invalid
351  return 0;
352  }
353 
354  const char *getNestParmName(TempIndex fieldnum) const override
355  {
356  if (fieldnum.size() < 1)
357  return 0;
358  switch (fieldnum[0])
359  {
360  case 0:
361  return "group";
362  case 1:
363  return "influencegroup";
364  case 2:
365  return "surfacegroup";
366  case 3:
367  return "maxiterations";
368  case 4:
369  return "radius";
370  case 5:
371  return "useradiusattrib";
372  case 6:
373  return "radiusattrib";
374  case 7:
375  return "relaxin3d";
376  case 8:
377  return "usenormals";
378  case 9:
379  return "usegeometricnormals";
380  case 10:
381  return "normal";
382  case 11:
383  return "usemaxstepattrib";
384  case 12:
385  return "maxstepattrib";
386  case 13:
387  return "useprimnumattrib";
388  case 14:
389  return "primnumattrib";
390  case 15:
391  return "useprimuvwattrib";
392  case 16:
393  return "primuvwattrib";
394 
395  }
396  return 0;
397  }
398 
399  ParmType getNestParmType(TempIndex fieldnum) const override
400  {
401  if (fieldnum.size() < 1)
402  return PARM_UNSUPPORTED;
403  switch (fieldnum[0])
404  {
405  case 0:
406  return PARM_STRING;
407  case 1:
408  return PARM_STRING;
409  case 2:
410  return PARM_STRING;
411  case 3:
412  return PARM_INTEGER;
413  case 4:
414  return PARM_FLOAT;
415  case 5:
416  return PARM_INTEGER;
417  case 6:
418  return PARM_STRING;
419  case 7:
420  return PARM_INTEGER;
421  case 8:
422  return PARM_INTEGER;
423  case 9:
424  return PARM_INTEGER;
425  case 10:
426  return PARM_VECTOR3;
427  case 11:
428  return PARM_INTEGER;
429  case 12:
430  return PARM_STRING;
431  case 13:
432  return PARM_INTEGER;
433  case 14:
434  return PARM_STRING;
435  case 15:
436  return PARM_INTEGER;
437  case 16:
438  return PARM_STRING;
439 
440  }
441  return PARM_UNSUPPORTED;
442  }
443 
444  // Boiler plate to load individual types.
445  static void loadData(UT_IStream &is, int64 &v)
446  { is.bread(&v, 1); }
447  static void loadData(UT_IStream &is, bool &v)
448  { int64 iv; is.bread(&iv, 1); v = iv; }
449  static void loadData(UT_IStream &is, fpreal64 &v)
450  { is.bread<fpreal64>(&v, 1); }
451  static void loadData(UT_IStream &is, UT_Vector2D &v)
452  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
453  static void loadData(UT_IStream &is, UT_Vector3D &v)
454  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
455  is.bread<fpreal64>(&v.z(), 1); }
456  static void loadData(UT_IStream &is, UT_Vector4D &v)
457  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
458  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
459  static void loadData(UT_IStream &is, UT_Matrix2D &v)
460  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
461  static void loadData(UT_IStream &is, UT_Matrix3D &v)
462  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
463  static void loadData(UT_IStream &is, UT_Matrix4D &v)
464  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
465  static void loadData(UT_IStream &is, UT_Vector2I &v)
466  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
467  static void loadData(UT_IStream &is, UT_Vector3I &v)
468  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
469  is.bread<int64>(&v.z(), 1); }
470  static void loadData(UT_IStream &is, UT_Vector4I &v)
471  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
472  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
474  { is.bread(v); }
476  { UT_StringHolder rampdata;
477  loadData(is, rampdata);
478  if (rampdata.isstring())
479  {
480  v.reset(new UT_Ramp());
481  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
482  v->load(istr);
483  }
484  else v.reset();
485  }
488  loadData(is, data);
489  if (data.isstring())
490  {
491  // Find the data type.
492  const char *colon = UT_StringWrap(data).findChar(':');
493  if (colon)
494  {
495  int typelen = colon - data.buffer();
497  type.strncpy(data.buffer(), typelen);
498  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
499 
500  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
501  }
502  }
503  else v.reset();
504  }
505 
506  static void saveData(std::ostream &os, int64 v)
507  { UTwrite(os, &v); }
508  static void saveData(std::ostream &os, bool v)
509  { int64 iv = v; UTwrite(os, &iv); }
510  static void saveData(std::ostream &os, fpreal64 v)
511  { UTwrite<fpreal64>(os, &v); }
512  static void saveData(std::ostream &os, UT_Vector2D v)
513  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
514  static void saveData(std::ostream &os, UT_Vector3D v)
515  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
516  UTwrite<fpreal64>(os, &v.z()); }
517  static void saveData(std::ostream &os, UT_Vector4D v)
518  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
519  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
520  static void saveData(std::ostream &os, UT_Matrix2D v)
522  static void saveData(std::ostream &os, UT_Matrix3D v)
524  static void saveData(std::ostream &os, UT_Matrix4D v)
526  static void saveData(std::ostream &os, UT_StringHolder s)
527  { UT_StringWrap(s).saveBinary(os); }
528  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
530  UT_OStringStream ostr;
531  if (s) s->save(ostr);
532  result = ostr.str();
533  saveData(os, result);
534  }
535  static void saveData(std::ostream &os, PRM_DataItemHandle s)
537  UT_OStringStream ostr;
538  if (s)
539  {
540  ostr << s->getDataTypeToken();
541  ostr << ":";
542  s->saveBinary(ostr);
543  }
544  result = ostr.str();
545  saveData(os, result);
546  }
547 
548 
549  void save(std::ostream &os) const
550  {
551  int32 v = version();
552  UTwrite(os, &v);
553  saveData(os, myGroup);
554  saveData(os, myInfluenceGroup);
555  saveData(os, mySurfaceGroup);
556  saveData(os, myMaxIterations);
557  saveData(os, myRadius);
558  saveData(os, myUseRadiusAttrib);
559  saveData(os, myRadiusAttrib);
560  saveData(os, myRelaxIn3D);
561  saveData(os, myUseNormals);
562  saveData(os, myUseGeometricNormals);
563  saveData(os, myNormal);
564  saveData(os, myUseMaxStepAttrib);
565  saveData(os, myMaxStepAttrib);
566  saveData(os, myUsePrimNumAttrib);
567  saveData(os, myPrimNumAttrib);
568  saveData(os, myUsePrimUVWAttrib);
569  saveData(os, myPrimUVWAttrib);
570 
571  }
572 
573  bool load(UT_IStream &is)
574  {
575  int32 v;
576  is.bread(&v, 1);
577  if (version() != v)
578  {
579  // Fail incompatible versions
580  return false;
581  }
582  loadData(is, myGroup);
583  loadData(is, myInfluenceGroup);
584  loadData(is, mySurfaceGroup);
585  loadData(is, myMaxIterations);
586  loadData(is, myRadius);
587  loadData(is, myUseRadiusAttrib);
588  loadData(is, myRadiusAttrib);
589  loadData(is, myRelaxIn3D);
590  loadData(is, myUseNormals);
591  loadData(is, myUseGeometricNormals);
592  loadData(is, myNormal);
593  loadData(is, myUseMaxStepAttrib);
594  loadData(is, myMaxStepAttrib);
595  loadData(is, myUsePrimNumAttrib);
596  loadData(is, myPrimNumAttrib);
597  loadData(is, myUsePrimUVWAttrib);
598  loadData(is, myPrimUVWAttrib);
599 
600  return true;
601  }
602 
603  const UT_StringHolder & getGroup() const { return myGroup; }
604  void setGroup(const UT_StringHolder & val) { myGroup = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getGroup();
610  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
611  return result;
612  }
613  const UT_StringHolder & getInfluenceGroup() const { return myInfluenceGroup; }
614  void setInfluenceGroup(const UT_StringHolder & val) { myInfluenceGroup = val; }
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getInfluenceGroup();
620  OP_Utils::evalOpParm(result, thissop, "influencegroup", cookparms.getCookTime(), 0);
621  return result;
622  }
623  const UT_StringHolder & getSurfaceGroup() const { return mySurfaceGroup; }
624  void setSurfaceGroup(const UT_StringHolder & val) { mySurfaceGroup = val; }
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getSurfaceGroup();
630  OP_Utils::evalOpParm(result, thissop, "surfacegroup", cookparms.getCookTime(), 0);
631  return result;
632  }
633  int64 getMaxIterations() const { return myMaxIterations; }
634  void setMaxIterations(int64 val) { myMaxIterations = val; }
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getMaxIterations();
639  int64 result;
640  OP_Utils::evalOpParm(result, thissop, "maxiterations", cookparms.getCookTime(), 0);
641  return result;
642  }
643  fpreal64 getRadius() const { return myRadius; }
644  void setRadius(fpreal64 val) { myRadius = val; }
645  fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getRadius();
650  OP_Utils::evalOpParm(result, thissop, "radius", cookparms.getCookTime(), 0);
651  return result;
652  }
653  bool getUseRadiusAttrib() const { return myUseRadiusAttrib; }
654  void setUseRadiusAttrib(bool val) { myUseRadiusAttrib = val; }
655  bool opUseRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getUseRadiusAttrib();
659  bool result;
660  OP_Utils::evalOpParm(result, thissop, "useradiusattrib", cookparms.getCookTime(), 0);
661  return result;
662  }
663  const UT_StringHolder & getRadiusAttrib() const { return myRadiusAttrib; }
664  void setRadiusAttrib(const UT_StringHolder & val) { myRadiusAttrib = val; }
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getRadiusAttrib();
670  OP_Utils::evalOpParm(result, thissop, "radiusattrib", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getRelaxIn3D() const { return myRelaxIn3D; }
674  void setRelaxIn3D(bool val) { myRelaxIn3D = val; }
675  bool opRelaxIn3D(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getRelaxIn3D();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "relaxin3d", cookparms.getCookTime(), 0);
681  return result;
682  }
683  bool getUseNormals() const { return myUseNormals; }
684  void setUseNormals(bool val) { myUseNormals = val; }
685  bool opUseNormals(const SOP_NodeVerb::CookParms &cookparms) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getUseNormals();
689  bool result;
690  OP_Utils::evalOpParm(result, thissop, "usenormals", cookparms.getCookTime(), 0);
691  return result;
692  }
693  bool getUseGeometricNormals() const { return myUseGeometricNormals; }
694  void setUseGeometricNormals(bool val) { myUseGeometricNormals = val; }
695  bool opUseGeometricNormals(const SOP_NodeVerb::CookParms &cookparms) const
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getUseGeometricNormals();
699  bool result;
700  OP_Utils::evalOpParm(result, thissop, "usegeometricnormals", cookparms.getCookTime(), 0);
701  return result;
702  }
703  UT_Vector3D getNormal() const { return myNormal; }
704  void setNormal(UT_Vector3D val) { myNormal = val; }
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getNormal();
710  OP_Utils::evalOpParm(result, thissop, "normal", cookparms.getCookTime(), 0);
711  return result;
712  }
713  bool getUseMaxStepAttrib() const { return myUseMaxStepAttrib; }
714  void setUseMaxStepAttrib(bool val) { myUseMaxStepAttrib = val; }
715  bool opUseMaxStepAttrib(const SOP_NodeVerb::CookParms &cookparms) const
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getUseMaxStepAttrib();
719  bool result;
720  OP_Utils::evalOpParm(result, thissop, "usemaxstepattrib", cookparms.getCookTime(), 0);
721  return result;
722  }
723  const UT_StringHolder & getMaxStepAttrib() const { return myMaxStepAttrib; }
724  void setMaxStepAttrib(const UT_StringHolder & val) { myMaxStepAttrib = val; }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getMaxStepAttrib();
730  OP_Utils::evalOpParm(result, thissop, "maxstepattrib", cookparms.getCookTime(), 0);
731  return result;
732  }
733  bool getUsePrimNumAttrib() const { return myUsePrimNumAttrib; }
734  void setUsePrimNumAttrib(bool val) { myUsePrimNumAttrib = val; }
735  bool opUsePrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getUsePrimNumAttrib();
739  bool result;
740  OP_Utils::evalOpParm(result, thissop, "useprimnumattrib", cookparms.getCookTime(), 0);
741  return result;
742  }
743  const UT_StringHolder & getPrimNumAttrib() const { return myPrimNumAttrib; }
744  void setPrimNumAttrib(const UT_StringHolder & val) { myPrimNumAttrib = val; }
746  {
747  SOP_Node *thissop = cookparms.getNode();
748  if (!thissop) return getPrimNumAttrib();
750  OP_Utils::evalOpParm(result, thissop, "primnumattrib", cookparms.getCookTime(), 0);
751  return result;
752  }
753  bool getUsePrimUVWAttrib() const { return myUsePrimUVWAttrib; }
754  void setUsePrimUVWAttrib(bool val) { myUsePrimUVWAttrib = val; }
755  bool opUsePrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
756  {
757  SOP_Node *thissop = cookparms.getNode();
758  if (!thissop) return getUsePrimUVWAttrib();
759  bool result;
760  OP_Utils::evalOpParm(result, thissop, "useprimuvwattrib", cookparms.getCookTime(), 0);
761  return result;
762  }
763  const UT_StringHolder & getPrimUVWAttrib() const { return myPrimUVWAttrib; }
764  void setPrimUVWAttrib(const UT_StringHolder & val) { myPrimUVWAttrib = val; }
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return getPrimUVWAttrib();
770  OP_Utils::evalOpParm(result, thissop, "primuvwattrib", cookparms.getCookTime(), 0);
771  return result;
772  }
773 
774 private:
775  UT_StringHolder myGroup;
776  UT_StringHolder myInfluenceGroup;
777  UT_StringHolder mySurfaceGroup;
778  int64 myMaxIterations;
779  fpreal64 myRadius;
780  bool myUseRadiusAttrib;
781  UT_StringHolder myRadiusAttrib;
782  bool myRelaxIn3D;
783  bool myUseNormals;
784  bool myUseGeometricNormals;
785  UT_Vector3D myNormal;
786  bool myUseMaxStepAttrib;
787  UT_StringHolder myMaxStepAttrib;
788  bool myUsePrimNumAttrib;
789  UT_StringHolder myPrimNumAttrib;
790  bool myUsePrimUVWAttrib;
791  UT_StringHolder myPrimUVWAttrib;
792 
793 };
bool getUseMaxStepAttrib() const
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
int64 getMaxIterations() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setRadius(fpreal64 val)
void copyFrom(const OP_NodeParms *src) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool getUsePrimUVWAttrib() const
const UT_StringHolder & getPrimNumAttrib() const
const UT_StringHolder & getPrimUVWAttrib() const
UT_Vector3D opNormal(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setPrimUVWAttrib(const UT_StringHolder &val)
UT_StringHolder opSurfaceGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
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
bool getRelaxIn3D() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void loadData(UT_IStream &is, UT_Vector3I &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void save(std::ostream &os) const
An output stream object that owns its own string buffer storage.
const UT_StringHolder & getSurfaceGroup() const
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
static void saveData(std::ostream &os, UT_Vector2D v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
UT_StringHolder opPrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setRadiusAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
bool opUsePrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
exint getNestNumParms(TempIndex idx) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_StringHolder &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool getUsePrimNumAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static int version()
bool opUseRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, int64 v)
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 setMaxStepAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setMaxIterations(int64 val)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
bool operator!=(const SOP_RelaxParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setPrimNumAttrib(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal64 getRadius() const
void setUseNormals(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_StringHolder opInfluenceGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool opRelaxIn3D(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getRadiusAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setInfluenceGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
bool opUsePrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseNormals() const
bool getUseRadiusAttrib() const
UT_StringHolder opPrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, fpreal64 v)
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getInfluenceGroup() const
void setGroup(const UT_StringHolder &val)
bool operator==(const SOP_RelaxParms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool load(UT_IStream &is)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
void setUsePrimUVWAttrib(bool val)
const UT_StringHolder & getMaxStepAttrib() const
int64 opMaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNormal(UT_Vector3D val)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
bool opUseNormals(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
bool opUseMaxStepAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GLboolean r
Definition: glcorearb.h:1222
void setUseRadiusAttrib(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setRelaxIn3D(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
type
Definition: core.h:1059
void setUseGeometricNormals(bool val)
bool getUseGeometricNormals() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setUsePrimNumAttrib(bool val)
UT_Vector3D getNormal() const
bool opUseGeometricNormals(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
UT_StringHolder opMaxStepAttrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void setSurfaceGroup(const UT_StringHolder &val)
void setUseMaxStepAttrib(bool val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663