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