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