HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Fuse.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_FuseEnums
24 {
25  enum class Grouppropagation
26  {
27  LEASTPOINTNUMBER = 0,
28  UNION,
29  INTERSECT
30  };
31  enum class Snaptype
32  {
33  AVERAGE = 0,
34  LOWEST,
35  HIGHEST
36  };
37  enum class Gridtype
38  {
39  SPACING = 0,
40  LINES,
41  POW2
42  };
43  enum class Gridround
44  {
45  NEAREST = 0,
46  DOWN,
47  UP
48  };
49 }
50 
51 
53 {
54 public:
55  static int version() { return 1; }
56 
58  {
59  myGroup = ""_sh;
60  myUsedist = true;
61  myDist = 0.001;
62  myDeldegen = true;
63  myKeepunusedpoints = false;
64  myKeepconsolidatedpoints = false;
65  myGrouppropagation = 0;
66  mySwitcher = 0;
67  mySnaptype = 0;
68  myTol3d = 0.001;
69  mySnappointpos = true;
70  mySnappointattribs = false;
71  myPointattribnames = ""_sh;
72  mySnapswitcher = 0;
73  myGridtype = 0;
74  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
75  myGridlines = UT_Vector3D(10,10,10);
76  myGridpow2 = UT_Vector3I(3,3,3);
77  myGridoffset = UT_Vector3D(0,0,0);
78  myGridround = 0;
79  myGridtol = 10;
80  myUpdatenml = true;
81  myAccurate = true;
82 
83  }
84 
85  explicit SOP_FuseParms(const SOP_FuseParms &) = default;
86 
87  ~SOP_FuseParms() override {}
88 
89  bool operator==(const SOP_FuseParms &src) const
90  {
91  if (myGroup != src.myGroup) return false;
92  if (myUsedist != src.myUsedist) return false;
93  if (myDist != src.myDist) return false;
94  if (myDeldegen != src.myDeldegen) return false;
95  if (myKeepunusedpoints != src.myKeepunusedpoints) return false;
96  if (myKeepconsolidatedpoints != src.myKeepconsolidatedpoints) return false;
97  if (myGrouppropagation != src.myGrouppropagation) return false;
98  if (mySwitcher != src.mySwitcher) return false;
99  if (mySnaptype != src.mySnaptype) return false;
100  if (myTol3d != src.myTol3d) return false;
101  if (mySnappointpos != src.mySnappointpos) return false;
102  if (mySnappointattribs != src.mySnappointattribs) return false;
103  if (myPointattribnames != src.myPointattribnames) return false;
104  if (mySnapswitcher != src.mySnapswitcher) return false;
105  if (myGridtype != src.myGridtype) return false;
106  if (myGridspacing != src.myGridspacing) return false;
107  if (myGridlines != src.myGridlines) return false;
108  if (myGridpow2 != src.myGridpow2) return false;
109  if (myGridoffset != src.myGridoffset) return false;
110  if (myGridround != src.myGridround) return false;
111  if (myGridtol != src.myGridtol) return false;
112  if (myUpdatenml != src.myUpdatenml) return false;
113  if (myAccurate != src.myAccurate) return false;
114 
115  return true;
116  }
117  bool operator!=(const SOP_FuseParms &src) const
118  {
119  return !operator==(src);
120  }
125 
126 
127 
128  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
129  {
130  myGroup = ""_sh;
131  if (true)
132  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
133  myUsedist = true;
134  if (true)
135  graph->evalOpParm(myUsedist, nodeidx, "usedist", time, 0);
136  myDist = 0.001;
137  if (true && ( (!(((getUsedist()==0)))) ) )
138  graph->evalOpParm(myDist, nodeidx, "dist", time, 0);
139  myDeldegen = true;
140  if (true)
141  graph->evalOpParm(myDeldegen, nodeidx, "deldegen", time, 0);
142  myKeepunusedpoints = false;
143  if (true)
144  graph->evalOpParm(myKeepunusedpoints, nodeidx, "keepunusedpoints", time, 0);
145  myKeepconsolidatedpoints = false;
146  if (true)
147  graph->evalOpParm(myKeepconsolidatedpoints, nodeidx, "keepconsolidatedpoints", time, 0);
148  myGrouppropagation = 0;
149  if (true)
150  graph->evalOpParm(myGrouppropagation, nodeidx, "grouppropagation", time, 0);
151  mySwitcher = 0;
152  if (true)
153  graph->evalOpParm(mySwitcher, nodeidx, "switcher", time, 0);
154  mySnaptype = 0;
155  if (true)
156  graph->evalOpParm(mySnaptype, nodeidx, "snaptype", time, 0);
157  myTol3d = 0.001;
158  if (true)
159  graph->evalOpParm(myTol3d, nodeidx, "tol3d", time, 0);
160  mySnappointpos = true;
161  if (true)
162  graph->evalOpParm(mySnappointpos, nodeidx, "snappointpos", time, 0);
163  mySnappointattribs = false;
164  if (true)
165  graph->evalOpParm(mySnappointattribs, nodeidx, "snappointattribs", time, 0);
166  myPointattribnames = ""_sh;
167  if (true && ( (!(((getSnappointattribs()==0)))) ) )
168  graph->evalOpParm(myPointattribnames, nodeidx, "pointattribnames", time, 0);
169  mySnapswitcher = 0;
170  if (true)
171  graph->evalOpParm(mySnapswitcher, nodeidx, "snapswitcher", time, 0);
172  myGridtype = 0;
173  if (true)
174  graph->evalOpParm(myGridtype, nodeidx, "gridtype", time, 0);
175  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
176  if (true && ( (!(((int64(getGridtype())!=0)))) ) )
177  graph->evalOpParm(myGridspacing, nodeidx, "gridspacing", time, 0);
178  myGridlines = UT_Vector3D(10,10,10);
179  if (true && ( (!(((int64(getGridtype())!=1)))) ) )
180  graph->evalOpParm(myGridlines, nodeidx, "gridlines", time, 0);
181  myGridpow2 = UT_Vector3I(3,3,3);
182  if (true && ( (!(((int64(getGridtype())!=2)))) ) )
183  graph->evalOpParm(myGridpow2, nodeidx, "gridpow2", time, 0);
184  myGridoffset = UT_Vector3D(0,0,0);
185  if (true)
186  graph->evalOpParm(myGridoffset, nodeidx, "gridoffset", time, 0);
187  myGridround = 0;
188  if (true)
189  graph->evalOpParm(myGridround, nodeidx, "gridround", time, 0);
190  myGridtol = 10;
191  if (true)
192  graph->evalOpParm(myGridtol, nodeidx, "gridtol", time, 0);
193  myUpdatenml = true;
194  if (true)
195  graph->evalOpParm(myUpdatenml, nodeidx, "updatenml", time, 0);
196  myAccurate = true;
197  if (true && ( (!(((int64(getSwitcher())==1))||((int64(getSwitcher())==2)&&(int64(getSnapswitcher())!=0)))) ) )
198  graph->evalOpParm(myAccurate, nodeidx, "accurate", time, 0);
199 
200  }
201 
202 
203  void loadFromOpSubclass(const LoadParms &loadparms) override
204  {
205  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
206  }
207 
208 
209  void copyFrom(const SOP_NodeParms *src) override
210  {
211  *this = *((const SOP_FuseParms *)src);
212  }
213 
214  template <typename T>
215  void
216  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
217  {
218  if (idx.size() < 1)
219  return;
220  UT_ASSERT(idx.size() == instance.size()+1);
221  if (idx.size() != instance.size()+1)
222  return;
223  switch (idx[0])
224  {
225  case 0:
226  coerceValue(value, myGroup);
227  break;
228  case 1:
229  coerceValue(value, myUsedist);
230  break;
231  case 2:
232  coerceValue(value, myDist);
233  break;
234  case 3:
235  coerceValue(value, myDeldegen);
236  break;
237  case 4:
238  coerceValue(value, myKeepunusedpoints);
239  break;
240  case 5:
241  coerceValue(value, myKeepconsolidatedpoints);
242  break;
243  case 6:
244  coerceValue(value, myGrouppropagation);
245  break;
246  case 7:
247  coerceValue(value, mySwitcher);
248  break;
249  case 8:
250  coerceValue(value, mySnaptype);
251  break;
252  case 9:
253  coerceValue(value, myTol3d);
254  break;
255  case 10:
256  coerceValue(value, mySnappointpos);
257  break;
258  case 11:
259  coerceValue(value, mySnappointattribs);
260  break;
261  case 12:
262  coerceValue(value, myPointattribnames);
263  break;
264  case 13:
265  coerceValue(value, mySnapswitcher);
266  break;
267  case 14:
268  coerceValue(value, myGridtype);
269  break;
270  case 15:
271  coerceValue(value, myGridspacing);
272  break;
273  case 16:
274  coerceValue(value, myGridlines);
275  break;
276  case 17:
277  coerceValue(value, myGridpow2);
278  break;
279  case 18:
280  coerceValue(value, myGridoffset);
281  break;
282  case 19:
283  coerceValue(value, myGridround);
284  break;
285  case 20:
286  coerceValue(value, myGridtol);
287  break;
288  case 21:
289  coerceValue(value, myUpdatenml);
290  break;
291  case 22:
292  coerceValue(value, myAccurate);
293  break;
294 
295  }
296  }
297 
298  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
299  { doGetParmValue(idx, instance, value); }
300  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
301  { doGetParmValue(idx, instance, value); }
302  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
303  { doGetParmValue(idx, instance, value); }
304  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
305  { doGetParmValue(idx, instance, value); }
306  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
307  { doGetParmValue(idx, instance, value); }
308  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
309  { doGetParmValue(idx, instance, value); }
310  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
311  { doGetParmValue(idx, instance, value); }
312  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
313  { doGetParmValue(idx, instance, value); }
314  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
315  { doGetParmValue(idx, instance, value); }
316  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
317  { doGetParmValue(idx, instance, value); }
318  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
319  { doGetParmValue(idx, instance, value); }
320 
321  template <typename T>
322  void
323  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
324  {
325  if (idx.size() < 1)
326  return;
327  UT_ASSERT(idx.size() == instance.size()+1);
328  if (idx.size() != instance.size()+1)
329  return;
330  switch (idx[0])
331  {
332  case 0:
333  coerceValue(myGroup, value);
334  break;
335  case 1:
336  coerceValue(myUsedist, value);
337  break;
338  case 2:
339  coerceValue(myDist, value);
340  break;
341  case 3:
342  coerceValue(myDeldegen, value);
343  break;
344  case 4:
345  coerceValue(myKeepunusedpoints, value);
346  break;
347  case 5:
348  coerceValue(myKeepconsolidatedpoints, value);
349  break;
350  case 6:
351  coerceValue(myGrouppropagation, value);
352  break;
353  case 7:
354  coerceValue(mySwitcher, value);
355  break;
356  case 8:
357  coerceValue(mySnaptype, value);
358  break;
359  case 9:
360  coerceValue(myTol3d, value);
361  break;
362  case 10:
363  coerceValue(mySnappointpos, value);
364  break;
365  case 11:
366  coerceValue(mySnappointattribs, value);
367  break;
368  case 12:
369  coerceValue(myPointattribnames, value);
370  break;
371  case 13:
372  coerceValue(mySnapswitcher, value);
373  break;
374  case 14:
375  coerceValue(myGridtype, value);
376  break;
377  case 15:
378  coerceValue(myGridspacing, value);
379  break;
380  case 16:
381  coerceValue(myGridlines, value);
382  break;
383  case 17:
384  coerceValue(myGridpow2, value);
385  break;
386  case 18:
387  coerceValue(myGridoffset, value);
388  break;
389  case 19:
390  coerceValue(myGridround, value);
391  break;
392  case 20:
393  coerceValue(myGridtol, value);
394  break;
395  case 21:
396  coerceValue(myUpdatenml, value);
397  break;
398  case 22:
399  coerceValue(myAccurate, value);
400  break;
401 
402  }
403  }
404 
405  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
406  { doSetParmValue(idx, instance, value); }
407  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
408  { doSetParmValue(idx, instance, value); }
409  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
410  { doSetParmValue(idx, instance, value); }
411  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
412  { doSetParmValue(idx, instance, value); }
413  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
414  { doSetParmValue(idx, instance, value); }
415  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
416  { doSetParmValue(idx, instance, value); }
417  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
418  { doSetParmValue(idx, instance, value); }
419  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
420  { doSetParmValue(idx, instance, value); }
421  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
422  { doSetParmValue(idx, instance, value); }
423  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
424  { doSetParmValue(idx, instance, value); }
425  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
426  { doSetParmValue(idx, instance, value); }
427 
428  exint getNestNumParms(TempIndex idx) const override
429  {
430  if (idx.size() == 0)
431  return 23;
432  switch (idx[0])
433  {
434 
435  }
436  // Invalid
437  return 0;
438  }
439 
440  const char *getNestParmName(TempIndex fieldnum) const override
441  {
442  if (fieldnum.size() < 1)
443  return 0;
444  switch (fieldnum[0])
445  {
446  case 0:
447  return "group";
448  case 1:
449  return "usedist";
450  case 2:
451  return "dist";
452  case 3:
453  return "deldegen";
454  case 4:
455  return "keepunusedpoints";
456  case 5:
457  return "keepconsolidatedpoints";
458  case 6:
459  return "grouppropagation";
460  case 7:
461  return "switcher";
462  case 8:
463  return "snaptype";
464  case 9:
465  return "tol3d";
466  case 10:
467  return "snappointpos";
468  case 11:
469  return "snappointattribs";
470  case 12:
471  return "pointattribnames";
472  case 13:
473  return "snapswitcher";
474  case 14:
475  return "gridtype";
476  case 15:
477  return "gridspacing";
478  case 16:
479  return "gridlines";
480  case 17:
481  return "gridpow2";
482  case 18:
483  return "gridoffset";
484  case 19:
485  return "gridround";
486  case 20:
487  return "gridtol";
488  case 21:
489  return "updatenml";
490  case 22:
491  return "accurate";
492 
493  }
494  return 0;
495  }
496 
497  ParmType getNestParmType(TempIndex fieldnum) const override
498  {
499  if (fieldnum.size() < 1)
500  return PARM_UNSUPPORTED;
501  switch (fieldnum[0])
502  {
503  case 0:
504  return PARM_STRING;
505  case 1:
506  return PARM_INTEGER;
507  case 2:
508  return PARM_FLOAT;
509  case 3:
510  return PARM_INTEGER;
511  case 4:
512  return PARM_INTEGER;
513  case 5:
514  return PARM_INTEGER;
515  case 6:
516  return PARM_INTEGER;
517  case 7:
518  return PARM_INTEGER;
519  case 8:
520  return PARM_INTEGER;
521  case 9:
522  return PARM_FLOAT;
523  case 10:
524  return PARM_INTEGER;
525  case 11:
526  return PARM_INTEGER;
527  case 12:
528  return PARM_STRING;
529  case 13:
530  return PARM_INTEGER;
531  case 14:
532  return PARM_INTEGER;
533  case 15:
534  return PARM_VECTOR3;
535  case 16:
536  return PARM_VECTOR3;
537  case 17:
538  return PARM_VECTOR3;
539  case 18:
540  return PARM_VECTOR3;
541  case 19:
542  return PARM_INTEGER;
543  case 20:
544  return PARM_FLOAT;
545  case 21:
546  return PARM_INTEGER;
547  case 22:
548  return PARM_INTEGER;
549 
550  }
551  return PARM_UNSUPPORTED;
552  }
553 
554  // Boiler plate to load individual types.
555  static void loadData(UT_IStream &is, int64 &v)
556  { is.bread(&v, 1); }
557  static void loadData(UT_IStream &is, bool &v)
558  { int64 iv; is.bread(&iv, 1); v = iv; }
559  static void loadData(UT_IStream &is, fpreal64 &v)
560  { is.bread<fpreal64>(&v, 1); }
561  static void loadData(UT_IStream &is, UT_Vector2D &v)
562  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
563  static void loadData(UT_IStream &is, UT_Vector3D &v)
564  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
565  is.bread<fpreal64>(&v.z(), 1); }
566  static void loadData(UT_IStream &is, UT_Vector4D &v)
567  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
568  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
569  static void loadData(UT_IStream &is, UT_Matrix2D &v)
570  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
571  static void loadData(UT_IStream &is, UT_Matrix3D &v)
572  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
573  static void loadData(UT_IStream &is, UT_Matrix4D &v)
574  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
575  static void loadData(UT_IStream &is, UT_Vector2I &v)
576  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
577  static void loadData(UT_IStream &is, UT_Vector3I &v)
578  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
579  is.bread<int64>(&v.z(), 1); }
580  static void loadData(UT_IStream &is, UT_Vector4I &v)
581  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
582  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
584  { is.bread(v); }
586  { UT_StringHolder rampdata;
587  loadData(is, rampdata);
588  if (rampdata.isstring())
589  {
590  v.reset(new UT_Ramp());
591  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
592  v->load(istr);
593  }
594  else v.reset();
595  }
598  loadData(is, data);
599  if (data.isstring())
600  {
601  // Find the data type.
602  const char *colon = UT_StringWrap(data).findChar(':');
603  if (colon)
604  {
605  int typelen = colon - data.buffer();
607  type.strncpy(data.buffer(), typelen);
608  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
609 
610  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
611  }
612  }
613  else v.reset();
614  }
615 
616  static void saveData(std::ostream &os, int64 v)
617  { UTwrite(os, &v); }
618  static void saveData(std::ostream &os, bool v)
619  { int64 iv = v; UTwrite(os, &iv); }
620  static void saveData(std::ostream &os, fpreal64 v)
621  { UTwrite<fpreal64>(os, &v); }
622  static void saveData(std::ostream &os, UT_Vector2D v)
623  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
624  static void saveData(std::ostream &os, UT_Vector3D v)
625  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
626  UTwrite<fpreal64>(os, &v.z()); }
627  static void saveData(std::ostream &os, UT_Vector4D v)
628  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
629  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
630  static void saveData(std::ostream &os, UT_Matrix2D v)
632  static void saveData(std::ostream &os, UT_Matrix3D v)
634  static void saveData(std::ostream &os, UT_Matrix4D v)
636  static void saveData(std::ostream &os, UT_StringHolder s)
637  { UT_StringWrap(s).saveBinary(os); }
638  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
640  UT_OStringStream ostr;
641  if (s) s->save(ostr);
642  result = ostr.str();
643  saveData(os, result);
644  }
645  static void saveData(std::ostream &os, PRM_DataItemHandle s)
647  UT_OStringStream ostr;
648  if (s)
649  {
650  ostr << s->getDataTypeToken();
651  ostr << ":";
652  s->saveBinary(ostr);
653  }
654  result = ostr.str();
655  saveData(os, result);
656  }
657 
658 
659  void save(std::ostream &os) const
660  {
661  int32 v = version();
662  UTwrite(os, &v);
663  saveData(os, myGroup);
664  saveData(os, myUsedist);
665  saveData(os, myDist);
666  saveData(os, myDeldegen);
667  saveData(os, myKeepunusedpoints);
668  saveData(os, myKeepconsolidatedpoints);
669  saveData(os, myGrouppropagation);
670  saveData(os, mySwitcher);
671  saveData(os, mySnaptype);
672  saveData(os, myTol3d);
673  saveData(os, mySnappointpos);
674  saveData(os, mySnappointattribs);
675  saveData(os, myPointattribnames);
676  saveData(os, mySnapswitcher);
677  saveData(os, myGridtype);
678  saveData(os, myGridspacing);
679  saveData(os, myGridlines);
680  saveData(os, myGridpow2);
681  saveData(os, myGridoffset);
682  saveData(os, myGridround);
683  saveData(os, myGridtol);
684  saveData(os, myUpdatenml);
685  saveData(os, myAccurate);
686 
687  }
688 
689  bool load(UT_IStream &is)
690  {
691  int32 v;
692  is.bread(&v, 1);
693  if (version() != v)
694  {
695  // Fail incompatible versions
696  return false;
697  }
698  loadData(is, myGroup);
699  loadData(is, myUsedist);
700  loadData(is, myDist);
701  loadData(is, myDeldegen);
702  loadData(is, myKeepunusedpoints);
703  loadData(is, myKeepconsolidatedpoints);
704  loadData(is, myGrouppropagation);
705  loadData(is, mySwitcher);
706  loadData(is, mySnaptype);
707  loadData(is, myTol3d);
708  loadData(is, mySnappointpos);
709  loadData(is, mySnappointattribs);
710  loadData(is, myPointattribnames);
711  loadData(is, mySnapswitcher);
712  loadData(is, myGridtype);
713  loadData(is, myGridspacing);
714  loadData(is, myGridlines);
715  loadData(is, myGridpow2);
716  loadData(is, myGridoffset);
717  loadData(is, myGridround);
718  loadData(is, myGridtol);
719  loadData(is, myUpdatenml);
720  loadData(is, myAccurate);
721 
722  return true;
723  }
724 
725  const UT_StringHolder & getGroup() const { return myGroup; }
726  void setGroup(const UT_StringHolder & val) { myGroup = val; }
728  {
729  SOP_Node *thissop = cookparms.getNode();
730  if (!thissop) return getGroup();
732  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
733  return result;
734  }
735  bool getUsedist() const { return myUsedist; }
736  void setUsedist(bool val) { myUsedist = val; }
737  bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
738  {
739  SOP_Node *thissop = cookparms.getNode();
740  if (!thissop) return getUsedist();
741  bool result;
742  OP_Utils::evalOpParm(result, thissop, "usedist", cookparms.getCookTime(), 0);
743  return result;
744  }
745  fpreal64 getDist() const { return myDist; }
746  void setDist(fpreal64 val) { myDist = val; }
747  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
748  {
749  SOP_Node *thissop = cookparms.getNode();
750  if (!thissop) return getDist();
752  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
753  return result;
754  }
755  bool getDeldegen() const { return myDeldegen; }
756  void setDeldegen(bool val) { myDeldegen = val; }
757  bool opDeldegen(const SOP_NodeVerb::CookParms &cookparms) const
758  {
759  SOP_Node *thissop = cookparms.getNode();
760  if (!thissop) return getDeldegen();
761  bool result;
762  OP_Utils::evalOpParm(result, thissop, "deldegen", cookparms.getCookTime(), 0);
763  return result;
764  }
765  bool getKeepunusedpoints() const { return myKeepunusedpoints; }
766  void setKeepunusedpoints(bool val) { myKeepunusedpoints = val; }
767  bool opKeepunusedpoints(const SOP_NodeVerb::CookParms &cookparms) const
768  {
769  SOP_Node *thissop = cookparms.getNode();
770  if (!thissop) return getKeepunusedpoints();
771  bool result;
772  OP_Utils::evalOpParm(result, thissop, "keepunusedpoints", cookparms.getCookTime(), 0);
773  return result;
774  }
775  bool getKeepconsolidatedpoints() const { return myKeepconsolidatedpoints; }
776  void setKeepconsolidatedpoints(bool val) { myKeepconsolidatedpoints = val; }
778  {
779  SOP_Node *thissop = cookparms.getNode();
780  if (!thissop) return getKeepconsolidatedpoints();
781  bool result;
782  OP_Utils::evalOpParm(result, thissop, "keepconsolidatedpoints", cookparms.getCookTime(), 0);
783  return result;
784  }
785  Grouppropagation getGrouppropagation() const { return Grouppropagation(myGrouppropagation); }
786  void setGrouppropagation(Grouppropagation val) { myGrouppropagation = int64(val); }
788  {
789  SOP_Node *thissop = cookparms.getNode();
790  if (!thissop) return getGrouppropagation();
791  int64 result;
792  OP_Utils::evalOpParm(result, thissop, "grouppropagation", cookparms.getCookTime(), 0);
793  return Grouppropagation(result);
794  }
795  int64 getSwitcher() const { return mySwitcher; }
796  void setSwitcher(int64 val) { mySwitcher = val; }
797  int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
798  {
799  SOP_Node *thissop = cookparms.getNode();
800  if (!thissop) return getSwitcher();
801  int64 result;
802  OP_Utils::evalOpParm(result, thissop, "switcher", cookparms.getCookTime(), 0);
803  return result;
804  }
805  Snaptype getSnaptype() const { return Snaptype(mySnaptype); }
806  void setSnaptype(Snaptype val) { mySnaptype = int64(val); }
808  {
809  SOP_Node *thissop = cookparms.getNode();
810  if (!thissop) return getSnaptype();
811  int64 result;
812  OP_Utils::evalOpParm(result, thissop, "snaptype", cookparms.getCookTime(), 0);
813  return Snaptype(result);
814  }
815  fpreal64 getTol3d() const { return myTol3d; }
816  void setTol3d(fpreal64 val) { myTol3d = val; }
817  fpreal64 opTol3d(const SOP_NodeVerb::CookParms &cookparms) const
818  {
819  SOP_Node *thissop = cookparms.getNode();
820  if (!thissop) return getTol3d();
822  OP_Utils::evalOpParm(result, thissop, "tol3d", cookparms.getCookTime(), 0);
823  return result;
824  }
825  bool getSnappointpos() const { return mySnappointpos; }
826  void setSnappointpos(bool val) { mySnappointpos = val; }
827  bool opSnappointpos(const SOP_NodeVerb::CookParms &cookparms) const
828  {
829  SOP_Node *thissop = cookparms.getNode();
830  if (!thissop) return getSnappointpos();
831  bool result;
832  OP_Utils::evalOpParm(result, thissop, "snappointpos", cookparms.getCookTime(), 0);
833  return result;
834  }
835  bool getSnappointattribs() const { return mySnappointattribs; }
836  void setSnappointattribs(bool val) { mySnappointattribs = val; }
837  bool opSnappointattribs(const SOP_NodeVerb::CookParms &cookparms) const
838  {
839  SOP_Node *thissop = cookparms.getNode();
840  if (!thissop) return getSnappointattribs();
841  bool result;
842  OP_Utils::evalOpParm(result, thissop, "snappointattribs", cookparms.getCookTime(), 0);
843  return result;
844  }
845  const UT_StringHolder & getPointattribnames() const { return myPointattribnames; }
846  void setPointattribnames(const UT_StringHolder & val) { myPointattribnames = val; }
848  {
849  SOP_Node *thissop = cookparms.getNode();
850  if (!thissop) return getPointattribnames();
852  OP_Utils::evalOpParm(result, thissop, "pointattribnames", cookparms.getCookTime(), 0);
853  return result;
854  }
855  int64 getSnapswitcher() const { return mySnapswitcher; }
856  void setSnapswitcher(int64 val) { mySnapswitcher = val; }
858  {
859  SOP_Node *thissop = cookparms.getNode();
860  if (!thissop) return getSnapswitcher();
861  int64 result;
862  OP_Utils::evalOpParm(result, thissop, "snapswitcher", cookparms.getCookTime(), 0);
863  return result;
864  }
865  Gridtype getGridtype() const { return Gridtype(myGridtype); }
866  void setGridtype(Gridtype val) { myGridtype = int64(val); }
868  {
869  SOP_Node *thissop = cookparms.getNode();
870  if (!thissop) return getGridtype();
871  int64 result;
872  OP_Utils::evalOpParm(result, thissop, "gridtype", cookparms.getCookTime(), 0);
873  return Gridtype(result);
874  }
875  UT_Vector3D getGridspacing() const { return myGridspacing; }
876  void setGridspacing(UT_Vector3D val) { myGridspacing = val; }
878  {
879  SOP_Node *thissop = cookparms.getNode();
880  if (!thissop) return getGridspacing();
882  OP_Utils::evalOpParm(result, thissop, "gridspacing", cookparms.getCookTime(), 0);
883  return result;
884  }
885  UT_Vector3D getGridlines() const { return myGridlines; }
886  void setGridlines(UT_Vector3D val) { myGridlines = val; }
888  {
889  SOP_Node *thissop = cookparms.getNode();
890  if (!thissop) return getGridlines();
892  OP_Utils::evalOpParm(result, thissop, "gridlines", cookparms.getCookTime(), 0);
893  return result;
894  }
895  UT_Vector3I getGridpow2() const { return myGridpow2; }
896  void setGridpow2(UT_Vector3I val) { myGridpow2 = val; }
898  {
899  SOP_Node *thissop = cookparms.getNode();
900  if (!thissop) return getGridpow2();
902  OP_Utils::evalOpParm(result, thissop, "gridpow2", cookparms.getCookTime(), 0);
903  return result;
904  }
905  UT_Vector3D getGridoffset() const { return myGridoffset; }
906  void setGridoffset(UT_Vector3D val) { myGridoffset = val; }
908  {
909  SOP_Node *thissop = cookparms.getNode();
910  if (!thissop) return getGridoffset();
912  OP_Utils::evalOpParm(result, thissop, "gridoffset", cookparms.getCookTime(), 0);
913  return result;
914  }
915  Gridround getGridround() const { return Gridround(myGridround); }
916  void setGridround(Gridround val) { myGridround = int64(val); }
918  {
919  SOP_Node *thissop = cookparms.getNode();
920  if (!thissop) return getGridround();
921  int64 result;
922  OP_Utils::evalOpParm(result, thissop, "gridround", cookparms.getCookTime(), 0);
923  return Gridround(result);
924  }
925  fpreal64 getGridtol() const { return myGridtol; }
926  void setGridtol(fpreal64 val) { myGridtol = val; }
928  {
929  SOP_Node *thissop = cookparms.getNode();
930  if (!thissop) return getGridtol();
932  OP_Utils::evalOpParm(result, thissop, "gridtol", cookparms.getCookTime(), 0);
933  return result;
934  }
935  bool getUpdatenml() const { return myUpdatenml; }
936  void setUpdatenml(bool val) { myUpdatenml = val; }
937  bool opUpdatenml(const SOP_NodeVerb::CookParms &cookparms) const
938  {
939  SOP_Node *thissop = cookparms.getNode();
940  if (!thissop) return getUpdatenml();
941  bool result;
942  OP_Utils::evalOpParm(result, thissop, "updatenml", cookparms.getCookTime(), 0);
943  return result;
944  }
945  bool getAccurate() const { return myAccurate; }
946  void setAccurate(bool val) { myAccurate = val; }
947  bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
948  {
949  SOP_Node *thissop = cookparms.getNode();
950  if (!thissop) return getAccurate();
951  bool result;
952  OP_Utils::evalOpParm(result, thissop, "accurate", cookparms.getCookTime(), 0);
953  return result;
954  }
955 
956 private:
957  UT_StringHolder myGroup;
958  bool myUsedist;
959  fpreal64 myDist;
960  bool myDeldegen;
961  bool myKeepunusedpoints;
962  bool myKeepconsolidatedpoints;
963  int64 myGrouppropagation;
964  int64 mySwitcher;
965  int64 mySnaptype;
966  fpreal64 myTol3d;
967  bool mySnappointpos;
968  bool mySnappointattribs;
969  UT_StringHolder myPointattribnames;
970  int64 mySnapswitcher;
971  int64 myGridtype;
972  UT_Vector3D myGridspacing;
973  UT_Vector3D myGridlines;
974  UT_Vector3I myGridpow2;
975  UT_Vector3D myGridoffset;
976  int64 myGridround;
977  fpreal64 myGridtol;
978  bool myUpdatenml;
979  bool myAccurate;
980 
981 };
GLdouble s
Definition: glew.h:1390
static int version()
bool getDeldegen() const
void setSnaptype(Snaptype val)
static void saveData(std::ostream &os, UT_Vector3D v)
void setPointattribnames(const UT_StringHolder &val)
UT_Vector3D getGridoffset() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opPointattribnames(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
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
static void loadData(UT_IStream &is, UT_StringHolder &v)
int64 opSnapswitcher(const SOP_NodeVerb::CookParms &cookparms) const
void setGridlines(UT_Vector3D val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
fpreal64 getDist() const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, bool &v)
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
int64 getSnapswitcher() const
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector3D opGridoffset(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLuint const GLfloat * val
Definition: glew.h:2794
bool getSnappointattribs() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
Grouppropagation opGrouppropagation(const SOP_NodeVerb::CookParms &cookparms) const
void setGridtype(Gridtype val)
void setGrouppropagation(Grouppropagation val)
int64 exint
Definition: SYS_Types.h:125
bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
bool operator==(const SOP_FuseParms &src) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
An output stream object that owns its own string buffer storage.
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_Vector3T< int64 > UT_Vector3I
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 getGridtol() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, bool v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, fpreal64 &v)
exint getNestNumParms(TempIndex idx) const override
void setTol3d(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Vector3I getGridpow2() const
bool opSnappointpos(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setGridspacing(UT_Vector3D val)
static void saveData(std::ostream &os, fpreal64 v)
double fpreal64
Definition: SYS_Types.h:201
void setSnappointpos(bool val)
bool getSnappointpos() const
fpreal64 getTol3d() const
bool opSnappointattribs(const SOP_NodeVerb::CookParms &cookparms) const
void setKeepunusedpoints(bool val)
void setGridtol(fpreal64 val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
Gridround opGridround(const SOP_NodeVerb::CookParms &cookparms) const
Gridtype opGridtype(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void setKeepconsolidatedpoints(bool val)
void setAccurate(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Vector3I opGridpow2(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint length() const
void setGridround(Gridround val)
bool getKeepunusedpoints() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
UT_Vector3D opGridspacing(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opTol3d(const SOP_NodeVerb::CookParms &cookparms) const
void setUpdatenml(bool val)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
ParmType getNestParmType(TempIndex fieldnum) const override
bool operator!=(const SOP_FuseParms &src) const
bool opUpdatenml(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
bool opAccurate(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const UT_StringHolder & getPointattribnames() const
const GLfloat * c
Definition: glew.h:16296
const UT_StringHolder & getGroup() const
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, int64 &v)
void save(std::ostream &os) const
UT_Vector3T< fpreal64 > UT_Vector3D
Snaptype getSnaptype() const
bool load(UT_IStream &is)
bool getKeepconsolidatedpoints() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setSwitcher(int64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
int64 opSwitcher(const SOP_NodeVerb::CookParms &cookparms) const
bool getUpdatenml() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Grouppropagation getGrouppropagation() const
UT_Vector3D getGridlines() const
void setGridoffset(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal64 opGridtol(const SOP_NodeVerb::CookParms &cookparms) const
Gridtype getGridtype() const
bool getUsedist() const
bool getAccurate() const
UT_Vector3D getGridspacing() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setUsedist(bool val)
Gridround getGridround() const
void setGridpow2(UT_Vector3I val)
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setDist(fpreal64 val)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
void setSnappointattribs(bool val)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opDeldegen(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
~SOP_FuseParms() override
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_Vector3D opGridlines(const SOP_NodeVerb::CookParms &cookparms) const
GLuint64EXT * result
Definition: glew.h:14007
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * findChar(int c) const
Definition: UT_String.h:1368
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
int64 getSwitcher() const
void copyFrom(const SOP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector4D v)
void setSnapswitcher(int64 val)
Snaptype opSnaptype(const SOP_NodeVerb::CookParms &cookparms) const
bool opKeepconsolidatedpoints(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setDeldegen(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool opKeepunusedpoints(const SOP_NodeVerb::CookParms &cookparms) const