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