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