HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_ConvexDecomposition.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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_ConvexDecompositionEnums
24 {
25  enum class GeometryOutput
26  {
27  HULLS = 0,
28  SEGMENTS
29  };
30 }
31 
32 
34 {
35 public:
36  static int version() { return 1; }
37 
39  {
40  myGroup = ""_UTsh;
41  myUsePieceAttrib = true;
42  myPieceAttrib = "name"_UTsh;
43  myMaxConcavity = 1;
44  myTreatAsSolid = true;
45  myMergeSegments = false;
46  myGeometryOutput = 0;
47  myOutputSegmentAttrib = true;
48  mySegmentAttrib = "segment"_UTsh;
49  myOutputInteriorGroup = true;
50  myInteriorGroupName = "convex_decomposition_interior"_UTsh;
51 
52  }
53 
57  SOP_ConvexDecompositionParms &operator=(SOP_ConvexDecompositionParms &&) noexcept = default;
58 
60 
62  {
63  if (myGroup != src.myGroup) return false;
64  if (myUsePieceAttrib != src.myUsePieceAttrib) return false;
65  if (myPieceAttrib != src.myPieceAttrib) return false;
66  if (myMaxConcavity != src.myMaxConcavity) return false;
67  if (myTreatAsSolid != src.myTreatAsSolid) return false;
68  if (myMergeSegments != src.myMergeSegments) return false;
69  if (myGeometryOutput != src.myGeometryOutput) return false;
70  if (myOutputSegmentAttrib != src.myOutputSegmentAttrib) return false;
71  if (mySegmentAttrib != src.mySegmentAttrib) return false;
72  if (myOutputInteriorGroup != src.myOutputInteriorGroup) return false;
73  if (myInteriorGroupName != src.myInteriorGroupName) return false;
74 
75  return true;
76  }
78  {
79  return !operator==(src);
80  }
82 
83 
84 
85  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
86  {
87  myGroup = ""_UTsh;
88  if (true)
89  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
90  myUsePieceAttrib = true;
91  if (true)
92  graph->evalOpParm(myUsePieceAttrib, nodeidx, "usepieceattrib", time, 0);
93  myPieceAttrib = "name"_UTsh;
94  if (true && ( (true&&!(((getUsePieceAttrib()==0)))) ) )
95  graph->evalOpParm(myPieceAttrib, nodeidx, "pieceattrib", time, 0);
96  myMaxConcavity = 1;
97  if (true)
98  graph->evalOpParm(myMaxConcavity, nodeidx, "maxconcavity", time, 0);
99  myTreatAsSolid = true;
100  if (true)
101  graph->evalOpParm(myTreatAsSolid, nodeidx, "treatassolid", time, 0);
102  myMergeSegments = false;
103  if (true)
104  graph->evalOpParm(myMergeSegments, nodeidx, "mergesegments", time, 0);
105  myGeometryOutput = 0;
106  if (true)
107  graph->evalOpParm(myGeometryOutput, nodeidx, "geometryoutput", time, 0);
108  myOutputSegmentAttrib = true;
109  if (true)
110  graph->evalOpParm(myOutputSegmentAttrib, nodeidx, "outputsegmentattrib", time, 0);
111  mySegmentAttrib = "segment"_UTsh;
112  if (true && ( (true&&!(((getOutputSegmentAttrib()==0)))) ) )
113  graph->evalOpParm(mySegmentAttrib, nodeidx, "segmentattrib", time, 0);
114  myOutputInteriorGroup = true;
115  if (true && ( (true&&!(((int64(getGeometryOutput())!=1)))) ) )
116  graph->evalOpParm(myOutputInteriorGroup, nodeidx, "outputinteriorgroup", time, 0);
117  myInteriorGroupName = "convex_decomposition_interior"_UTsh;
118  if (true && ( (true&&!(((int64(getGeometryOutput())!=1))||((getOutputInteriorGroup()==0)))) ) )
119  graph->evalOpParm(myInteriorGroupName, nodeidx, "interiorgroupname", time, 0);
120 
121  }
122 
123 
124  void loadFromOpSubclass(const LoadParms &loadparms) override
125  {
126  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
127  }
128 
129 
130  void copyFrom(const OP_NodeParms *src) override
131  {
132  *this = *((const SOP_ConvexDecompositionParms *)src);
133  }
134 
135  template <typename T>
136  void
137  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
138  {
139  if (idx.size() < 1)
140  return;
141  UT_ASSERT(idx.size() == instance.size()+1);
142  if (idx.size() != instance.size()+1)
143  return;
144  switch (idx[0])
145  {
146  case 0:
147  coerceValue(value, myGroup);
148  break;
149  case 1:
150  coerceValue(value, myUsePieceAttrib);
151  break;
152  case 2:
153  coerceValue(value, myPieceAttrib);
154  break;
155  case 3:
156  coerceValue(value, myMaxConcavity);
157  break;
158  case 4:
159  coerceValue(value, myTreatAsSolid);
160  break;
161  case 5:
162  coerceValue(value, myMergeSegments);
163  break;
164  case 6:
165  coerceValue(value, myGeometryOutput);
166  break;
167  case 7:
168  coerceValue(value, myOutputSegmentAttrib);
169  break;
170  case 8:
171  coerceValue(value, mySegmentAttrib);
172  break;
173  case 9:
174  coerceValue(value, myOutputInteriorGroup);
175  break;
176  case 10:
177  coerceValue(value, myInteriorGroupName);
178  break;
179 
180  }
181  }
182 
183  bool isParmColorRamp(exint idx) const override
184  {
185  switch (idx)
186  {
187 
188  }
189  return false;
190  }
191 
192  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
193  { doGetParmValue(idx, instance, value); }
194  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
195  { doGetParmValue(idx, instance, value); }
196  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
197  { doGetParmValue(idx, instance, value); }
198  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
199  { doGetParmValue(idx, instance, value); }
200  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
201  { doGetParmValue(idx, instance, value); }
202  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
203  { doGetParmValue(idx, instance, value); }
204  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
205  { doGetParmValue(idx, instance, value); }
206  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
213  { doGetParmValue(idx, instance, value); }
214 
215  template <typename T>
216  void
217  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
218  {
219  if (idx.size() < 1)
220  return;
221  UT_ASSERT(idx.size() == instance.size()+1);
222  if (idx.size() != instance.size()+1)
223  return;
224  switch (idx[0])
225  {
226  case 0:
227  coerceValue(myGroup, ( ( value ) ));
228  break;
229  case 1:
230  coerceValue(myUsePieceAttrib, ( ( value ) ));
231  break;
232  case 2:
233  coerceValue(myPieceAttrib, ( ( value ) ));
234  break;
235  case 3:
236  coerceValue(myMaxConcavity, clampMinValue(0, ( value ) ));
237  break;
238  case 4:
239  coerceValue(myTreatAsSolid, ( ( value ) ));
240  break;
241  case 5:
242  coerceValue(myMergeSegments, ( ( value ) ));
243  break;
244  case 6:
245  coerceValue(myGeometryOutput, clampMinValue(0, clampMaxValue(1, value ) ));
246  break;
247  case 7:
248  coerceValue(myOutputSegmentAttrib, ( ( value ) ));
249  break;
250  case 8:
251  coerceValue(mySegmentAttrib, ( ( value ) ));
252  break;
253  case 9:
254  coerceValue(myOutputInteriorGroup, ( ( value ) ));
255  break;
256  case 10:
257  coerceValue(myInteriorGroupName, ( ( value ) ));
258  break;
259 
260  }
261  }
262 
263  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
264  { doSetParmValue(idx, instance, value); }
265  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
266  { doSetParmValue(idx, instance, value); }
267  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
268  { doSetParmValue(idx, instance, value); }
269  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
270  { doSetParmValue(idx, instance, value); }
271  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
272  { doSetParmValue(idx, instance, value); }
273  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
274  { doSetParmValue(idx, instance, value); }
275  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
276  { doSetParmValue(idx, instance, value); }
277  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
278  { doSetParmValue(idx, instance, value); }
279  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
280  { doSetParmValue(idx, instance, value); }
281  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
282  { doSetParmValue(idx, instance, value); }
283  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
284  { doSetParmValue(idx, instance, value); }
285 
286  exint getNestNumParms(TempIndex idx) const override
287  {
288  if (idx.size() == 0)
289  return 11;
290  switch (idx[0])
291  {
292 
293  }
294  // Invalid
295  return 0;
296  }
297 
298  const char *getNestParmName(TempIndex fieldnum) const override
299  {
300  if (fieldnum.size() < 1)
301  return 0;
302  switch (fieldnum[0])
303  {
304  case 0:
305  return "group";
306  case 1:
307  return "usepieceattrib";
308  case 2:
309  return "pieceattrib";
310  case 3:
311  return "maxconcavity";
312  case 4:
313  return "treatassolid";
314  case 5:
315  return "mergesegments";
316  case 6:
317  return "geometryoutput";
318  case 7:
319  return "outputsegmentattrib";
320  case 8:
321  return "segmentattrib";
322  case 9:
323  return "outputinteriorgroup";
324  case 10:
325  return "interiorgroupname";
326 
327  }
328  return 0;
329  }
330 
331  ParmType getNestParmType(TempIndex fieldnum) const override
332  {
333  if (fieldnum.size() < 1)
334  return PARM_UNSUPPORTED;
335  switch (fieldnum[0])
336  {
337  case 0:
338  return PARM_STRING;
339  case 1:
340  return PARM_INTEGER;
341  case 2:
342  return PARM_STRING;
343  case 3:
344  return PARM_FLOAT;
345  case 4:
346  return PARM_INTEGER;
347  case 5:
348  return PARM_INTEGER;
349  case 6:
350  return PARM_INTEGER;
351  case 7:
352  return PARM_INTEGER;
353  case 8:
354  return PARM_STRING;
355  case 9:
356  return PARM_INTEGER;
357  case 10:
358  return PARM_STRING;
359 
360  }
361  return PARM_UNSUPPORTED;
362  }
363 
364  // Boiler plate to load individual types.
365  static void loadData(UT_IStream &is, int64 &v)
366  { is.bread(&v, 1); }
367  static void loadData(UT_IStream &is, bool &v)
368  { int64 iv; is.bread(&iv, 1); v = iv; }
369  static void loadData(UT_IStream &is, fpreal64 &v)
370  { is.bread<fpreal64>(&v, 1); }
371  static void loadData(UT_IStream &is, UT_Vector2D &v)
372  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
373  static void loadData(UT_IStream &is, UT_Vector3D &v)
374  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
375  is.bread<fpreal64>(&v.z(), 1); }
376  static void loadData(UT_IStream &is, UT_Vector4D &v)
377  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
378  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
379  static void loadData(UT_IStream &is, UT_Matrix2D &v)
380  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
381  static void loadData(UT_IStream &is, UT_Matrix3D &v)
382  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
383  static void loadData(UT_IStream &is, UT_Matrix4D &v)
384  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
385  static void loadData(UT_IStream &is, UT_Vector2I &v)
386  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
387  static void loadData(UT_IStream &is, UT_Vector3I &v)
388  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
389  is.bread<int64>(&v.z(), 1); }
390  static void loadData(UT_IStream &is, UT_Vector4I &v)
391  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
392  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
394  { is.bread(v); }
396  { UT_StringHolder rampdata;
397  loadData(is, rampdata);
398  if (rampdata.isstring())
399  {
400  v.reset(new UT_Ramp());
401  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
402  v->load(istr);
403  }
404  else v.reset();
405  }
408  loadData(is, data);
409  if (data.isstring())
410  {
411  // Find the data type.
412  const char *colon = UT_StringWrap(data).findChar(':');
413  if (colon)
414  {
415  int typelen = colon - data.buffer();
417  type.strncpy(data.buffer(), typelen);
418  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
419 
420  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
421  }
422  }
423  else v.reset();
424  }
425 
426  static void saveData(std::ostream &os, int64 v)
427  { UTwrite(os, &v); }
428  static void saveData(std::ostream &os, bool v)
429  { int64 iv = v; UTwrite(os, &iv); }
430  static void saveData(std::ostream &os, fpreal64 v)
431  { UTwrite<fpreal64>(os, &v); }
432  static void saveData(std::ostream &os, UT_Vector2D v)
433  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
434  static void saveData(std::ostream &os, UT_Vector3D v)
435  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
436  UTwrite<fpreal64>(os, &v.z()); }
437  static void saveData(std::ostream &os, UT_Vector4D v)
438  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
439  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
440  static void saveData(std::ostream &os, UT_Matrix2D v)
442  static void saveData(std::ostream &os, UT_Matrix3D v)
444  static void saveData(std::ostream &os, UT_Matrix4D v)
446  static void saveData(std::ostream &os, UT_StringHolder s)
447  { UT_StringWrap(s).saveBinary(os); }
448  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
450  UT_OStringStream ostr;
451  if (s) s->save(ostr);
452  result = ostr.str();
453  saveData(os, result);
454  }
455  static void saveData(std::ostream &os, PRM_DataItemHandle s)
457  UT_OStringStream ostr;
458  if (s)
459  {
460  ostr << s->getDataTypeToken();
461  ostr << ":";
462  s->saveBinary(ostr);
463  }
464  result = ostr.str();
465  saveData(os, result);
466  }
467 
468 
469  void save(std::ostream &os) const
470  {
471  int32 v = version();
472  UTwrite(os, &v);
473  saveData(os, myGroup);
474  saveData(os, myUsePieceAttrib);
475  saveData(os, myPieceAttrib);
476  saveData(os, myMaxConcavity);
477  saveData(os, myTreatAsSolid);
478  saveData(os, myMergeSegments);
479  saveData(os, myGeometryOutput);
480  saveData(os, myOutputSegmentAttrib);
481  saveData(os, mySegmentAttrib);
482  saveData(os, myOutputInteriorGroup);
483  saveData(os, myInteriorGroupName);
484 
485  }
486 
487  bool load(UT_IStream &is)
488  {
489  int32 v;
490  is.bread(&v, 1);
491  if (version() != v)
492  {
493  // Fail incompatible versions
494  return false;
495  }
496  loadData(is, myGroup);
497  loadData(is, myUsePieceAttrib);
498  loadData(is, myPieceAttrib);
499  loadData(is, myMaxConcavity);
500  loadData(is, myTreatAsSolid);
501  loadData(is, myMergeSegments);
502  loadData(is, myGeometryOutput);
503  loadData(is, myOutputSegmentAttrib);
504  loadData(is, mySegmentAttrib);
505  loadData(is, myOutputInteriorGroup);
506  loadData(is, myInteriorGroupName);
507 
508  return true;
509  }
510 
511  const UT_StringHolder & getGroup() const { return myGroup; }
512  void setGroup(const UT_StringHolder & val) { myGroup = val; }
514  {
515  SOP_Node *thissop = cookparms.getNode();
516  if (!thissop) return getGroup();
518  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
519  return result;
520  }
521  bool getUsePieceAttrib() const { return myUsePieceAttrib; }
522  void setUsePieceAttrib(bool val) { myUsePieceAttrib = val; }
523  bool opUsePieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
524  {
525  SOP_Node *thissop = cookparms.getNode();
526  if (!thissop) return getUsePieceAttrib();
527  bool result;
528  OP_Utils::evalOpParm(result, thissop, "usepieceattrib", cookparms.getCookTime(), 0);
529  return result;
530  }
531  const UT_StringHolder & getPieceAttrib() const { return myPieceAttrib; }
532  void setPieceAttrib(const UT_StringHolder & val) { myPieceAttrib = val; }
534  {
535  SOP_Node *thissop = cookparms.getNode();
536  if (!thissop) return getPieceAttrib();
538  OP_Utils::evalOpParm(result, thissop, "pieceattrib", cookparms.getCookTime(), 0);
539  return result;
540  }
541  fpreal64 getMaxConcavity() const { return myMaxConcavity; }
542  void setMaxConcavity(fpreal64 val) { myMaxConcavity = val; }
544  {
545  SOP_Node *thissop = cookparms.getNode();
546  if (!thissop) return getMaxConcavity();
548  OP_Utils::evalOpParm(result, thissop, "maxconcavity", cookparms.getCookTime(), 0);
549  return result;
550  }
551  bool getTreatAsSolid() const { return myTreatAsSolid; }
552  void setTreatAsSolid(bool val) { myTreatAsSolid = val; }
553  bool opTreatAsSolid(const SOP_NodeVerb::CookParms &cookparms) const
554  {
555  SOP_Node *thissop = cookparms.getNode();
556  if (!thissop) return getTreatAsSolid();
557  bool result;
558  OP_Utils::evalOpParm(result, thissop, "treatassolid", cookparms.getCookTime(), 0);
559  return result;
560  }
561  bool getMergeSegments() const { return myMergeSegments; }
562  void setMergeSegments(bool val) { myMergeSegments = val; }
563  bool opMergeSegments(const SOP_NodeVerb::CookParms &cookparms) const
564  {
565  SOP_Node *thissop = cookparms.getNode();
566  if (!thissop) return getMergeSegments();
567  bool result;
568  OP_Utils::evalOpParm(result, thissop, "mergesegments", cookparms.getCookTime(), 0);
569  return result;
570  }
571  GeometryOutput getGeometryOutput() const { return GeometryOutput(myGeometryOutput); }
572  void setGeometryOutput(GeometryOutput val) { myGeometryOutput = int64(val); }
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getGeometryOutput();
577  int64 result;
578  OP_Utils::evalOpParm(result, thissop, "geometryoutput", cookparms.getCookTime(), 0);
579  return GeometryOutput(result);
580  }
581  bool getOutputSegmentAttrib() const { return myOutputSegmentAttrib; }
582  void setOutputSegmentAttrib(bool val) { myOutputSegmentAttrib = val; }
583  bool opOutputSegmentAttrib(const SOP_NodeVerb::CookParms &cookparms) const
584  {
585  SOP_Node *thissop = cookparms.getNode();
586  if (!thissop) return getOutputSegmentAttrib();
587  bool result;
588  OP_Utils::evalOpParm(result, thissop, "outputsegmentattrib", cookparms.getCookTime(), 0);
589  return result;
590  }
591  const UT_StringHolder & getSegmentAttrib() const { return mySegmentAttrib; }
592  void setSegmentAttrib(const UT_StringHolder & val) { mySegmentAttrib = val; }
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getSegmentAttrib();
598  OP_Utils::evalOpParm(result, thissop, "segmentattrib", cookparms.getCookTime(), 0);
599  return result;
600  }
601  bool getOutputInteriorGroup() const { return myOutputInteriorGroup; }
602  void setOutputInteriorGroup(bool val) { myOutputInteriorGroup = val; }
603  bool opOutputInteriorGroup(const SOP_NodeVerb::CookParms &cookparms) const
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getOutputInteriorGroup();
607  bool result;
608  OP_Utils::evalOpParm(result, thissop, "outputinteriorgroup", cookparms.getCookTime(), 0);
609  return result;
610  }
611  const UT_StringHolder & getInteriorGroupName() const { return myInteriorGroupName; }
612  void setInteriorGroupName(const UT_StringHolder & val) { myInteriorGroupName = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getInteriorGroupName();
618  OP_Utils::evalOpParm(result, thissop, "interiorgroupname", cookparms.getCookTime(), 0);
619  return result;
620  }
621 
622 private:
623  UT_StringHolder myGroup;
624  bool myUsePieceAttrib;
625  UT_StringHolder myPieceAttrib;
626  fpreal64 myMaxConcavity;
627  bool myTreatAsSolid;
628  bool myMergeSegments;
629  int64 myGeometryOutput;
630  bool myOutputSegmentAttrib;
631  UT_StringHolder mySegmentAttrib;
632  bool myOutputInteriorGroup;
633  UT_StringHolder myInteriorGroupName;
634 
635 };
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_StringHolder opPieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setInteriorGroupName(const UT_StringHolder &val)
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opOutputInteriorGroup(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_StringHolder & getInteriorGroupName() const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
static void saveData(std::ostream &os, UT_Vector3D v)
An output stream object that owns its own string buffer storage.
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
**But if you need a result
Definition: thread.h:613
fpreal64 opMaxConcavity(const SOP_NodeVerb::CookParms &cookparms) const
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_StringHolder & getPieceAttrib() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, bool v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
const UT_StringHolder & getSegmentAttrib() const
exint getNestNumParms(TempIndex idx) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opSegmentAttrib(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setPieceAttrib(const UT_StringHolder &val)
void setSegmentAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Vector4D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, int64 &v)
bool opOutputSegmentAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GeometryOutput opGeometryOutput(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool operator!=(const SOP_ConvexDecompositionParms &src) const
bool opTreatAsSolid(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
bool opMergeSegments(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opInteriorGroupName(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
static void saveData(std::ostream &os, int64 v)
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
bool operator==(const SOP_ConvexDecompositionParms &src) const
bool opUsePieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, fpreal64 v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_Matrix2D &v)