HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupCreate.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_GroupCreateEnums
22 {
23  enum class Grouptype
24  {
25  PRIMITIVE = 0,
26  POINT,
27  EDGE,
28  VERTEX
29  };
30  enum class Mergeop
31  {
32  REPLACE = 0,
33  UNION,
34  INTERSECT,
35  SUBTRACT
36  };
37  enum class Boundtype
38  {
39  USEBBOX = 0,
40  USEBSPHERE,
41  USEBOBJECT,
43  };
44 }
45 
46 
48 {
49 public:
50  static int version() { return 1; }
51 
53  {
54  myGroupName = "group1"_sh;
55  myGrouptype = 0;
56  myMergeop = 0;
57  myGroupBase = true;
58  myBasegroup = ""_sh;
59  myOrdered = false;
60  myGeotype = 0;
61  myGroupBounding = false;
62  myBoundtype = 0;
63  mySize = UT_Vector3D(1,1,1);
64  myT = UT_Vector3D(0,0,0);
65  myIncludenotwhollycontained = false;
66  myIso = 0;
67  myInvertvolume = false;
68  myGroupNormal = false;
69  myCamerapath = ""_sh;
70  myNonplanar = false;
71  myNonplanartol = 0.001;
72  myDir = UT_Vector3D(0,0,1);
73  myAngle = 180;
74  myGroupEdges = false;
75  myDominedgeangle = false;
76  myMinedgeangle = 20;
77  myDomaxedgeangle = false;
78  myMaxedgeangle = 20;
79  myEdgeAngleBetweenEdges = false;
80  myDominedgelen = false;
81  myMinedgelen = 0;
82  myDomaxedgelen = false;
83  myMaxedgelen = 0;
84  myDodepth = false;
85  myEdgestep = 0;
86  myEdgeptgrp = "0"_sh;
87  myUnshared = false;
88  myBoundaryGroups = false;
89 
90  }
91 
92  explicit SOP_GroupCreateParms(const SOP_GroupCreateParms &) = default;
93 
94  virtual ~SOP_GroupCreateParms() {}
95 
96  bool operator==(const SOP_GroupCreateParms &src) const
97  {
98  if (myGroupName != src.myGroupName) return false;
99  if (myGrouptype != src.myGrouptype) return false;
100  if (myMergeop != src.myMergeop) return false;
101  if (myGroupBase != src.myGroupBase) return false;
102  if (myBasegroup != src.myBasegroup) return false;
103  if (myOrdered != src.myOrdered) return false;
104  if (myGeotype != src.myGeotype) return false;
105  if (myGroupBounding != src.myGroupBounding) return false;
106  if (myBoundtype != src.myBoundtype) return false;
107  if (mySize != src.mySize) return false;
108  if (myT != src.myT) return false;
109  if (myIncludenotwhollycontained != src.myIncludenotwhollycontained) return false;
110  if (myIso != src.myIso) return false;
111  if (myInvertvolume != src.myInvertvolume) return false;
112  if (myGroupNormal != src.myGroupNormal) return false;
113  if (myCamerapath != src.myCamerapath) return false;
114  if (myNonplanar != src.myNonplanar) return false;
115  if (myNonplanartol != src.myNonplanartol) return false;
116  if (myDir != src.myDir) return false;
117  if (myAngle != src.myAngle) return false;
118  if (myGroupEdges != src.myGroupEdges) return false;
119  if (myDominedgeangle != src.myDominedgeangle) return false;
120  if (myMinedgeangle != src.myMinedgeangle) return false;
121  if (myDomaxedgeangle != src.myDomaxedgeangle) return false;
122  if (myMaxedgeangle != src.myMaxedgeangle) return false;
123  if (myEdgeAngleBetweenEdges != src.myEdgeAngleBetweenEdges) return false;
124  if (myDominedgelen != src.myDominedgelen) return false;
125  if (myMinedgelen != src.myMinedgelen) return false;
126  if (myDomaxedgelen != src.myDomaxedgelen) return false;
127  if (myMaxedgelen != src.myMaxedgelen) return false;
128  if (myDodepth != src.myDodepth) return false;
129  if (myEdgestep != src.myEdgestep) return false;
130  if (myEdgeptgrp != src.myEdgeptgrp) return false;
131  if (myUnshared != src.myUnshared) return false;
132  if (myBoundaryGroups != src.myBoundaryGroups) return false;
133 
134  return true;
135  }
137  {
138  return !operator==(src);
139  }
143 
144 
145 
146  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
147  {
148  if (true)
149  OP_Utils::evalOpParm(myGroupName, node, "groupname", time, 0);
150  else myGroupName = "group1"_sh;
151  if (true)
152  OP_Utils::evalOpParm(myGrouptype, node, "grouptype", time, 0);
153  else myGrouptype = 0;
154  if (true)
155  OP_Utils::evalOpParm(myMergeop, node, "mergeop", time, 0);
156  else myMergeop = 0;
157  if (true)
158  OP_Utils::evalOpParm(myGroupBase, node, "groupbase", time, 0);
159  else myGroupBase = true;
160  if (true && ( (!(((getGroupBase()==0)))) ) )
161  OP_Utils::evalOpParm(myBasegroup, node, "basegroup", time, 0);
162  else myBasegroup = ""_sh;
163  if (true && ( (!(((getGroupBase()==0)))) ) )
164  OP_Utils::evalOpParm(myOrdered, node, "ordered", time, 0);
165  else myOrdered = false;
166  if (true && ( (!(((getGroupBase()==0)))) ) )
167  OP_Utils::evalOpParm(myGeotype, node, "geotype", time, 0);
168  else myGeotype = 0;
169  if (true)
170  OP_Utils::evalOpParm(myGroupBounding, node, "groupbounding", time, 0);
171  else myGroupBounding = false;
172  if (true && ( (!(((getGroupBounding()==0)))) ) )
173  OP_Utils::evalOpParm(myBoundtype, node, "boundtype", time, 0);
174  else myBoundtype = 0;
175  if (true && ( (!(((getGroupBounding()==0))||((int64(getBoundtype())!=0)&&(int64(getBoundtype())!=1)))) ) )
176  OP_Utils::evalOpParm(mySize, node, "size", time, 0);
177  else mySize = UT_Vector3D(1,1,1);
178  if (true && ( (!(((getGroupBounding()==0))||((int64(getBoundtype())!=0)&&(int64(getBoundtype())!=1)))) ) )
179  OP_Utils::evalOpParm(myT, node, "t", time, 0);
180  else myT = UT_Vector3D(0,0,0);
181  if (true && ( (!(((getGroupBounding()==0))||((int64(getBoundtype())!=0)&&(int64(getBoundtype())!=1)))) ) )
182  OP_Utils::evalOpParm(myIncludenotwhollycontained, node, "includenotwhollycontained", time, 0);
183  else myIncludenotwhollycontained = false;
184  if (true && ( (!(((getGroupBounding()==0))||((int64(getBoundtype())!=3)))) ) )
185  OP_Utils::evalOpParm(myIso, node, "iso", time, 0);
186  else myIso = 0;
187  if (true && ( (!(((getGroupBounding()==0))||((int64(getBoundtype())!=3)))) ) )
188  OP_Utils::evalOpParm(myInvertvolume, node, "invertvolume", time, 0);
189  else myInvertvolume = false;
190  if (true && ( (!(((int64(getGrouptype())==3)))) ) )
191  OP_Utils::evalOpParm(myGroupNormal, node, "groupnormal", time, 0);
192  else myGroupNormal = false;
193  if (true && ( (!(((int64(getGrouptype())==3))||((getGroupNormal()==0))||((int64(getGrouptype())==3)))) ) )
194  OP_Utils::evalOpParm(myCamerapath, node, "camerapath", time, 0);
195  else myCamerapath = ""_sh;
196  if (true && ( (!(((int64(getGrouptype())!=0))||((int64(getGrouptype())==3))||((getGroupNormal()==0))||((int64(getGrouptype())==3)))) ) )
197  OP_Utils::evalOpParm(myNonplanar, node, "nonplanar", time, 0);
198  else myNonplanar = false;
199  if (true && ( (!(((int64(getGrouptype())!=0))||((getNonplanar()==0))||((int64(getGrouptype())==3))||((getGroupNormal()==0))||((int64(getGrouptype())==3)))) ) )
200  OP_Utils::evalOpParm(myNonplanartol, node, "nonplanartol", time, 0);
201  else myNonplanartol = 0.001;
202  if (true && ( (!(((int64(getGrouptype())==0)&&(getNonplanar()==1))||((getCamerapath()!=""))||((int64(getGrouptype())==3))||((getGroupNormal()==0))||((int64(getGrouptype())==3)))) ) )
203  OP_Utils::evalOpParm(myDir, node, "dir", time, 0);
204  else myDir = UT_Vector3D(0,0,1);
205  if (true && ( (!(((int64(getGrouptype())==0)&&(getNonplanar()==1))||((getCamerapath()!=""))||((int64(getGrouptype())==3))||((getGroupNormal()==0))||((int64(getGrouptype())==3)))) ) )
206  OP_Utils::evalOpParm(myAngle, node, "angle", time, 0);
207  else myAngle = 180;
208  if (true && ( (!(((int64(getGrouptype())==3)))) ) )
209  OP_Utils::evalOpParm(myGroupEdges, node, "groupedges", time, 0);
210  else myGroupEdges = false;
211  if (true && ( (!(((int64(getGrouptype())==1))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
212  OP_Utils::evalOpParm(myDominedgeangle, node, "dominedgeangle", time, 0);
213  else myDominedgeangle = false;
214  if (true && ( (!(((int64(getGrouptype())==1))||((getDominedgeangle()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
215  OP_Utils::evalOpParm(myMinedgeangle, node, "minedgeangle", time, 0);
216  else myMinedgeangle = 20;
217  if (true && ( (!(((int64(getGrouptype())==1))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
218  OP_Utils::evalOpParm(myDomaxedgeangle, node, "domaxedgeangle", time, 0);
219  else myDomaxedgeangle = false;
220  if (true && ( (!(((int64(getGrouptype())==1))||((getDomaxedgeangle()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
221  OP_Utils::evalOpParm(myMaxedgeangle, node, "maxedgeangle", time, 0);
222  else myMaxedgeangle = 20;
223  if (true && ( (!(((int64(getGrouptype())!=2))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
224  OP_Utils::evalOpParm(myEdgeAngleBetweenEdges, node, "edgeanglebetweenedges", time, 0);
225  else myEdgeAngleBetweenEdges = false;
226  if (true && ( (!(((int64(getGrouptype())!=2))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
227  OP_Utils::evalOpParm(myDominedgelen, node, "dominedgelen", time, 0);
228  else myDominedgelen = false;
229  if (true && ( (!(((int64(getGrouptype())!=2))||((getDominedgelen()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
230  OP_Utils::evalOpParm(myMinedgelen, node, "minedgelen", time, 0);
231  else myMinedgelen = 0;
232  if (true && ( (!(((int64(getGrouptype())!=2))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
233  OP_Utils::evalOpParm(myDomaxedgelen, node, "domaxedgelen", time, 0);
234  else myDomaxedgelen = false;
235  if (true && ( (!(((int64(getGrouptype())!=2))||((getDomaxedgelen()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
236  OP_Utils::evalOpParm(myMaxedgelen, node, "maxedgelen", time, 0);
237  else myMaxedgelen = 0;
238  if (true && ( (!(((int64(getGrouptype())!=1))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
239  OP_Utils::evalOpParm(myDodepth, node, "dodepth", time, 0);
240  else myDodepth = false;
241  if (true && ( (!(((int64(getGrouptype())!=1))||((getDodepth()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
242  OP_Utils::evalOpParm(myEdgestep, node, "edgestep", time, 0);
243  else myEdgestep = 0;
244  if (true && ( (!(((int64(getGrouptype())!=1))||((getDodepth()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
245  OP_Utils::evalOpParm(myEdgeptgrp, node, "edgeptgrp", time, 0);
246  else myEdgeptgrp = "0"_sh;
247  if (true && ( (!(((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
248  OP_Utils::evalOpParm(myUnshared, node, "unshared", time, 0);
249  else myUnshared = false;
250  if (true && ( (!(((int64(getGrouptype())!=1))||((getUnshared()==0))||((int64(getGrouptype())==3))||((getGroupEdges()==0))||((int64(getGrouptype())==3)))) ) )
251  OP_Utils::evalOpParm(myBoundaryGroups, node, "boundarygroups", time, 0);
252  else myBoundaryGroups = false;
253 
254  }
255 
256 
257  virtual void loadFromOpSubclass(const LoadParms &loadparms)
258  {
259  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
260  }
261 
262 
263  virtual void copyFrom(const SOP_NodeParms *src)
264  {
265  *this = *((const SOP_GroupCreateParms *)src);
266  }
267 
268  template <typename T>
269  void
270  doGetParmValue(exint idx, T &value) const
271  {
272  switch (idx)
273  {
274  case 0:
275  coerceValue(value, myGroupName);
276  break;
277  case 1:
278  coerceValue(value, myGrouptype);
279  break;
280  case 2:
281  coerceValue(value, myMergeop);
282  break;
283  case 3:
284  coerceValue(value, myGroupBase);
285  break;
286  case 4:
287  coerceValue(value, myBasegroup);
288  break;
289  case 5:
290  coerceValue(value, myOrdered);
291  break;
292  case 6:
293  coerceValue(value, myGeotype);
294  break;
295  case 7:
296  coerceValue(value, myGroupBounding);
297  break;
298  case 8:
299  coerceValue(value, myBoundtype);
300  break;
301  case 9:
302  coerceValue(value, mySize);
303  break;
304  case 10:
305  coerceValue(value, myT);
306  break;
307  case 11:
308  coerceValue(value, myIncludenotwhollycontained);
309  break;
310  case 12:
311  coerceValue(value, myIso);
312  break;
313  case 13:
314  coerceValue(value, myInvertvolume);
315  break;
316  case 14:
317  coerceValue(value, myGroupNormal);
318  break;
319  case 15:
320  coerceValue(value, myCamerapath);
321  break;
322  case 16:
323  coerceValue(value, myNonplanar);
324  break;
325  case 17:
326  coerceValue(value, myNonplanartol);
327  break;
328  case 18:
329  coerceValue(value, myDir);
330  break;
331  case 19:
332  coerceValue(value, myAngle);
333  break;
334  case 20:
335  coerceValue(value, myGroupEdges);
336  break;
337  case 21:
338  coerceValue(value, myDominedgeangle);
339  break;
340  case 22:
341  coerceValue(value, myMinedgeangle);
342  break;
343  case 23:
344  coerceValue(value, myDomaxedgeangle);
345  break;
346  case 24:
347  coerceValue(value, myMaxedgeangle);
348  break;
349  case 25:
350  coerceValue(value, myEdgeAngleBetweenEdges);
351  break;
352  case 26:
353  coerceValue(value, myDominedgelen);
354  break;
355  case 27:
356  coerceValue(value, myMinedgelen);
357  break;
358  case 28:
359  coerceValue(value, myDomaxedgelen);
360  break;
361  case 29:
362  coerceValue(value, myMaxedgelen);
363  break;
364  case 30:
365  coerceValue(value, myDodepth);
366  break;
367  case 31:
368  coerceValue(value, myEdgestep);
369  break;
370  case 32:
371  coerceValue(value, myEdgeptgrp);
372  break;
373  case 33:
374  coerceValue(value, myUnshared);
375  break;
376  case 34:
377  coerceValue(value, myBoundaryGroups);
378  break;
379 
380  }
381  }
382 
383  void getParmValue(exint idx, exint &value) const
384  { doGetParmValue(idx, value); }
385  void getParmValue(exint idx, fpreal &value) const
386  { doGetParmValue(idx, value); }
388  { doGetParmValue(idx, value); }
390  { doGetParmValue(idx, value); }
392  { doGetParmValue(idx, value); }
394  { doGetParmValue(idx, value); }
396  { doGetParmValue(idx, value); }
398  { doGetParmValue(idx, value); }
400  { doGetParmValue(idx, value); }
402  { doGetParmValue(idx, value); }
404  { doGetParmValue(idx, value); }
405 
406  template <typename T>
407  void
408  doSetParmValue(exint idx, const T &value)
409  {
410  switch (idx)
411  {
412  case 0:
413  coerceValue(myGroupName, value);
414  break;
415  case 1:
416  coerceValue(myGrouptype, value);
417  break;
418  case 2:
419  coerceValue(myMergeop, value);
420  break;
421  case 3:
422  coerceValue(myGroupBase, value);
423  break;
424  case 4:
425  coerceValue(myBasegroup, value);
426  break;
427  case 5:
428  coerceValue(myOrdered, value);
429  break;
430  case 6:
431  coerceValue(myGeotype, value);
432  break;
433  case 7:
434  coerceValue(myGroupBounding, value);
435  break;
436  case 8:
437  coerceValue(myBoundtype, value);
438  break;
439  case 9:
440  coerceValue(mySize, value);
441  break;
442  case 10:
443  coerceValue(myT, value);
444  break;
445  case 11:
446  coerceValue(myIncludenotwhollycontained, value);
447  break;
448  case 12:
449  coerceValue(myIso, value);
450  break;
451  case 13:
452  coerceValue(myInvertvolume, value);
453  break;
454  case 14:
455  coerceValue(myGroupNormal, value);
456  break;
457  case 15:
458  coerceValue(myCamerapath, value);
459  break;
460  case 16:
461  coerceValue(myNonplanar, value);
462  break;
463  case 17:
464  coerceValue(myNonplanartol, value);
465  break;
466  case 18:
467  coerceValue(myDir, value);
468  break;
469  case 19:
470  coerceValue(myAngle, value);
471  break;
472  case 20:
473  coerceValue(myGroupEdges, value);
474  break;
475  case 21:
476  coerceValue(myDominedgeangle, value);
477  break;
478  case 22:
479  coerceValue(myMinedgeangle, value);
480  break;
481  case 23:
482  coerceValue(myDomaxedgeangle, value);
483  break;
484  case 24:
485  coerceValue(myMaxedgeangle, value);
486  break;
487  case 25:
488  coerceValue(myEdgeAngleBetweenEdges, value);
489  break;
490  case 26:
491  coerceValue(myDominedgelen, value);
492  break;
493  case 27:
494  coerceValue(myMinedgelen, value);
495  break;
496  case 28:
497  coerceValue(myDomaxedgelen, value);
498  break;
499  case 29:
500  coerceValue(myMaxedgelen, value);
501  break;
502  case 30:
503  coerceValue(myDodepth, value);
504  break;
505  case 31:
506  coerceValue(myEdgestep, value);
507  break;
508  case 32:
509  coerceValue(myEdgeptgrp, value);
510  break;
511  case 33:
512  coerceValue(myUnshared, value);
513  break;
514  case 34:
515  coerceValue(myBoundaryGroups, value);
516  break;
517 
518  }
519  }
520 
521  void setParmValue(exint idx, const exint &value)
522  { doSetParmValue(idx, value); }
523  void setParmValue(exint idx, const fpreal &value)
524  { doSetParmValue(idx, value); }
525  void setParmValue(exint idx, const UT_Vector2D &value)
526  { doSetParmValue(idx, value); }
527  void setParmValue(exint idx, const UT_Vector3D &value)
528  { doSetParmValue(idx, value); }
529  void setParmValue(exint idx, const UT_Vector4D &value)
530  { doSetParmValue(idx, value); }
531  void setParmValue(exint idx, const UT_Matrix2D &value)
532  { doSetParmValue(idx, value); }
533  void setParmValue(exint idx, const UT_Matrix3D &value)
534  { doSetParmValue(idx, value); }
535  void setParmValue(exint idx, const UT_Matrix4D &value)
536  { doSetParmValue(idx, value); }
538  { doSetParmValue(idx, value); }
540  { doSetParmValue(idx, value); }
542  { doSetParmValue(idx, value); }
543 
544  virtual exint getNumParms() const
545  {
546  return 35;
547  }
548 
549  virtual const char *getParmName(exint fieldnum) const
550  {
551  switch (fieldnum)
552  {
553  case 0:
554  return "groupname";
555  case 1:
556  return "grouptype";
557  case 2:
558  return "mergeop";
559  case 3:
560  return "groupbase";
561  case 4:
562  return "basegroup";
563  case 5:
564  return "ordered";
565  case 6:
566  return "geotype";
567  case 7:
568  return "groupbounding";
569  case 8:
570  return "boundtype";
571  case 9:
572  return "size";
573  case 10:
574  return "t";
575  case 11:
576  return "includenotwhollycontained";
577  case 12:
578  return "iso";
579  case 13:
580  return "invertvolume";
581  case 14:
582  return "groupnormal";
583  case 15:
584  return "camerapath";
585  case 16:
586  return "nonplanar";
587  case 17:
588  return "nonplanartol";
589  case 18:
590  return "dir";
591  case 19:
592  return "angle";
593  case 20:
594  return "groupedges";
595  case 21:
596  return "dominedgeangle";
597  case 22:
598  return "minedgeangle";
599  case 23:
600  return "domaxedgeangle";
601  case 24:
602  return "maxedgeangle";
603  case 25:
604  return "edgeanglebetweenedges";
605  case 26:
606  return "dominedgelen";
607  case 27:
608  return "minedgelen";
609  case 28:
610  return "domaxedgelen";
611  case 29:
612  return "maxedgelen";
613  case 30:
614  return "dodepth";
615  case 31:
616  return "edgestep";
617  case 32:
618  return "edgeptgrp";
619  case 33:
620  return "unshared";
621  case 34:
622  return "boundarygroups";
623 
624  }
625  return 0;
626  }
627 
628  virtual ParmType getParmType(exint fieldnum) const
629  {
630  switch (fieldnum)
631  {
632  case 0:
633  return PARM_STRING;
634  case 1:
635  return PARM_INTEGER;
636  case 2:
637  return PARM_INTEGER;
638  case 3:
639  return PARM_INTEGER;
640  case 4:
641  return PARM_STRING;
642  case 5:
643  return PARM_INTEGER;
644  case 6:
645  return PARM_INTEGER;
646  case 7:
647  return PARM_INTEGER;
648  case 8:
649  return PARM_INTEGER;
650  case 9:
651  return PARM_VECTOR3;
652  case 10:
653  return PARM_VECTOR3;
654  case 11:
655  return PARM_INTEGER;
656  case 12:
657  return PARM_FLOAT;
658  case 13:
659  return PARM_INTEGER;
660  case 14:
661  return PARM_INTEGER;
662  case 15:
663  return PARM_STRING;
664  case 16:
665  return PARM_INTEGER;
666  case 17:
667  return PARM_FLOAT;
668  case 18:
669  return PARM_VECTOR3;
670  case 19:
671  return PARM_FLOAT;
672  case 20:
673  return PARM_INTEGER;
674  case 21:
675  return PARM_INTEGER;
676  case 22:
677  return PARM_FLOAT;
678  case 23:
679  return PARM_INTEGER;
680  case 24:
681  return PARM_FLOAT;
682  case 25:
683  return PARM_INTEGER;
684  case 26:
685  return PARM_INTEGER;
686  case 27:
687  return PARM_FLOAT;
688  case 28:
689  return PARM_INTEGER;
690  case 29:
691  return PARM_FLOAT;
692  case 30:
693  return PARM_INTEGER;
694  case 31:
695  return PARM_INTEGER;
696  case 32:
697  return PARM_STRING;
698  case 33:
699  return PARM_INTEGER;
700  case 34:
701  return PARM_INTEGER;
702 
703  }
704  return PARM_UNSUPPORTED;
705  }
706 
707  // Boiler plate to load individual types.
708  static void loadData(UT_IStream &is, int64 &v)
709  { is.bread(&v, 1); }
710  static void loadData(UT_IStream &is, bool &v)
711  { int64 iv; is.bread(&iv, 1); v = iv; }
712  static void loadData(UT_IStream &is, fpreal64 &v)
713  { is.bread<fpreal64>(&v, 1); }
714  static void loadData(UT_IStream &is, UT_Vector2D &v)
715  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
716  static void loadData(UT_IStream &is, UT_Vector3D &v)
717  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
718  is.bread<fpreal64>(&v.z(), 1); }
719  static void loadData(UT_IStream &is, UT_Vector4D &v)
720  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
721  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
722  static void loadData(UT_IStream &is, UT_Matrix2D &v)
723  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
724  static void loadData(UT_IStream &is, UT_Matrix3D &v)
725  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
726  static void loadData(UT_IStream &is, UT_Matrix4D &v)
727  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
728  static void loadData(UT_IStream &is, UT_Vector2I &v)
729  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
730  static void loadData(UT_IStream &is, UT_Vector3I &v)
731  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
732  is.bread<int64>(&v.z(), 1); }
733  static void loadData(UT_IStream &is, UT_Vector4I &v)
734  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
735  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
737  { is.bread(v); }
739  { UT_StringHolder rampdata;
740  loadData(is, rampdata);
741  if (rampdata.isstring())
742  {
743  v.reset(new UT_Ramp());
744  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
745  v->load(istr);
746  }
747  else v.reset();
748  }
751  loadData(is, data);
752  if (data.isstring())
753  {
754  // Find the data type.
755  char *colon = UT_StringWrap(data).findChar(':');
756  if (colon)
757  {
758  int typelen = colon - data.buffer();
760  type.strncpy(data.buffer(), typelen);
761  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
762 
763  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
764  }
765  }
766  else v.reset();
767  }
768 
769  static void saveData(std::ostream &os, int64 v)
770  { UTwrite(os, &v); }
771  static void saveData(std::ostream &os, bool v)
772  { int64 iv = v; UTwrite(os, &iv); }
773  static void saveData(std::ostream &os, fpreal64 v)
774  { UTwrite<fpreal64>(os, &v); }
775  static void saveData(std::ostream &os, UT_Vector2D v)
776  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
777  static void saveData(std::ostream &os, UT_Vector3D v)
778  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
779  UTwrite<fpreal64>(os, &v.z()); }
780  static void saveData(std::ostream &os, UT_Vector4D v)
781  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
782  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
783  static void saveData(std::ostream &os, UT_Matrix2D v)
785  static void saveData(std::ostream &os, UT_Matrix3D v)
787  static void saveData(std::ostream &os, UT_Matrix4D v)
789  static void saveData(std::ostream &os, UT_StringHolder s)
790  { UT_StringWrap(s).saveBinary(os); }
791  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
792  { UT_StringHolder result;
793  UT_OStringStream ostr;
794  if (s) s->save(ostr);
795  result = ostr.str();
796  saveData(os, result);
797  }
798  static void saveData(std::ostream &os, PRM_DataItemHandle s)
799  { UT_StringHolder result;
800  UT_OStringStream ostr;
801  if (s)
802  {
803  ostr << s->getDataTypeToken();
804  ostr << ":";
805  s->saveBinary(ostr);
806  }
807  result = ostr.str();
808  saveData(os, result);
809  }
810 
811 
812  void save(std::ostream &os) const
813  {
814  int32 v = version();
815  UTwrite(os, &v);
816  saveData(os, myGroupName);
817  saveData(os, myGrouptype);
818  saveData(os, myMergeop);
819  saveData(os, myGroupBase);
820  saveData(os, myBasegroup);
821  saveData(os, myOrdered);
822  saveData(os, myGeotype);
823  saveData(os, myGroupBounding);
824  saveData(os, myBoundtype);
825  saveData(os, mySize);
826  saveData(os, myT);
827  saveData(os, myIncludenotwhollycontained);
828  saveData(os, myIso);
829  saveData(os, myInvertvolume);
830  saveData(os, myGroupNormal);
831  saveData(os, myCamerapath);
832  saveData(os, myNonplanar);
833  saveData(os, myNonplanartol);
834  saveData(os, myDir);
835  saveData(os, myAngle);
836  saveData(os, myGroupEdges);
837  saveData(os, myDominedgeangle);
838  saveData(os, myMinedgeangle);
839  saveData(os, myDomaxedgeangle);
840  saveData(os, myMaxedgeangle);
841  saveData(os, myEdgeAngleBetweenEdges);
842  saveData(os, myDominedgelen);
843  saveData(os, myMinedgelen);
844  saveData(os, myDomaxedgelen);
845  saveData(os, myMaxedgelen);
846  saveData(os, myDodepth);
847  saveData(os, myEdgestep);
848  saveData(os, myEdgeptgrp);
849  saveData(os, myUnshared);
850  saveData(os, myBoundaryGroups);
851 
852  }
853 
854  bool load(UT_IStream &is)
855  {
856  int32 v;
857  is.bread(&v, 1);
858  if (version() != v)
859  {
860  // Fail incompatible versions
861  return false;
862  }
863  loadData(is, myGroupName);
864  loadData(is, myGrouptype);
865  loadData(is, myMergeop);
866  loadData(is, myGroupBase);
867  loadData(is, myBasegroup);
868  loadData(is, myOrdered);
869  loadData(is, myGeotype);
870  loadData(is, myGroupBounding);
871  loadData(is, myBoundtype);
872  loadData(is, mySize);
873  loadData(is, myT);
874  loadData(is, myIncludenotwhollycontained);
875  loadData(is, myIso);
876  loadData(is, myInvertvolume);
877  loadData(is, myGroupNormal);
878  loadData(is, myCamerapath);
879  loadData(is, myNonplanar);
880  loadData(is, myNonplanartol);
881  loadData(is, myDir);
882  loadData(is, myAngle);
883  loadData(is, myGroupEdges);
884  loadData(is, myDominedgeangle);
885  loadData(is, myMinedgeangle);
886  loadData(is, myDomaxedgeangle);
887  loadData(is, myMaxedgeangle);
888  loadData(is, myEdgeAngleBetweenEdges);
889  loadData(is, myDominedgelen);
890  loadData(is, myMinedgelen);
891  loadData(is, myDomaxedgelen);
892  loadData(is, myMaxedgelen);
893  loadData(is, myDodepth);
894  loadData(is, myEdgestep);
895  loadData(is, myEdgeptgrp);
896  loadData(is, myUnshared);
897  loadData(is, myBoundaryGroups);
898 
899  return true;
900  }
901 
902  const UT_StringHolder & getGroupName() const { return myGroupName; }
903  void setGroupName(const UT_StringHolder & val) { myGroupName = val; }
905  {
906  SOP_Node *thissop = cookparms.getNode();
907  if (!thissop) return getGroupName();
908  UT_StringHolder result;
909  OP_Utils::evalOpParm(result, thissop, "groupname", cookparms.getCookTime(), 0);
910  return result;
911  }
912  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
913  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
915  {
916  SOP_Node *thissop = cookparms.getNode();
917  if (!thissop) return getGrouptype();
918  int64 result;
919  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
920  return Grouptype(result);
921  }
922  Mergeop getMergeop() const { return Mergeop(myMergeop); }
923  void setMergeop(Mergeop val) { myMergeop = int64(val); }
924  Mergeop opMergeop(const SOP_NodeVerb::CookParms &cookparms) const
925  {
926  SOP_Node *thissop = cookparms.getNode();
927  if (!thissop) return getMergeop();
928  int64 result;
929  OP_Utils::evalOpParm(result, thissop, "mergeop", cookparms.getCookTime(), 0);
930  return Mergeop(result);
931  }
932  bool getGroupBase() const { return myGroupBase; }
933  void setGroupBase(bool val) { myGroupBase = val; }
934  bool opGroupBase(const SOP_NodeVerb::CookParms &cookparms) const
935  {
936  SOP_Node *thissop = cookparms.getNode();
937  if (!thissop) return getGroupBase();
938  bool result;
939  OP_Utils::evalOpParm(result, thissop, "groupbase", cookparms.getCookTime(), 0);
940  return result;
941  }
942  const UT_StringHolder & getBasegroup() const { return myBasegroup; }
943  void setBasegroup(const UT_StringHolder & val) { myBasegroup = val; }
945  {
946  SOP_Node *thissop = cookparms.getNode();
947  if (!thissop) return getBasegroup();
948  UT_StringHolder result;
949  OP_Utils::evalOpParm(result, thissop, "basegroup", cookparms.getCookTime(), 0);
950  return result;
951  }
952  bool getOrdered() const { return myOrdered; }
953  void setOrdered(bool val) { myOrdered = val; }
954  bool opOrdered(const SOP_NodeVerb::CookParms &cookparms) const
955  {
956  SOP_Node *thissop = cookparms.getNode();
957  if (!thissop) return getOrdered();
958  bool result;
959  OP_Utils::evalOpParm(result, thissop, "ordered", cookparms.getCookTime(), 0);
960  return result;
961  }
962  int64 getGeotype() const { return myGeotype; }
963  void setGeotype(int64 val) { myGeotype = val; }
964  int64 opGeotype(const SOP_NodeVerb::CookParms &cookparms) const
965  {
966  SOP_Node *thissop = cookparms.getNode();
967  if (!thissop) return getGeotype();
968  int64 result;
969  OP_Utils::evalOpParm(result, thissop, "geotype", cookparms.getCookTime(), 0);
970  return result;
971  }
972  bool getGroupBounding() const { return myGroupBounding; }
973  void setGroupBounding(bool val) { myGroupBounding = val; }
974  bool opGroupBounding(const SOP_NodeVerb::CookParms &cookparms) const
975  {
976  SOP_Node *thissop = cookparms.getNode();
977  if (!thissop) return getGroupBounding();
978  bool result;
979  OP_Utils::evalOpParm(result, thissop, "groupbounding", cookparms.getCookTime(), 0);
980  return result;
981  }
982  Boundtype getBoundtype() const { return Boundtype(myBoundtype); }
983  void setBoundtype(Boundtype val) { myBoundtype = int64(val); }
985  {
986  SOP_Node *thissop = cookparms.getNode();
987  if (!thissop) return getBoundtype();
988  int64 result;
989  OP_Utils::evalOpParm(result, thissop, "boundtype", cookparms.getCookTime(), 0);
990  return Boundtype(result);
991  }
992  UT_Vector3D getSize() const { return mySize; }
993  void setSize(UT_Vector3D val) { mySize = val; }
995  {
996  SOP_Node *thissop = cookparms.getNode();
997  if (!thissop) return getSize();
998  UT_Vector3D result;
999  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
1000  return result;
1001  }
1002  UT_Vector3D getT() const { return myT; }
1003  void setT(UT_Vector3D val) { myT = val; }
1004  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
1005  {
1006  SOP_Node *thissop = cookparms.getNode();
1007  if (!thissop) return getT();
1008  UT_Vector3D result;
1009  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
1010  return result;
1011  }
1012  bool getIncludenotwhollycontained() const { return myIncludenotwhollycontained; }
1013  void setIncludenotwhollycontained(bool val) { myIncludenotwhollycontained = val; }
1015  {
1016  SOP_Node *thissop = cookparms.getNode();
1017  if (!thissop) return getIncludenotwhollycontained();
1018  bool result;
1019  OP_Utils::evalOpParm(result, thissop, "includenotwhollycontained", cookparms.getCookTime(), 0);
1020  return result;
1021  }
1022  fpreal64 getIso() const { return myIso; }
1023  void setIso(fpreal64 val) { myIso = val; }
1024  fpreal64 opIso(const SOP_NodeVerb::CookParms &cookparms) const
1025  {
1026  SOP_Node *thissop = cookparms.getNode();
1027  if (!thissop) return getIso();
1028  fpreal64 result;
1029  OP_Utils::evalOpParm(result, thissop, "iso", cookparms.getCookTime(), 0);
1030  return result;
1031  }
1032  bool getInvertvolume() const { return myInvertvolume; }
1033  void setInvertvolume(bool val) { myInvertvolume = val; }
1034  bool opInvertvolume(const SOP_NodeVerb::CookParms &cookparms) const
1035  {
1036  SOP_Node *thissop = cookparms.getNode();
1037  if (!thissop) return getInvertvolume();
1038  bool result;
1039  OP_Utils::evalOpParm(result, thissop, "invertvolume", cookparms.getCookTime(), 0);
1040  return result;
1041  }
1042  bool getGroupNormal() const { return myGroupNormal; }
1043  void setGroupNormal(bool val) { myGroupNormal = val; }
1044  bool opGroupNormal(const SOP_NodeVerb::CookParms &cookparms) const
1045  {
1046  SOP_Node *thissop = cookparms.getNode();
1047  if (!thissop) return getGroupNormal();
1048  bool result;
1049  OP_Utils::evalOpParm(result, thissop, "groupnormal", cookparms.getCookTime(), 0);
1050  return result;
1051  }
1052  const UT_StringHolder & getCamerapath() const { return myCamerapath; }
1053  void setCamerapath(const UT_StringHolder & val) { myCamerapath = val; }
1055  {
1056  SOP_Node *thissop = cookparms.getNode();
1057  if (!thissop) return getCamerapath();
1058  UT_StringHolder result;
1059  OP_Utils::evalOpParm(result, thissop, "camerapath", cookparms.getCookTime(), 0);
1060  return result;
1061  }
1062  bool getNonplanar() const { return myNonplanar; }
1063  void setNonplanar(bool val) { myNonplanar = val; }
1064  bool opNonplanar(const SOP_NodeVerb::CookParms &cookparms) const
1065  {
1066  SOP_Node *thissop = cookparms.getNode();
1067  if (!thissop) return getNonplanar();
1068  bool result;
1069  OP_Utils::evalOpParm(result, thissop, "nonplanar", cookparms.getCookTime(), 0);
1070  return result;
1071  }
1072  fpreal64 getNonplanartol() const { return myNonplanartol; }
1073  void setNonplanartol(fpreal64 val) { myNonplanartol = val; }
1075  {
1076  SOP_Node *thissop = cookparms.getNode();
1077  if (!thissop) return getNonplanartol();
1078  fpreal64 result;
1079  OP_Utils::evalOpParm(result, thissop, "nonplanartol", cookparms.getCookTime(), 0);
1080  return result;
1081  }
1082  UT_Vector3D getDir() const { return myDir; }
1083  void setDir(UT_Vector3D val) { myDir = val; }
1085  {
1086  SOP_Node *thissop = cookparms.getNode();
1087  if (!thissop) return getDir();
1088  UT_Vector3D result;
1089  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
1090  return result;
1091  }
1092  fpreal64 getAngle() const { return myAngle; }
1093  void setAngle(fpreal64 val) { myAngle = val; }
1094  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
1095  {
1096  SOP_Node *thissop = cookparms.getNode();
1097  if (!thissop) return getAngle();
1098  fpreal64 result;
1099  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
1100  return result;
1101  }
1102  bool getGroupEdges() const { return myGroupEdges; }
1103  void setGroupEdges(bool val) { myGroupEdges = val; }
1104  bool opGroupEdges(const SOP_NodeVerb::CookParms &cookparms) const
1105  {
1106  SOP_Node *thissop = cookparms.getNode();
1107  if (!thissop) return getGroupEdges();
1108  bool result;
1109  OP_Utils::evalOpParm(result, thissop, "groupedges", cookparms.getCookTime(), 0);
1110  return result;
1111  }
1112  bool getDominedgeangle() const { return myDominedgeangle; }
1113  void setDominedgeangle(bool val) { myDominedgeangle = val; }
1114  bool opDominedgeangle(const SOP_NodeVerb::CookParms &cookparms) const
1115  {
1116  SOP_Node *thissop = cookparms.getNode();
1117  if (!thissop) return getDominedgeangle();
1118  bool result;
1119  OP_Utils::evalOpParm(result, thissop, "dominedgeangle", cookparms.getCookTime(), 0);
1120  return result;
1121  }
1122  fpreal64 getMinedgeangle() const { return myMinedgeangle; }
1123  void setMinedgeangle(fpreal64 val) { myMinedgeangle = val; }
1125  {
1126  SOP_Node *thissop = cookparms.getNode();
1127  if (!thissop) return getMinedgeangle();
1128  fpreal64 result;
1129  OP_Utils::evalOpParm(result, thissop, "minedgeangle", cookparms.getCookTime(), 0);
1130  return result;
1131  }
1132  bool getDomaxedgeangle() const { return myDomaxedgeangle; }
1133  void setDomaxedgeangle(bool val) { myDomaxedgeangle = val; }
1134  bool opDomaxedgeangle(const SOP_NodeVerb::CookParms &cookparms) const
1135  {
1136  SOP_Node *thissop = cookparms.getNode();
1137  if (!thissop) return getDomaxedgeangle();
1138  bool result;
1139  OP_Utils::evalOpParm(result, thissop, "domaxedgeangle", cookparms.getCookTime(), 0);
1140  return result;
1141  }
1142  fpreal64 getMaxedgeangle() const { return myMaxedgeangle; }
1143  void setMaxedgeangle(fpreal64 val) { myMaxedgeangle = val; }
1145  {
1146  SOP_Node *thissop = cookparms.getNode();
1147  if (!thissop) return getMaxedgeangle();
1148  fpreal64 result;
1149  OP_Utils::evalOpParm(result, thissop, "maxedgeangle", cookparms.getCookTime(), 0);
1150  return result;
1151  }
1152  bool getEdgeAngleBetweenEdges() const { return myEdgeAngleBetweenEdges; }
1153  void setEdgeAngleBetweenEdges(bool val) { myEdgeAngleBetweenEdges = val; }
1155  {
1156  SOP_Node *thissop = cookparms.getNode();
1157  if (!thissop) return getEdgeAngleBetweenEdges();
1158  bool result;
1159  OP_Utils::evalOpParm(result, thissop, "edgeanglebetweenedges", cookparms.getCookTime(), 0);
1160  return result;
1161  }
1162  bool getDominedgelen() const { return myDominedgelen; }
1163  void setDominedgelen(bool val) { myDominedgelen = val; }
1164  bool opDominedgelen(const SOP_NodeVerb::CookParms &cookparms) const
1165  {
1166  SOP_Node *thissop = cookparms.getNode();
1167  if (!thissop) return getDominedgelen();
1168  bool result;
1169  OP_Utils::evalOpParm(result, thissop, "dominedgelen", cookparms.getCookTime(), 0);
1170  return result;
1171  }
1172  fpreal64 getMinedgelen() const { return myMinedgelen; }
1173  void setMinedgelen(fpreal64 val) { myMinedgelen = val; }
1175  {
1176  SOP_Node *thissop = cookparms.getNode();
1177  if (!thissop) return getMinedgelen();
1178  fpreal64 result;
1179  OP_Utils::evalOpParm(result, thissop, "minedgelen", cookparms.getCookTime(), 0);
1180  return result;
1181  }
1182  bool getDomaxedgelen() const { return myDomaxedgelen; }
1183  void setDomaxedgelen(bool val) { myDomaxedgelen = val; }
1184  bool opDomaxedgelen(const SOP_NodeVerb::CookParms &cookparms) const
1185  {
1186  SOP_Node *thissop = cookparms.getNode();
1187  if (!thissop) return getDomaxedgelen();
1188  bool result;
1189  OP_Utils::evalOpParm(result, thissop, "domaxedgelen", cookparms.getCookTime(), 0);
1190  return result;
1191  }
1192  fpreal64 getMaxedgelen() const { return myMaxedgelen; }
1193  void setMaxedgelen(fpreal64 val) { myMaxedgelen = val; }
1195  {
1196  SOP_Node *thissop = cookparms.getNode();
1197  if (!thissop) return getMaxedgelen();
1198  fpreal64 result;
1199  OP_Utils::evalOpParm(result, thissop, "maxedgelen", cookparms.getCookTime(), 0);
1200  return result;
1201  }
1202  bool getDodepth() const { return myDodepth; }
1203  void setDodepth(bool val) { myDodepth = val; }
1204  bool opDodepth(const SOP_NodeVerb::CookParms &cookparms) const
1205  {
1206  SOP_Node *thissop = cookparms.getNode();
1207  if (!thissop) return getDodepth();
1208  bool result;
1209  OP_Utils::evalOpParm(result, thissop, "dodepth", cookparms.getCookTime(), 0);
1210  return result;
1211  }
1212  int64 getEdgestep() const { return myEdgestep; }
1213  void setEdgestep(int64 val) { myEdgestep = val; }
1214  int64 opEdgestep(const SOP_NodeVerb::CookParms &cookparms) const
1215  {
1216  SOP_Node *thissop = cookparms.getNode();
1217  if (!thissop) return getEdgestep();
1218  int64 result;
1219  OP_Utils::evalOpParm(result, thissop, "edgestep", cookparms.getCookTime(), 0);
1220  return result;
1221  }
1222  const UT_StringHolder & getEdgeptgrp() const { return myEdgeptgrp; }
1223  void setEdgeptgrp(const UT_StringHolder & val) { myEdgeptgrp = val; }
1225  {
1226  SOP_Node *thissop = cookparms.getNode();
1227  if (!thissop) return getEdgeptgrp();
1228  UT_StringHolder result;
1229  OP_Utils::evalOpParm(result, thissop, "edgeptgrp", cookparms.getCookTime(), 0);
1230  return result;
1231  }
1232  bool getUnshared() const { return myUnshared; }
1233  void setUnshared(bool val) { myUnshared = val; }
1234  bool opUnshared(const SOP_NodeVerb::CookParms &cookparms) const
1235  {
1236  SOP_Node *thissop = cookparms.getNode();
1237  if (!thissop) return getUnshared();
1238  bool result;
1239  OP_Utils::evalOpParm(result, thissop, "unshared", cookparms.getCookTime(), 0);
1240  return result;
1241  }
1242  bool getBoundaryGroups() const { return myBoundaryGroups; }
1243  void setBoundaryGroups(bool val) { myBoundaryGroups = val; }
1244  bool opBoundaryGroups(const SOP_NodeVerb::CookParms &cookparms) const
1245  {
1246  SOP_Node *thissop = cookparms.getNode();
1247  if (!thissop) return getBoundaryGroups();
1248  bool result;
1249  OP_Utils::evalOpParm(result, thissop, "boundarygroups", cookparms.getCookTime(), 0);
1250  return result;
1251  }
1252 
1253 private:
1254  UT_StringHolder myGroupName;
1255  int64 myGrouptype;
1256  int64 myMergeop;
1257  bool myGroupBase;
1258  UT_StringHolder myBasegroup;
1259  bool myOrdered;
1260  int64 myGeotype;
1261  bool myGroupBounding;
1262  int64 myBoundtype;
1263  UT_Vector3D mySize;
1264  UT_Vector3D myT;
1265  bool myIncludenotwhollycontained;
1266  fpreal64 myIso;
1267  bool myInvertvolume;
1268  bool myGroupNormal;
1269  UT_StringHolder myCamerapath;
1270  bool myNonplanar;
1271  fpreal64 myNonplanartol;
1272  UT_Vector3D myDir;
1273  fpreal64 myAngle;
1274  bool myGroupEdges;
1275  bool myDominedgeangle;
1276  fpreal64 myMinedgeangle;
1277  bool myDomaxedgeangle;
1278  fpreal64 myMaxedgeangle;
1279  bool myEdgeAngleBetweenEdges;
1280  bool myDominedgelen;
1281  fpreal64 myMinedgelen;
1282  bool myDomaxedgelen;
1283  fpreal64 myMaxedgelen;
1284  bool myDodepth;
1285  int64 myEdgestep;
1286  UT_StringHolder myEdgeptgrp;
1287  bool myUnshared;
1288  bool myBoundaryGroups;
1289 
1290 };
void setIncludenotwhollycontained(bool val)
bool getEdgeAngleBetweenEdges() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setMaxedgeangle(fpreal64 val)
bool opUnshared(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroupName() const
static void loadData(UT_IStream &is, bool &v)
const UT_StringHolder & getCamerapath() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
void setGrouptype(Grouptype val)
bool operator!=(const SOP_GroupCreateParms &src) const
void setDir(UT_Vector3D val)
T & z(void)
Definition: UT_Vector4.h:379
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal64 opMaxedgeangle(const SOP_NodeVerb::CookParms &cookparms) const
void setBasegroup(const UT_StringHolder &val)
void setSize(UT_Vector3D val)
static void saveData(std::ostream &os, int64 v)
void setParmValue(exint idx, const UT_Vector4D &value)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
bool opInvertvolume(const SOP_NodeVerb::CookParms &cookparms) const
bool opDomaxedgelen(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
UT_StringHolder opEdgeptgrp(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setGroupName(const UT_StringHolder &val)
void setEdgeAngleBetweenEdges(bool val)
bool opDominedgelen(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void setMinedgeangle(fpreal64 val)
void setCamerapath(const UT_StringHolder &val)
bool operator==(const SOP_GroupCreateParms &src) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
Boundtype getBoundtype() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opGroupEdges(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
UT_Vector3D getDir() const
void getParmValue(exint idx, UT_Matrix4D &value) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opDominedgeangle(const SOP_NodeVerb::CookParms &cookparms) const
bool opDodepth(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
void doSetParmValue(exint idx, const T &value)
fpreal64 getNonplanartol() const
fpreal64 opIso(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getParmValue(exint idx, UT_Vector4D &value) const
const UT_StringHolder & getEdgeptgrp() const
bool opGroupNormal(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
UT_Vector3D getSize() const
virtual void copyFrom(const SOP_NodeParms *src)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
const UT_StringHolder & getBasegroup() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
long long int64
Definition: SYS_Types.h:107
virtual const char * getParmName(exint fieldnum) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
int64 opGeotype(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix4D &value)
void setBoundtype(Boundtype val)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
fpreal64 opMaxedgelen(const SOP_NodeVerb::CookParms &cookparms) const
bool opDomaxedgeangle(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void loadData(UT_IStream &is, int64 &v)
int64 exint
Definition: SYS_Types.h:116
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
fpreal64 opMinedgeangle(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:192
void doGetParmValue(exint idx, T &value) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
virtual exint getNumParms() const
bool opGroupBounding(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector3D &value)
void setParmValue(exint idx, const UT_StringHolder &value)
int64 opEdgestep(const SOP_NodeVerb::CookParms &cookparms) const
bool opOrdered(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
UT_StringHolder opBasegroup(const SOP_NodeVerb::CookParms &cookparms) const
void setMinedgelen(fpreal64 val)
GLboolean * data
Definition: glcorearb.h:130
static void loadData(UT_IStream &is, UT_Matrix3D &v)
int int32
Definition: SYS_Types.h:35
static void loadData(UT_IStream &is, UT_Matrix4D &v)
T & y(void)
Definition: UT_Vector4.h:377
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector2D &value) const
void setAngle(fpreal64 val)
Boundtype opBoundtype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void getParmValue(exint idx, UT_Vector3D &value) const
bool getIncludenotwhollycontained() const
void setMaxedgelen(fpreal64 val)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void setParmValue(exint idx, const UT_Matrix3D &value)
void setParmValue(exint idx, const UT_Matrix2D &value)
fpreal64 getMaxedgeangle() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool opNonplanar(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
static void loadData(UT_IStream &is, fpreal64 &v)
virtual ParmType getParmType(exint fieldnum) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opCamerapath(const SOP_NodeVerb::CookParms &cookparms) const
void setEdgeptgrp(const UT_StringHolder &val)
UT_Vector3D getT() const
void save(std::ostream &os) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 opMinedgelen(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
Mergeop opMergeop(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, fpreal &value) const
void getParmValue(exint idx, UT_StringHolder &value) const
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 opNonplanartol(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
void setMergeop(Mergeop val)
T & y(void)
Definition: UT_Vector2.h:287
void setParmValue(exint idx, const exint &value)
void setT(UT_Vector3D val)
GLboolean r
Definition: glcorearb.h:1221
void setNonplanartol(fpreal64 val)
T & w(void)
Definition: UT_Vector4.h:381
static void saveData(std::ostream &os, UT_Vector2D v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void getParmValue(exint idx, UT_Matrix3D &value) const
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
Grouptype getGrouptype() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opIncludenotwhollycontained(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getMinedgeangle() const
static void saveData(std::ostream &os, fpreal64 v)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
bool opBoundaryGroups(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
fpreal64 getMaxedgelen() const
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opGroupName(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
void setParmValue(exint idx, const fpreal &value)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
bool opGroupBase(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
bool opEdgeAngleBetweenEdges(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1792
fpreal64 getMinedgelen() const