HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_SBlend-2.0.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_SBlend_2_0Enums
24 {
25  enum class UnmatchedPoints
26  {
27  FREEZE = 0,
28  DELETE,
29  GROUP
30  };
31  enum class VoxelBlend
32  {
33  NONE = 0,
35  BYVOXELPOS,
36  ADVECTED
37  };
38  enum class Interp
39  {
40  LINEAR = 0,
41  CUBIC,
42  SUBD
43  };
44 }
45 
46 
48 {
49 public:
50  static int version() { return 1; }
51 
53  {
54  myBlend = 0;
55  myAttribs = "*"_UTsh;
56  myPtIDAttr = "id"_UTsh;
57  myUnmatchedPoints = 0;
58  myUnmatchedPointGroup = "unmatched"_UTsh;
59  myPrimIDAttr = "name"_UTsh;
60  myVoxelBlend = 0;
61  myAdvectionDT = 0.0416667;
62  myVelocityField = "vel"_UTsh;
63  myDoSlerp = true;
64  myInterp = 0;
65  myUseVForPInterp = false;
66  myTimeStep = 0;
67 
68  }
69 
70  explicit SOP_SBlend_2_0Parms(const SOP_SBlend_2_0Parms &) = default;
72  SOP_SBlend_2_0Parms(SOP_SBlend_2_0Parms &&) noexcept = default;
73  SOP_SBlend_2_0Parms &operator=(SOP_SBlend_2_0Parms &&) noexcept = default;
74 
75  ~SOP_SBlend_2_0Parms() override {}
76 
77  bool operator==(const SOP_SBlend_2_0Parms &src) const
78  {
79  if (myBlend != src.myBlend) return false;
80  if (myAttribs != src.myAttribs) return false;
81  if (myPtIDAttr != src.myPtIDAttr) return false;
82  if (myUnmatchedPoints != src.myUnmatchedPoints) return false;
83  if (myUnmatchedPointGroup != src.myUnmatchedPointGroup) return false;
84  if (myPrimIDAttr != src.myPrimIDAttr) return false;
85  if (myVoxelBlend != src.myVoxelBlend) return false;
86  if (myAdvectionDT != src.myAdvectionDT) return false;
87  if (myVelocityField != src.myVelocityField) return false;
88  if (myDoSlerp != src.myDoSlerp) return false;
89  if (myInterp != src.myInterp) return false;
90  if (myUseVForPInterp != src.myUseVForPInterp) return false;
91  if (myTimeStep != src.myTimeStep) return false;
92 
93  return true;
94  }
95  bool operator!=(const SOP_SBlend_2_0Parms &src) const
96  {
97  return !operator==(src);
98  }
102 
103 
104 
105  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
106  {
107  myBlend = 0;
108  if (true)
109  graph->evalOpParm(myBlend, nodeidx, "blend", time, 0);
110  myAttribs = "*"_UTsh;
111  if (true)
112  graph->evalOpParm(myAttribs, nodeidx, "attribs", time, 0);
113  myPtIDAttr = "id"_UTsh;
114  if (true)
115  graph->evalOpParm(myPtIDAttr, nodeidx, "ptidattr", time, 0);
116  myUnmatchedPoints = 0;
117  if (true)
118  graph->evalOpParm(myUnmatchedPoints, nodeidx, "unmatchedpts", time, 0);
119  myUnmatchedPointGroup = "unmatched"_UTsh;
120  if (true && ( (true&&!(((int64(getUnmatchedPoints())!=2)))) ) )
121  graph->evalOpParm(myUnmatchedPointGroup, nodeidx, "unmatchedgroup", time, 0);
122  myPrimIDAttr = "name"_UTsh;
123  if (true)
124  graph->evalOpParm(myPrimIDAttr, nodeidx, "primidattr", time, 0);
125  myVoxelBlend = 0;
126  if (true)
127  graph->evalOpParm(myVoxelBlend, nodeidx, "voxelblend", time, 0);
128  myAdvectionDT = 0.0416667;
129  if (true && ( (true&&!(((int64(getVoxelBlend())!=3)))) ) )
130  graph->evalOpParm(myAdvectionDT, nodeidx, "adt", time, 0);
131  myVelocityField = "vel"_UTsh;
132  if (true && ( (true&&!(((int64(getVoxelBlend())!=3)))) ) )
133  graph->evalOpParm(myVelocityField, nodeidx, "velocity", time, 0);
134  myDoSlerp = true;
135  if (true)
136  graph->evalOpParm(myDoSlerp, nodeidx, "doslerp", time, 0);
137  myInterp = 0;
138  if (true)
139  graph->evalOpParm(myInterp, nodeidx, "interp", time, 0);
140  myUseVForPInterp = false;
141  if (true && ( (true&&!(((int64(getInterp())!=0)))) ) )
142  graph->evalOpParm(myUseVForPInterp, nodeidx, "usevforpinterp", time, 0);
143  myTimeStep = 0;
144  if (true && ( (true&&!(((getUseVForPInterp()==0)&&(int64(getVoxelBlend())!=3)))) ) )
145  graph->evalOpParm(myTimeStep, nodeidx, "timestep", time, 0);
146 
147  }
148 
149 
150  void loadFromOpSubclass(const LoadParms &loadparms) override
151  {
152  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
153  }
154 
155 
156  void copyFrom(const OP_NodeParms *src) override
157  {
158  *this = *((const SOP_SBlend_2_0Parms *)src);
159  }
160 
161  template <typename T>
162  void
163  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
164  {
165  if (idx.size() < 1)
166  return;
167  UT_ASSERT(idx.size() == instance.size()+1);
168  if (idx.size() != instance.size()+1)
169  return;
170  switch (idx[0])
171  {
172  case 0:
173  coerceValue(value, myBlend);
174  break;
175  case 1:
176  coerceValue(value, myAttribs);
177  break;
178  case 2:
179  coerceValue(value, myPtIDAttr);
180  break;
181  case 3:
182  coerceValue(value, myUnmatchedPoints);
183  break;
184  case 4:
185  coerceValue(value, myUnmatchedPointGroup);
186  break;
187  case 5:
188  coerceValue(value, myPrimIDAttr);
189  break;
190  case 6:
191  coerceValue(value, myVoxelBlend);
192  break;
193  case 7:
194  coerceValue(value, myAdvectionDT);
195  break;
196  case 8:
197  coerceValue(value, myVelocityField);
198  break;
199  case 9:
200  coerceValue(value, myDoSlerp);
201  break;
202  case 10:
203  coerceValue(value, myInterp);
204  break;
205  case 11:
206  coerceValue(value, myUseVForPInterp);
207  break;
208  case 12:
209  coerceValue(value, myTimeStep);
210  break;
211 
212  }
213  }
214 
215  bool isParmColorRamp(exint idx) const override
216  {
217  switch (idx)
218  {
219 
220  }
221  return false;
222  }
223 
224  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
245  { doGetParmValue(idx, instance, value); }
246 
247  template <typename T>
248  void
249  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
250  {
251  if (idx.size() < 1)
252  return;
253  UT_ASSERT(idx.size() == instance.size()+1);
254  if (idx.size() != instance.size()+1)
255  return;
256  switch (idx[0])
257  {
258  case 0:
259  coerceValue(myBlend, clampMinValue(0, ( value ) ));
260  break;
261  case 1:
262  coerceValue(myAttribs, ( ( value ) ));
263  break;
264  case 2:
265  coerceValue(myPtIDAttr, ( ( value ) ));
266  break;
267  case 3:
268  coerceValue(myUnmatchedPoints, clampMinValue(0, clampMaxValue(2, value ) ));
269  break;
270  case 4:
271  coerceValue(myUnmatchedPointGroup, ( ( value ) ));
272  break;
273  case 5:
274  coerceValue(myPrimIDAttr, ( ( value ) ));
275  break;
276  case 6:
277  coerceValue(myVoxelBlend, clampMinValue(0, clampMaxValue(3, value ) ));
278  break;
279  case 7:
280  coerceValue(myAdvectionDT, clampMinValue(0, ( value ) ));
281  break;
282  case 8:
283  coerceValue(myVelocityField, ( ( value ) ));
284  break;
285  case 9:
286  coerceValue(myDoSlerp, ( ( value ) ));
287  break;
288  case 10:
289  coerceValue(myInterp, clampMinValue(0, clampMaxValue(2, value ) ));
290  break;
291  case 11:
292  coerceValue(myUseVForPInterp, ( ( value ) ));
293  break;
294  case 12:
295  coerceValue(myTimeStep, clampMinValue(0, ( value ) ));
296  break;
297 
298  }
299  }
300 
301  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
314  { doSetParmValue(idx, instance, value); }
315  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
316  { doSetParmValue(idx, instance, value); }
317  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
318  { doSetParmValue(idx, instance, value); }
319  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
320  { doSetParmValue(idx, instance, value); }
321  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
322  { doSetParmValue(idx, instance, value); }
323 
324  exint getNestNumParms(TempIndex idx) const override
325  {
326  if (idx.size() == 0)
327  return 13;
328  switch (idx[0])
329  {
330 
331  }
332  // Invalid
333  return 0;
334  }
335 
336  const char *getNestParmName(TempIndex fieldnum) const override
337  {
338  if (fieldnum.size() < 1)
339  return 0;
340  switch (fieldnum[0])
341  {
342  case 0:
343  return "blend";
344  case 1:
345  return "attribs";
346  case 2:
347  return "ptidattr";
348  case 3:
349  return "unmatchedpts";
350  case 4:
351  return "unmatchedgroup";
352  case 5:
353  return "primidattr";
354  case 6:
355  return "voxelblend";
356  case 7:
357  return "adt";
358  case 8:
359  return "velocity";
360  case 9:
361  return "doslerp";
362  case 10:
363  return "interp";
364  case 11:
365  return "usevforpinterp";
366  case 12:
367  return "timestep";
368 
369  }
370  return 0;
371  }
372 
373  ParmType getNestParmType(TempIndex fieldnum) const override
374  {
375  if (fieldnum.size() < 1)
376  return PARM_UNSUPPORTED;
377  switch (fieldnum[0])
378  {
379  case 0:
380  return PARM_FLOAT;
381  case 1:
382  return PARM_STRING;
383  case 2:
384  return PARM_STRING;
385  case 3:
386  return PARM_INTEGER;
387  case 4:
388  return PARM_STRING;
389  case 5:
390  return PARM_STRING;
391  case 6:
392  return PARM_INTEGER;
393  case 7:
394  return PARM_FLOAT;
395  case 8:
396  return PARM_STRING;
397  case 9:
398  return PARM_INTEGER;
399  case 10:
400  return PARM_INTEGER;
401  case 11:
402  return PARM_INTEGER;
403  case 12:
404  return PARM_FLOAT;
405 
406  }
407  return PARM_UNSUPPORTED;
408  }
409 
410  // Boiler plate to load individual types.
411  static void loadData(UT_IStream &is, int64 &v)
412  { is.bread(&v, 1); }
413  static void loadData(UT_IStream &is, bool &v)
414  { int64 iv; is.bread(&iv, 1); v = iv; }
415  static void loadData(UT_IStream &is, fpreal64 &v)
416  { is.bread<fpreal64>(&v, 1); }
417  static void loadData(UT_IStream &is, UT_Vector2D &v)
418  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
419  static void loadData(UT_IStream &is, UT_Vector3D &v)
420  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
421  is.bread<fpreal64>(&v.z(), 1); }
422  static void loadData(UT_IStream &is, UT_Vector4D &v)
423  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
424  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
425  static void loadData(UT_IStream &is, UT_Matrix2D &v)
426  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
427  static void loadData(UT_IStream &is, UT_Matrix3D &v)
428  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
429  static void loadData(UT_IStream &is, UT_Matrix4D &v)
430  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
431  static void loadData(UT_IStream &is, UT_Vector2I &v)
432  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
433  static void loadData(UT_IStream &is, UT_Vector3I &v)
434  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
435  is.bread<int64>(&v.z(), 1); }
436  static void loadData(UT_IStream &is, UT_Vector4I &v)
437  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
438  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
440  { is.bread(v); }
442  { UT_StringHolder rampdata;
443  loadData(is, rampdata);
444  if (rampdata.isstring())
445  {
446  v.reset(new UT_Ramp());
447  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
448  v->load(istr);
449  }
450  else v.reset();
451  }
454  loadData(is, data);
455  if (data.isstring())
456  {
457  // Find the data type.
458  const char *colon = UT_StringWrap(data).findChar(':');
459  if (colon)
460  {
461  int typelen = colon - data.buffer();
463  type.strncpy(data.buffer(), typelen);
464  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
465 
466  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
467  }
468  }
469  else v.reset();
470  }
471 
472  static void saveData(std::ostream &os, int64 v)
473  { UTwrite(os, &v); }
474  static void saveData(std::ostream &os, bool v)
475  { int64 iv = v; UTwrite(os, &iv); }
476  static void saveData(std::ostream &os, fpreal64 v)
477  { UTwrite<fpreal64>(os, &v); }
478  static void saveData(std::ostream &os, UT_Vector2D v)
479  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
480  static void saveData(std::ostream &os, UT_Vector3D v)
481  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
482  UTwrite<fpreal64>(os, &v.z()); }
483  static void saveData(std::ostream &os, UT_Vector4D v)
484  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
485  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
486  static void saveData(std::ostream &os, UT_Matrix2D v)
488  static void saveData(std::ostream &os, UT_Matrix3D v)
490  static void saveData(std::ostream &os, UT_Matrix4D v)
492  static void saveData(std::ostream &os, UT_StringHolder s)
493  { UT_StringWrap(s).saveBinary(os); }
494  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
496  UT_OStringStream ostr;
497  if (s) s->save(ostr);
498  result = ostr.str();
499  saveData(os, result);
500  }
501  static void saveData(std::ostream &os, PRM_DataItemHandle s)
503  UT_OStringStream ostr;
504  if (s)
505  {
506  ostr << s->getDataTypeToken();
507  ostr << ":";
508  s->saveBinary(ostr);
509  }
510  result = ostr.str();
511  saveData(os, result);
512  }
513 
514 
515  void save(std::ostream &os) const
516  {
517  int32 v = version();
518  UTwrite(os, &v);
519  saveData(os, myBlend);
520  saveData(os, myAttribs);
521  saveData(os, myPtIDAttr);
522  saveData(os, myUnmatchedPoints);
523  saveData(os, myUnmatchedPointGroup);
524  saveData(os, myPrimIDAttr);
525  saveData(os, myVoxelBlend);
526  saveData(os, myAdvectionDT);
527  saveData(os, myVelocityField);
528  saveData(os, myDoSlerp);
529  saveData(os, myInterp);
530  saveData(os, myUseVForPInterp);
531  saveData(os, myTimeStep);
532 
533  }
534 
535  bool load(UT_IStream &is)
536  {
537  int32 v;
538  is.bread(&v, 1);
539  if (version() != v)
540  {
541  // Fail incompatible versions
542  return false;
543  }
544  loadData(is, myBlend);
545  loadData(is, myAttribs);
546  loadData(is, myPtIDAttr);
547  loadData(is, myUnmatchedPoints);
548  loadData(is, myUnmatchedPointGroup);
549  loadData(is, myPrimIDAttr);
550  loadData(is, myVoxelBlend);
551  loadData(is, myAdvectionDT);
552  loadData(is, myVelocityField);
553  loadData(is, myDoSlerp);
554  loadData(is, myInterp);
555  loadData(is, myUseVForPInterp);
556  loadData(is, myTimeStep);
557 
558  return true;
559  }
560 
561  fpreal64 getBlend() const { return myBlend; }
562  void setBlend(fpreal64 val) { myBlend = val; }
563  fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
564  {
565  SOP_Node *thissop = cookparms.getNode();
566  if (!thissop) return getBlend();
568  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
569  return result;
570  }
571  const UT_StringHolder & getAttribs() const { return myAttribs; }
572  void setAttribs(const UT_StringHolder & val) { myAttribs = val; }
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getAttribs();
578  OP_Utils::evalOpParm(result, thissop, "attribs", cookparms.getCookTime(), 0);
579  return result;
580  }
581  const UT_StringHolder & getPtIDAttr() const { return myPtIDAttr; }
582  void setPtIDAttr(const UT_StringHolder & val) { myPtIDAttr = val; }
584  {
585  SOP_Node *thissop = cookparms.getNode();
586  if (!thissop) return getPtIDAttr();
588  OP_Utils::evalOpParm(result, thissop, "ptidattr", cookparms.getCookTime(), 0);
589  return result;
590  }
591  UnmatchedPoints getUnmatchedPoints() const { return UnmatchedPoints(myUnmatchedPoints); }
592  void setUnmatchedPoints(UnmatchedPoints val) { myUnmatchedPoints = int64(val); }
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getUnmatchedPoints();
597  int64 result;
598  OP_Utils::evalOpParm(result, thissop, "unmatchedpts", cookparms.getCookTime(), 0);
599  return UnmatchedPoints(result);
600  }
601  const UT_StringHolder & getUnmatchedPointGroup() const { return myUnmatchedPointGroup; }
602  void setUnmatchedPointGroup(const UT_StringHolder & val) { myUnmatchedPointGroup = val; }
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getUnmatchedPointGroup();
608  OP_Utils::evalOpParm(result, thissop, "unmatchedgroup", cookparms.getCookTime(), 0);
609  return result;
610  }
611  const UT_StringHolder & getPrimIDAttr() const { return myPrimIDAttr; }
612  void setPrimIDAttr(const UT_StringHolder & val) { myPrimIDAttr = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getPrimIDAttr();
618  OP_Utils::evalOpParm(result, thissop, "primidattr", cookparms.getCookTime(), 0);
619  return result;
620  }
621  VoxelBlend getVoxelBlend() const { return VoxelBlend(myVoxelBlend); }
622  void setVoxelBlend(VoxelBlend val) { myVoxelBlend = int64(val); }
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getVoxelBlend();
627  int64 result;
628  OP_Utils::evalOpParm(result, thissop, "voxelblend", cookparms.getCookTime(), 0);
629  return VoxelBlend(result);
630  }
631  fpreal64 getAdvectionDT() const { return myAdvectionDT; }
632  void setAdvectionDT(fpreal64 val) { myAdvectionDT = val; }
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getAdvectionDT();
638  OP_Utils::evalOpParm(result, thissop, "adt", cookparms.getCookTime(), 0);
639  return result;
640  }
641  const UT_StringHolder & getVelocityField() const { return myVelocityField; }
642  void setVelocityField(const UT_StringHolder & val) { myVelocityField = val; }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getVelocityField();
648  OP_Utils::evalOpParm(result, thissop, "velocity", cookparms.getCookTime(), 0);
649  return result;
650  }
651  bool getDoSlerp() const { return myDoSlerp; }
652  void setDoSlerp(bool val) { myDoSlerp = val; }
653  bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
654  {
655  SOP_Node *thissop = cookparms.getNode();
656  if (!thissop) return getDoSlerp();
657  bool result;
658  OP_Utils::evalOpParm(result, thissop, "doslerp", cookparms.getCookTime(), 0);
659  return result;
660  }
661  Interp getInterp() const { return Interp(myInterp); }
662  void setInterp(Interp val) { myInterp = int64(val); }
663  Interp opInterp(const SOP_NodeVerb::CookParms &cookparms) const
664  {
665  SOP_Node *thissop = cookparms.getNode();
666  if (!thissop) return getInterp();
667  int64 result;
668  OP_Utils::evalOpParm(result, thissop, "interp", cookparms.getCookTime(), 0);
669  return Interp(result);
670  }
671  bool getUseVForPInterp() const { return myUseVForPInterp; }
672  void setUseVForPInterp(bool val) { myUseVForPInterp = val; }
673  bool opUseVForPInterp(const SOP_NodeVerb::CookParms &cookparms) const
674  {
675  SOP_Node *thissop = cookparms.getNode();
676  if (!thissop) return getUseVForPInterp();
677  bool result;
678  OP_Utils::evalOpParm(result, thissop, "usevforpinterp", cookparms.getCookTime(), 0);
679  return result;
680  }
681  fpreal64 getTimeStep() const { return myTimeStep; }
682  void setTimeStep(fpreal64 val) { myTimeStep = val; }
684  {
685  SOP_Node *thissop = cookparms.getNode();
686  if (!thissop) return getTimeStep();
688  OP_Utils::evalOpParm(result, thissop, "timestep", cookparms.getCookTime(), 0);
689  return result;
690  }
691 
692 private:
693  fpreal64 myBlend;
694  UT_StringHolder myAttribs;
695  UT_StringHolder myPtIDAttr;
696  int64 myUnmatchedPoints;
697  UT_StringHolder myUnmatchedPointGroup;
698  UT_StringHolder myPrimIDAttr;
699  int64 myVoxelBlend;
700  fpreal64 myAdvectionDT;
701  UT_StringHolder myVelocityField;
702  bool myDoSlerp;
703  int64 myInterp;
704  bool myUseVForPInterp;
705  fpreal64 myTimeStep;
706 
707 };
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opPtIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
VoxelBlend getVoxelBlend() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
fpreal64 getAdvectionDT() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const UT_StringHolder & getVelocityField() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setTimeStep(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector2D 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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Interp opInterp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE const char * buffer() const
const char * getNestParmName(TempIndex fieldnum) const override
GLdouble s
Definition: glad.h:3009
UT_StringHolder opUnmatchedPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opUseVForPInterp(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setUseVForPInterp(bool val)
void setVelocityField(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void save(std::ostream &os) const
UT_StringHolder opVelocityField(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:613
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setUnmatchedPoints(UnmatchedPoints val)
UnmatchedPoints opUnmatchedPoints(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix3D v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_StringHolder &v)
VoxelBlend opVoxelBlend(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribs(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool load(UT_IStream &is)
double fpreal64
Definition: SYS_Types.h:201
fpreal64 getTimeStep() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getPrimIDAttr() const
void setVoxelBlend(VoxelBlend val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
exint length() const
SYS_FORCE_INLINE const char * buffer() const
void setBlend(fpreal64 val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setAttribs(const UT_StringHolder &val)
bool operator==(const SOP_SBlend_2_0Parms &src) const
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator!=(const SOP_SBlend_2_0Parms &src) const
long long int64
Definition: SYS_Types.h:116
void setAdvectionDT(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
fpreal64 opAdvectionDT(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Matrix2D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void setInterp(Interp val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder version
void setPrimIDAttr(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UnmatchedPoints getUnmatchedPoints() const
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
UT_StringHolder opPrimIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
static void saveData(std::ostream &os, bool v)
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setPtIDAttr(const UT_StringHolder &val)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getPtIDAttr() const
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void setUnmatchedPointGroup(const UT_StringHolder &val)
Definition: core.h:1131
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 getBlend() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_StringHolder & getUnmatchedPointGroup() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const UT_StringHolder & getAttribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
type
Definition: core.h:1059
bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, int64 v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
bool getUseVForPInterp() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
fpreal64 opTimeStep(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663