HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribFill.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_AttribFillEnums
24 {
25  enum class Mode
26  {
27  EIKONAL = 0,
28  POISSON,
29  HEAT,
30  TRANSPORT
31  };
32 
34  getToken(Mode enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case Mode::EIKONAL: return "eikonal"_sh;
39  case Mode::POISSON: return "poisson"_sh;
40  case Mode::HEAT: return "heat"_sh;
41  case Mode::TRANSPORT: return "transport"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Extrapolationtype
47  {
48  SCALAR = 0,
51  };
52 
55  {
56  using namespace UT::Literal;
57  switch (enum_value) {
58  case Extrapolationtype::SCALAR: return "scalar"_sh;
59  case Extrapolationtype::PARALLELTRANSPORT: return "paralleltransport"_sh;
60  case Extrapolationtype::RADIALFIELD: return "radialfield"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65 }
66 
67 
69 {
70 public:
71  static int version() { return 1; }
72 
74  {
75  myMode = 1;
76  myAttrib = ""_UTsh;
77  mySource = ""_UTsh;
78  myWeights = ""_UTsh;
79  mySpeed = ""_UTsh;
80  myBoundary = ""_UTsh;
81  myMindist = 1e-8;
82  myMinspeed = 1e-8;
83  myTimestep = 0.02;
84  myUnreachableval = -1;
85  myExtrapolationtype = 0;
86  myTangentialOnly = false;
87  myVectorRotation = 0;
88 
89  }
90 
91  explicit SOP_AttribFillParms(const SOP_AttribFillParms &) = default;
93  SOP_AttribFillParms(SOP_AttribFillParms &&) noexcept = default;
94  SOP_AttribFillParms &operator=(SOP_AttribFillParms &&) noexcept = default;
95 
96  ~SOP_AttribFillParms() override {}
97 
98  bool operator==(const SOP_AttribFillParms &src) const
99  {
100  if (myMode != src.myMode) return false;
101  if (myAttrib != src.myAttrib) return false;
102  if (mySource != src.mySource) return false;
103  if (myWeights != src.myWeights) return false;
104  if (mySpeed != src.mySpeed) return false;
105  if (myBoundary != src.myBoundary) return false;
106  if (myMindist != src.myMindist) return false;
107  if (myMinspeed != src.myMinspeed) return false;
108  if (myTimestep != src.myTimestep) return false;
109  if (myUnreachableval != src.myUnreachableval) return false;
110  if (myExtrapolationtype != src.myExtrapolationtype) return false;
111  if (myTangentialOnly != src.myTangentialOnly) return false;
112  if (myVectorRotation != src.myVectorRotation) return false;
113 
114 
115  if (baseGetSignature() != src.baseGetSignature()) return false;
116 
117  return true;
118  }
119  bool operator!=(const SOP_AttribFillParms &src) const
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  myMode = 1;
131  if (true)
132  graph->evalOpParm(myMode, nodeidx, "mode", time, graph->isDirect()?nullptr:depnode);
133  myAttrib = ""_UTsh;
134  if (true)
135  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, graph->isDirect()?nullptr:depnode);
136  mySource = ""_UTsh;
137  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
138  graph->evalOpParm(mySource, nodeidx, "source", time, graph->isDirect()?nullptr:depnode);
139  myWeights = ""_UTsh;
140  if (true && ( (true&&!(((int64(getMode())!=1)))) ) )
141  graph->evalOpParm(myWeights, nodeidx, "weights", time, graph->isDirect()?nullptr:depnode);
142  mySpeed = ""_UTsh;
143  if (true && ( (true&&!(((int64(getMode())!=0)&&(int64(getMode())!=2)))) ) )
144  graph->evalOpParm(mySpeed, nodeidx, "speed", time, graph->isDirect()?nullptr:depnode);
145  myBoundary = ""_UTsh;
146  if (true)
147  graph->evalOpParm(myBoundary, nodeidx, "boundary", time, graph->isDirect()?nullptr:depnode);
148  myMindist = 1e-8;
149  if (true && ( (true&&!(((int64(getMode())!=1)&&(int64(getMode())!=2)))) ) )
150  graph->evalOpParm(myMindist, nodeidx, "mindist", time, graph->isDirect()?nullptr:depnode);
151  myMinspeed = 1e-8;
152  if (true && ( (true&&!(((int64(getMode())!=2)))) ) )
153  graph->evalOpParm(myMinspeed, nodeidx, "minspeed", time, graph->isDirect()?nullptr:depnode);
154  myTimestep = 0.02;
155  if (true && ( (true&&!(((int64(getMode())!=2)))) ) )
156  graph->evalOpParm(myTimestep, nodeidx, "timestep", time, graph->isDirect()?nullptr:depnode);
157  myUnreachableval = -1;
158  if (true && ( (true&&!(((int64(getMode())!=0)))) ) )
159  graph->evalOpParm(myUnreachableval, nodeidx, "unreachableval", time, graph->isDirect()?nullptr:depnode);
160  myExtrapolationtype = 0;
161  if (true && ( (true&&!(((int64(getMode())!=3)))) ) )
162  graph->evalOpParm(myExtrapolationtype, nodeidx, "extrapolationtype", time, graph->isDirect()?nullptr:depnode);
163  myTangentialOnly = false;
164  if (true && ( (true&&!(((int64(getMode())!=3))||((int64(getExtrapolationtype())==0)))) ) )
165  graph->evalOpParm(myTangentialOnly, nodeidx, "tangentialonly", time, graph->isDirect()?nullptr:depnode);
166  myVectorRotation = 0;
167  if (true && ( (true&&!(((int64(getMode())!=3))||((int64(getExtrapolationtype())==0)))) ) )
168  graph->evalOpParm(myVectorRotation, nodeidx, "globalrotation", time, graph->isDirect()?nullptr:depnode);
169 
170  }
171 
172 
173  void loadFromOpSubclass(const LoadParms &loadparms) override
174  {
175  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
176  }
177 
178 
179  void copyFrom(const OP_NodeParms *src) override
180  {
181  *this = *((const SOP_AttribFillParms *)src);
182  }
183 
184  template <typename T>
185  void
186  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
187  {
188  if (idx.size() < 1)
189  return;
190  UT_ASSERT(idx.size() == instance.size()+1);
191  if (idx.size() != instance.size()+1)
192  return;
193  switch (idx[0])
194  {
195  case 0:
196  coerceValue(value, myMode);
197  break;
198  case 1:
199  coerceValue(value, myAttrib);
200  break;
201  case 2:
202  coerceValue(value, mySource);
203  break;
204  case 3:
205  coerceValue(value, myWeights);
206  break;
207  case 4:
208  coerceValue(value, mySpeed);
209  break;
210  case 5:
211  coerceValue(value, myBoundary);
212  break;
213  case 6:
214  coerceValue(value, myMindist);
215  break;
216  case 7:
217  coerceValue(value, myMinspeed);
218  break;
219  case 8:
220  coerceValue(value, myTimestep);
221  break;
222  case 9:
223  coerceValue(value, myUnreachableval);
224  break;
225  case 10:
226  coerceValue(value, myExtrapolationtype);
227  break;
228  case 11:
229  coerceValue(value, myTangentialOnly);
230  break;
231  case 12:
232  coerceValue(value, myVectorRotation);
233  break;
234 
235  }
236  }
237 
238  bool isParmColorRamp(exint idx) const override
239  {
240  switch (idx)
241  {
242 
243  }
244  return false;
245  }
246 
247  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
248  { doGetParmValue(idx, instance, value); }
249  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
250  { doGetParmValue(idx, instance, value); }
251  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
252  { doGetParmValue(idx, instance, value); }
253  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
254  { doGetParmValue(idx, instance, value); }
255  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
256  { doGetParmValue(idx, instance, value); }
257  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
268  { doGetParmValue(idx, instance, value); }
269 
270  template <typename T>
271  void
272  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
273  {
274  if (idx.size() < 1)
275  return;
276  UT_ASSERT(idx.size() == instance.size()+1);
277  if (idx.size() != instance.size()+1)
278  return;
279  switch (idx[0])
280  {
281  case 0:
282  coerceValue(myMode, clampMinValue(0, clampMaxValue(3, value ) ));
283  break;
284  case 1:
285  coerceValue(myAttrib, ( ( value ) ));
286  break;
287  case 2:
288  coerceValue(mySource, ( ( value ) ));
289  break;
290  case 3:
291  coerceValue(myWeights, ( ( value ) ));
292  break;
293  case 4:
294  coerceValue(mySpeed, ( ( value ) ));
295  break;
296  case 5:
297  coerceValue(myBoundary, ( ( value ) ));
298  break;
299  case 6:
300  coerceValue(myMindist, clampMinValue(0, ( value ) ));
301  break;
302  case 7:
303  coerceValue(myMinspeed, clampMinValue(0, ( value ) ));
304  break;
305  case 8:
306  coerceValue(myTimestep, clampMinValue(0, ( value ) ));
307  break;
308  case 9:
309  coerceValue(myUnreachableval, ( ( value ) ));
310  break;
311  case 10:
312  coerceValue(myExtrapolationtype, clampMinValue(0, clampMaxValue(2, value ) ));
313  break;
314  case 11:
315  coerceValue(myTangentialOnly, ( ( value ) ));
316  break;
317  case 12:
318  coerceValue(myVectorRotation, ( ( value ) ));
319  break;
320 
321  }
322  }
323 
324  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
345  { doSetParmValue(idx, instance, value); }
346 
347  exint getNestNumParms(TempIndex idx) const override
348  {
349  if (idx.size() == 0)
350  return 13;
351  switch (idx[0])
352  {
353 
354  }
355  // Invalid
356  return 0;
357  }
358 
359  const char *getNestParmName(TempIndex fieldnum) const override
360  {
361  if (fieldnum.size() < 1)
362  return 0;
363  switch (fieldnum[0])
364  {
365  case 0:
366  return "mode";
367  case 1:
368  return "attrib";
369  case 2:
370  return "source";
371  case 3:
372  return "weights";
373  case 4:
374  return "speed";
375  case 5:
376  return "boundary";
377  case 6:
378  return "mindist";
379  case 7:
380  return "minspeed";
381  case 8:
382  return "timestep";
383  case 9:
384  return "unreachableval";
385  case 10:
386  return "extrapolationtype";
387  case 11:
388  return "tangentialonly";
389  case 12:
390  return "globalrotation";
391 
392  }
393  return 0;
394  }
395 
396  ParmType getNestParmType(TempIndex fieldnum) const override
397  {
398  if (fieldnum.size() < 1)
399  return PARM_UNSUPPORTED;
400  switch (fieldnum[0])
401  {
402  case 0:
403  return PARM_INTEGER;
404  case 1:
405  return PARM_STRING;
406  case 2:
407  return PARM_STRING;
408  case 3:
409  return PARM_STRING;
410  case 4:
411  return PARM_STRING;
412  case 5:
413  return PARM_STRING;
414  case 6:
415  return PARM_FLOAT;
416  case 7:
417  return PARM_FLOAT;
418  case 8:
419  return PARM_FLOAT;
420  case 9:
421  return PARM_FLOAT;
422  case 10:
423  return PARM_INTEGER;
424  case 11:
425  return PARM_INTEGER;
426  case 12:
427  return PARM_FLOAT;
428 
429  }
430  return PARM_UNSUPPORTED;
431  }
432 
433  // Boiler plate to load individual types.
434  static void loadData(UT_IStream &is, int64 &v)
435  { is.bread(&v, 1); }
436  static void loadData(UT_IStream &is, bool &v)
437  { int64 iv; is.bread(&iv, 1); v = iv; }
438  static void loadData(UT_IStream &is, fpreal64 &v)
439  { is.bread<fpreal64>(&v, 1); }
440  static void loadData(UT_IStream &is, UT_Vector2D &v)
441  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
442  static void loadData(UT_IStream &is, UT_Vector3D &v)
443  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
444  is.bread<fpreal64>(&v.z(), 1); }
445  static void loadData(UT_IStream &is, UT_Vector4D &v)
446  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
447  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
448  static void loadData(UT_IStream &is, UT_Matrix2D &v)
449  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
450  static void loadData(UT_IStream &is, UT_Matrix3D &v)
451  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
452  static void loadData(UT_IStream &is, UT_Matrix4D &v)
453  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
454  static void loadData(UT_IStream &is, UT_Vector2I &v)
455  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
456  static void loadData(UT_IStream &is, UT_Vector3I &v)
457  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
458  is.bread<int64>(&v.z(), 1); }
459  static void loadData(UT_IStream &is, UT_Vector4I &v)
460  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
461  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
463  { is.bread(v); }
465  { UT_StringHolder rampdata;
466  loadData(is, rampdata);
467  if (rampdata.isstring())
468  {
469  v.reset(new UT_Ramp());
470  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
471  v->load(istr);
472  }
473  else v.reset();
474  }
477  loadData(is, data);
478  if (data.isstring())
479  {
480  // Find the data type.
481  const char *colon = UT_StringWrap(data).findChar(':');
482  if (colon)
483  {
484  int typelen = colon - data.buffer();
486  type.strncpy(data.buffer(), typelen);
487  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
488 
489  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
490  }
491  }
492  else v.reset();
493  }
494 
495  static void saveData(std::ostream &os, int64 v)
496  { UTwrite(os, &v); }
497  static void saveData(std::ostream &os, bool v)
498  { int64 iv = v; UTwrite(os, &iv); }
499  static void saveData(std::ostream &os, fpreal64 v)
500  { UTwrite<fpreal64>(os, &v); }
501  static void saveData(std::ostream &os, UT_Vector2D v)
502  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
503  static void saveData(std::ostream &os, UT_Vector3D v)
504  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
505  UTwrite<fpreal64>(os, &v.z()); }
506  static void saveData(std::ostream &os, UT_Vector4D v)
507  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
508  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
509  static void saveData(std::ostream &os, UT_Matrix2D v)
511  static void saveData(std::ostream &os, UT_Matrix3D v)
513  static void saveData(std::ostream &os, UT_Matrix4D v)
515  static void saveData(std::ostream &os, UT_StringHolder s)
516  { UT_StringWrap(s).saveBinary(os); }
517  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
519  UT_OStringStream ostr;
520  if (s) s->save(ostr);
521  result = ostr.str();
522  saveData(os, result);
523  }
524  static void saveData(std::ostream &os, PRM_DataItemHandle s)
526  UT_OStringStream ostr;
527  if (s)
528  {
529  ostr << s->getDataTypeToken();
530  ostr << ":";
531  s->saveBinary(ostr);
532  }
533  result = ostr.str();
534  saveData(os, result);
535  }
536 
537 
538  void save(std::ostream &os) const
539  {
540  int32 v = version();
541  UTwrite(os, &v);
542  saveData(os, myMode);
543  saveData(os, myAttrib);
544  saveData(os, mySource);
545  saveData(os, myWeights);
546  saveData(os, mySpeed);
547  saveData(os, myBoundary);
548  saveData(os, myMindist);
549  saveData(os, myMinspeed);
550  saveData(os, myTimestep);
551  saveData(os, myUnreachableval);
552  saveData(os, myExtrapolationtype);
553  saveData(os, myTangentialOnly);
554  saveData(os, myVectorRotation);
555 
556  }
557 
558  bool load(UT_IStream &is)
559  {
560  int32 v;
561  is.bread(&v, 1);
562  if (version() != v)
563  {
564  // Fail incompatible versions
565  return false;
566  }
567  loadData(is, myMode);
568  loadData(is, myAttrib);
569  loadData(is, mySource);
570  loadData(is, myWeights);
571  loadData(is, mySpeed);
572  loadData(is, myBoundary);
573  loadData(is, myMindist);
574  loadData(is, myMinspeed);
575  loadData(is, myTimestep);
576  loadData(is, myUnreachableval);
577  loadData(is, myExtrapolationtype);
578  loadData(is, myTangentialOnly);
579  loadData(is, myVectorRotation);
580 
581  return true;
582  }
583 
584  Mode getMode() const { return Mode(myMode); }
585  void setMode(Mode val) { myMode = int64(val); }
586  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getMode();
590  int64 result;
591  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
592  return Mode(result);
593  }
594  const UT_StringHolder & getAttrib() const { return myAttrib; }
595  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getAttrib();
601  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
602  return result;
603  }
604  const UT_StringHolder & getSource() const { return mySource; }
605  void setSource(const UT_StringHolder & val) { mySource = val; }
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getSource();
611  OP_Utils::evalOpParm(result, thissop, "source", cookparms.getCookTime(), 0);
612  return result;
613  }
614  const UT_StringHolder & getWeights() const { return myWeights; }
615  void setWeights(const UT_StringHolder & val) { myWeights = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getWeights();
621  OP_Utils::evalOpParm(result, thissop, "weights", cookparms.getCookTime(), 0);
622  return result;
623  }
624  const UT_StringHolder & getSpeed() const { return mySpeed; }
625  void setSpeed(const UT_StringHolder & val) { mySpeed = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getSpeed();
631  OP_Utils::evalOpParm(result, thissop, "speed", cookparms.getCookTime(), 0);
632  return result;
633  }
634  const UT_StringHolder & getBoundary() const { return myBoundary; }
635  void setBoundary(const UT_StringHolder & val) { myBoundary = val; }
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getBoundary();
641  OP_Utils::evalOpParm(result, thissop, "boundary", cookparms.getCookTime(), 0);
642  return result;
643  }
644  fpreal64 getMindist() const { return myMindist; }
645  void setMindist(fpreal64 val) { myMindist = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getMindist();
651  OP_Utils::evalOpParm(result, thissop, "mindist", cookparms.getCookTime(), 0);
652  return result;
653  }
654  fpreal64 getMinspeed() const { return myMinspeed; }
655  void setMinspeed(fpreal64 val) { myMinspeed = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getMinspeed();
661  OP_Utils::evalOpParm(result, thissop, "minspeed", cookparms.getCookTime(), 0);
662  return result;
663  }
664  fpreal64 getTimestep() const { return myTimestep; }
665  void setTimestep(fpreal64 val) { myTimestep = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getTimestep();
671  OP_Utils::evalOpParm(result, thissop, "timestep", cookparms.getCookTime(), 0);
672  return result;
673  }
674  fpreal64 getUnreachableval() const { return myUnreachableval; }
675  void setUnreachableval(fpreal64 val) { myUnreachableval = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getUnreachableval();
681  OP_Utils::evalOpParm(result, thissop, "unreachableval", cookparms.getCookTime(), 0);
682  return result;
683  }
684  Extrapolationtype getExtrapolationtype() const { return Extrapolationtype(myExtrapolationtype); }
685  void setExtrapolationtype(Extrapolationtype val) { myExtrapolationtype = int64(val); }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getExtrapolationtype();
690  int64 result;
691  OP_Utils::evalOpParm(result, thissop, "extrapolationtype", cookparms.getCookTime(), 0);
692  return Extrapolationtype(result);
693  }
694  bool getTangentialOnly() const { return myTangentialOnly; }
695  void setTangentialOnly(bool val) { myTangentialOnly = val; }
696  bool opTangentialOnly(const SOP_NodeVerb::CookParms &cookparms) const
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getTangentialOnly();
700  bool result;
701  OP_Utils::evalOpParm(result, thissop, "tangentialonly", cookparms.getCookTime(), 0);
702  return result;
703  }
704  fpreal64 getVectorRotation() const { return myVectorRotation; }
705  void setVectorRotation(fpreal64 val) { myVectorRotation = val; }
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getVectorRotation();
711  OP_Utils::evalOpParm(result, thissop, "globalrotation", cookparms.getCookTime(), 0);
712  return result;
713  }
714 
715 private:
716  int64 myMode;
717  UT_StringHolder myAttrib;
718  UT_StringHolder mySource;
719  UT_StringHolder myWeights;
720  UT_StringHolder mySpeed;
721  UT_StringHolder myBoundary;
722  fpreal64 myMindist;
723  fpreal64 myMinspeed;
724  fpreal64 myTimestep;
725  fpreal64 myUnreachableval;
726  int64 myExtrapolationtype;
727  bool myTangentialOnly;
728  fpreal64 myVectorRotation;
729 
730 };
type
Definition: core.h:556
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 opMindist(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSpeed(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
fpreal64 opMinspeed(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const UT_StringHolder & getAttrib() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setMinspeed(fpreal64 val)
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
void setUnreachableval(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, UT_StringHolder &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
bool load(UT_IStream &is)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void setMindist(fpreal64 val)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
int getSource() override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
fpreal64 opUnreachableval(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opSource(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool operator!=(const SOP_AttribFillParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
**But if you need a result
Definition: thread.h:622
const UT_StringHolder & getBoundary() const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint getNestNumParms(TempIndex idx) const override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
fpreal64 opTimestep(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setVectorRotation(fpreal64 val)
static void saveData(std::ostream &os, int64 v)
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
bool getTangentialOnly() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
fpreal64 getVectorRotation() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getWeights() const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void save(std::ostream &os) const
UT_StringHolder opWeights(const SOP_NodeVerb::CookParms &cookparms) const
void setExtrapolationtype(Extrapolationtype val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
exint length() const
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 getMindist() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
fpreal64 getUnreachableval() const
void setBoundary(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
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, UT_Vector2D v)
bool operator==(const SOP_AttribFillParms &src) const
long long int64
Definition: SYS_Types.h:116
bool isParmColorRamp(exint idx) const override
fpreal64 opVectorRotation(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSpeed() const
fpreal64 getMinspeed() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setTimestep(fpreal64 val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
void setTangentialOnly(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GT_API const UT_StringHolder version
void setWeights(const UT_StringHolder &val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setSource(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setAttrib(const UT_StringHolder &val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
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
bool opTangentialOnly(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
UT_StringHolder opBoundary(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getSource() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
Extrapolationtype getExtrapolationtype() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Extrapolationtype opExtrapolationtype(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
SYS_FORCE_INLINE UT_StringHolder getToken(Mode enum_value)
fpreal64 getTimestep() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setSpeed(const UT_StringHolder &val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
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)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663