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 
32  getToken(GeometryOutput enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case GeometryOutput::HULLS: return "hulls"_sh;
37  case GeometryOutput::SEGMENTS: return "segments"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  myGroup = ""_UTsh;
53  myUsePieceAttrib = true;
54  myPieceAttrib = "name"_UTsh;
55  myMaxConcavity = 1;
56  myTreatAsSolid = true;
57  myMergeSegments = false;
58  myGeometryOutput = 0;
59  myOutputSegmentAttrib = true;
60  mySegmentAttrib = "segment"_UTsh;
61  myOutputInteriorGroup = true;
62  myInteriorGroupName = "convex_decomposition_interior"_UTsh;
63 
64  }
65 
69  SOP_ConvexDecompositionParms &operator=(SOP_ConvexDecompositionParms &&) noexcept = default;
70 
72 
74  {
75  if (myGroup != src.myGroup) return false;
76  if (myUsePieceAttrib != src.myUsePieceAttrib) return false;
77  if (myPieceAttrib != src.myPieceAttrib) return false;
78  if (myMaxConcavity != src.myMaxConcavity) return false;
79  if (myTreatAsSolid != src.myTreatAsSolid) return false;
80  if (myMergeSegments != src.myMergeSegments) return false;
81  if (myGeometryOutput != src.myGeometryOutput) return false;
82  if (myOutputSegmentAttrib != src.myOutputSegmentAttrib) return false;
83  if (mySegmentAttrib != src.mySegmentAttrib) return false;
84  if (myOutputInteriorGroup != src.myOutputInteriorGroup) return false;
85  if (myInteriorGroupName != src.myInteriorGroupName) return false;
86 
87  return true;
88  }
90  {
91  return !operator==(src);
92  }
94 
95 
96 
97  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
98  {
99  myGroup = ""_UTsh;
100  if (true)
101  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
102  myUsePieceAttrib = true;
103  if (true)
104  graph->evalOpParm(myUsePieceAttrib, nodeidx, "usepieceattrib", time, 0);
105  myPieceAttrib = "name"_UTsh;
106  if (true && ( (true&&!(((getUsePieceAttrib()==0)))) ) )
107  graph->evalOpParm(myPieceAttrib, nodeidx, "pieceattrib", time, 0);
108  myMaxConcavity = 1;
109  if (true)
110  graph->evalOpParm(myMaxConcavity, nodeidx, "maxconcavity", time, 0);
111  myTreatAsSolid = true;
112  if (true)
113  graph->evalOpParm(myTreatAsSolid, nodeidx, "treatassolid", time, 0);
114  myMergeSegments = false;
115  if (true)
116  graph->evalOpParm(myMergeSegments, nodeidx, "mergesegments", time, 0);
117  myGeometryOutput = 0;
118  if (true)
119  graph->evalOpParm(myGeometryOutput, nodeidx, "geometryoutput", time, 0);
120  myOutputSegmentAttrib = true;
121  if (true)
122  graph->evalOpParm(myOutputSegmentAttrib, nodeidx, "outputsegmentattrib", time, 0);
123  mySegmentAttrib = "segment"_UTsh;
124  if (true && ( (true&&!(((getOutputSegmentAttrib()==0)))) ) )
125  graph->evalOpParm(mySegmentAttrib, nodeidx, "segmentattrib", time, 0);
126  myOutputInteriorGroup = true;
127  if (true && ( (true&&!(((int64(getGeometryOutput())!=1)))) ) )
128  graph->evalOpParm(myOutputInteriorGroup, nodeidx, "outputinteriorgroup", time, 0);
129  myInteriorGroupName = "convex_decomposition_interior"_UTsh;
130  if (true && ( (true&&!(((int64(getGeometryOutput())!=1))||((getOutputInteriorGroup()==0)))) ) )
131  graph->evalOpParm(myInteriorGroupName, nodeidx, "interiorgroupname", time, 0);
132 
133  }
134 
135 
136  void loadFromOpSubclass(const LoadParms &loadparms) override
137  {
138  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
139  }
140 
141 
142  void copyFrom(const OP_NodeParms *src) override
143  {
144  *this = *((const SOP_ConvexDecompositionParms *)src);
145  }
146 
147  template <typename T>
148  void
149  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
150  {
151  if (idx.size() < 1)
152  return;
153  UT_ASSERT(idx.size() == instance.size()+1);
154  if (idx.size() != instance.size()+1)
155  return;
156  switch (idx[0])
157  {
158  case 0:
159  coerceValue(value, myGroup);
160  break;
161  case 1:
162  coerceValue(value, myUsePieceAttrib);
163  break;
164  case 2:
165  coerceValue(value, myPieceAttrib);
166  break;
167  case 3:
168  coerceValue(value, myMaxConcavity);
169  break;
170  case 4:
171  coerceValue(value, myTreatAsSolid);
172  break;
173  case 5:
174  coerceValue(value, myMergeSegments);
175  break;
176  case 6:
177  coerceValue(value, myGeometryOutput);
178  break;
179  case 7:
180  coerceValue(value, myOutputSegmentAttrib);
181  break;
182  case 8:
183  coerceValue(value, mySegmentAttrib);
184  break;
185  case 9:
186  coerceValue(value, myOutputInteriorGroup);
187  break;
188  case 10:
189  coerceValue(value, myInteriorGroupName);
190  break;
191 
192  }
193  }
194 
195  bool isParmColorRamp(exint idx) const override
196  {
197  switch (idx)
198  {
199 
200  }
201  return false;
202  }
203 
204  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
205  { doGetParmValue(idx, instance, value); }
206  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
225  { doGetParmValue(idx, instance, value); }
226 
227  template <typename T>
228  void
229  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
230  {
231  if (idx.size() < 1)
232  return;
233  UT_ASSERT(idx.size() == instance.size()+1);
234  if (idx.size() != instance.size()+1)
235  return;
236  switch (idx[0])
237  {
238  case 0:
239  coerceValue(myGroup, ( ( value ) ));
240  break;
241  case 1:
242  coerceValue(myUsePieceAttrib, ( ( value ) ));
243  break;
244  case 2:
245  coerceValue(myPieceAttrib, ( ( value ) ));
246  break;
247  case 3:
248  coerceValue(myMaxConcavity, clampMinValue(0, ( value ) ));
249  break;
250  case 4:
251  coerceValue(myTreatAsSolid, ( ( value ) ));
252  break;
253  case 5:
254  coerceValue(myMergeSegments, ( ( value ) ));
255  break;
256  case 6:
257  coerceValue(myGeometryOutput, clampMinValue(0, clampMaxValue(1, value ) ));
258  break;
259  case 7:
260  coerceValue(myOutputSegmentAttrib, ( ( value ) ));
261  break;
262  case 8:
263  coerceValue(mySegmentAttrib, ( ( value ) ));
264  break;
265  case 9:
266  coerceValue(myOutputInteriorGroup, ( ( value ) ));
267  break;
268  case 10:
269  coerceValue(myInteriorGroupName, ( ( value ) ));
270  break;
271 
272  }
273  }
274 
275  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
276  { doSetParmValue(idx, instance, value); }
277  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
278  { doSetParmValue(idx, instance, value); }
279  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
280  { doSetParmValue(idx, instance, value); }
281  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
282  { doSetParmValue(idx, instance, value); }
283  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
284  { doSetParmValue(idx, instance, value); }
285  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
286  { doSetParmValue(idx, instance, value); }
287  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
288  { doSetParmValue(idx, instance, value); }
289  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
290  { doSetParmValue(idx, instance, value); }
291  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
296  { doSetParmValue(idx, instance, value); }
297 
298  exint getNestNumParms(TempIndex idx) const override
299  {
300  if (idx.size() == 0)
301  return 11;
302  switch (idx[0])
303  {
304 
305  }
306  // Invalid
307  return 0;
308  }
309 
310  const char *getNestParmName(TempIndex fieldnum) const override
311  {
312  if (fieldnum.size() < 1)
313  return 0;
314  switch (fieldnum[0])
315  {
316  case 0:
317  return "group";
318  case 1:
319  return "usepieceattrib";
320  case 2:
321  return "pieceattrib";
322  case 3:
323  return "maxconcavity";
324  case 4:
325  return "treatassolid";
326  case 5:
327  return "mergesegments";
328  case 6:
329  return "geometryoutput";
330  case 7:
331  return "outputsegmentattrib";
332  case 8:
333  return "segmentattrib";
334  case 9:
335  return "outputinteriorgroup";
336  case 10:
337  return "interiorgroupname";
338 
339  }
340  return 0;
341  }
342 
343  ParmType getNestParmType(TempIndex fieldnum) const override
344  {
345  if (fieldnum.size() < 1)
346  return PARM_UNSUPPORTED;
347  switch (fieldnum[0])
348  {
349  case 0:
350  return PARM_STRING;
351  case 1:
352  return PARM_INTEGER;
353  case 2:
354  return PARM_STRING;
355  case 3:
356  return PARM_FLOAT;
357  case 4:
358  return PARM_INTEGER;
359  case 5:
360  return PARM_INTEGER;
361  case 6:
362  return PARM_INTEGER;
363  case 7:
364  return PARM_INTEGER;
365  case 8:
366  return PARM_STRING;
367  case 9:
368  return PARM_INTEGER;
369  case 10:
370  return PARM_STRING;
371 
372  }
373  return PARM_UNSUPPORTED;
374  }
375 
376  // Boiler plate to load individual types.
377  static void loadData(UT_IStream &is, int64 &v)
378  { is.bread(&v, 1); }
379  static void loadData(UT_IStream &is, bool &v)
380  { int64 iv; is.bread(&iv, 1); v = iv; }
381  static void loadData(UT_IStream &is, fpreal64 &v)
382  { is.bread<fpreal64>(&v, 1); }
383  static void loadData(UT_IStream &is, UT_Vector2D &v)
384  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
385  static void loadData(UT_IStream &is, UT_Vector3D &v)
386  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
387  is.bread<fpreal64>(&v.z(), 1); }
388  static void loadData(UT_IStream &is, UT_Vector4D &v)
389  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
390  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
391  static void loadData(UT_IStream &is, UT_Matrix2D &v)
392  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
393  static void loadData(UT_IStream &is, UT_Matrix3D &v)
394  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
395  static void loadData(UT_IStream &is, UT_Matrix4D &v)
396  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
397  static void loadData(UT_IStream &is, UT_Vector2I &v)
398  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
399  static void loadData(UT_IStream &is, UT_Vector3I &v)
400  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
401  is.bread<int64>(&v.z(), 1); }
402  static void loadData(UT_IStream &is, UT_Vector4I &v)
403  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
404  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
406  { is.bread(v); }
408  { UT_StringHolder rampdata;
409  loadData(is, rampdata);
410  if (rampdata.isstring())
411  {
412  v.reset(new UT_Ramp());
413  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
414  v->load(istr);
415  }
416  else v.reset();
417  }
420  loadData(is, data);
421  if (data.isstring())
422  {
423  // Find the data type.
424  const char *colon = UT_StringWrap(data).findChar(':');
425  if (colon)
426  {
427  int typelen = colon - data.buffer();
429  type.strncpy(data.buffer(), typelen);
430  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
431 
432  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
433  }
434  }
435  else v.reset();
436  }
437 
438  static void saveData(std::ostream &os, int64 v)
439  { UTwrite(os, &v); }
440  static void saveData(std::ostream &os, bool v)
441  { int64 iv = v; UTwrite(os, &iv); }
442  static void saveData(std::ostream &os, fpreal64 v)
443  { UTwrite<fpreal64>(os, &v); }
444  static void saveData(std::ostream &os, UT_Vector2D v)
445  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
446  static void saveData(std::ostream &os, UT_Vector3D v)
447  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
448  UTwrite<fpreal64>(os, &v.z()); }
449  static void saveData(std::ostream &os, UT_Vector4D v)
450  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
451  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
452  static void saveData(std::ostream &os, UT_Matrix2D v)
454  static void saveData(std::ostream &os, UT_Matrix3D v)
456  static void saveData(std::ostream &os, UT_Matrix4D v)
458  static void saveData(std::ostream &os, UT_StringHolder s)
459  { UT_StringWrap(s).saveBinary(os); }
460  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
462  UT_OStringStream ostr;
463  if (s) s->save(ostr);
464  result = ostr.str();
465  saveData(os, result);
466  }
467  static void saveData(std::ostream &os, PRM_DataItemHandle s)
469  UT_OStringStream ostr;
470  if (s)
471  {
472  ostr << s->getDataTypeToken();
473  ostr << ":";
474  s->saveBinary(ostr);
475  }
476  result = ostr.str();
477  saveData(os, result);
478  }
479 
480 
481  void save(std::ostream &os) const
482  {
483  int32 v = version();
484  UTwrite(os, &v);
485  saveData(os, myGroup);
486  saveData(os, myUsePieceAttrib);
487  saveData(os, myPieceAttrib);
488  saveData(os, myMaxConcavity);
489  saveData(os, myTreatAsSolid);
490  saveData(os, myMergeSegments);
491  saveData(os, myGeometryOutput);
492  saveData(os, myOutputSegmentAttrib);
493  saveData(os, mySegmentAttrib);
494  saveData(os, myOutputInteriorGroup);
495  saveData(os, myInteriorGroupName);
496 
497  }
498 
499  bool load(UT_IStream &is)
500  {
501  int32 v;
502  is.bread(&v, 1);
503  if (version() != v)
504  {
505  // Fail incompatible versions
506  return false;
507  }
508  loadData(is, myGroup);
509  loadData(is, myUsePieceAttrib);
510  loadData(is, myPieceAttrib);
511  loadData(is, myMaxConcavity);
512  loadData(is, myTreatAsSolid);
513  loadData(is, myMergeSegments);
514  loadData(is, myGeometryOutput);
515  loadData(is, myOutputSegmentAttrib);
516  loadData(is, mySegmentAttrib);
517  loadData(is, myOutputInteriorGroup);
518  loadData(is, myInteriorGroupName);
519 
520  return true;
521  }
522 
523  const UT_StringHolder & getGroup() const { return myGroup; }
524  void setGroup(const UT_StringHolder & val) { myGroup = val; }
526  {
527  SOP_Node *thissop = cookparms.getNode();
528  if (!thissop) return getGroup();
530  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
531  return result;
532  }
533  bool getUsePieceAttrib() const { return myUsePieceAttrib; }
534  void setUsePieceAttrib(bool val) { myUsePieceAttrib = val; }
535  bool opUsePieceAttrib(const SOP_NodeVerb::CookParms &cookparms) const
536  {
537  SOP_Node *thissop = cookparms.getNode();
538  if (!thissop) return getUsePieceAttrib();
539  bool result;
540  OP_Utils::evalOpParm(result, thissop, "usepieceattrib", cookparms.getCookTime(), 0);
541  return result;
542  }
543  const UT_StringHolder & getPieceAttrib() const { return myPieceAttrib; }
544  void setPieceAttrib(const UT_StringHolder & val) { myPieceAttrib = val; }
546  {
547  SOP_Node *thissop = cookparms.getNode();
548  if (!thissop) return getPieceAttrib();
550  OP_Utils::evalOpParm(result, thissop, "pieceattrib", cookparms.getCookTime(), 0);
551  return result;
552  }
553  fpreal64 getMaxConcavity() const { return myMaxConcavity; }
554  void setMaxConcavity(fpreal64 val) { myMaxConcavity = val; }
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getMaxConcavity();
560  OP_Utils::evalOpParm(result, thissop, "maxconcavity", cookparms.getCookTime(), 0);
561  return result;
562  }
563  bool getTreatAsSolid() const { return myTreatAsSolid; }
564  void setTreatAsSolid(bool val) { myTreatAsSolid = val; }
565  bool opTreatAsSolid(const SOP_NodeVerb::CookParms &cookparms) const
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getTreatAsSolid();
569  bool result;
570  OP_Utils::evalOpParm(result, thissop, "treatassolid", cookparms.getCookTime(), 0);
571  return result;
572  }
573  bool getMergeSegments() const { return myMergeSegments; }
574  void setMergeSegments(bool val) { myMergeSegments = val; }
575  bool opMergeSegments(const SOP_NodeVerb::CookParms &cookparms) const
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getMergeSegments();
579  bool result;
580  OP_Utils::evalOpParm(result, thissop, "mergesegments", cookparms.getCookTime(), 0);
581  return result;
582  }
583  GeometryOutput getGeometryOutput() const { return GeometryOutput(myGeometryOutput); }
584  void setGeometryOutput(GeometryOutput val) { myGeometryOutput = int64(val); }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getGeometryOutput();
589  int64 result;
590  OP_Utils::evalOpParm(result, thissop, "geometryoutput", cookparms.getCookTime(), 0);
591  return GeometryOutput(result);
592  }
593  bool getOutputSegmentAttrib() const { return myOutputSegmentAttrib; }
594  void setOutputSegmentAttrib(bool val) { myOutputSegmentAttrib = val; }
595  bool opOutputSegmentAttrib(const SOP_NodeVerb::CookParms &cookparms) const
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getOutputSegmentAttrib();
599  bool result;
600  OP_Utils::evalOpParm(result, thissop, "outputsegmentattrib", cookparms.getCookTime(), 0);
601  return result;
602  }
603  const UT_StringHolder & getSegmentAttrib() const { return mySegmentAttrib; }
604  void setSegmentAttrib(const UT_StringHolder & val) { mySegmentAttrib = val; }
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getSegmentAttrib();
610  OP_Utils::evalOpParm(result, thissop, "segmentattrib", cookparms.getCookTime(), 0);
611  return result;
612  }
613  bool getOutputInteriorGroup() const { return myOutputInteriorGroup; }
614  void setOutputInteriorGroup(bool val) { myOutputInteriorGroup = val; }
615  bool opOutputInteriorGroup(const SOP_NodeVerb::CookParms &cookparms) const
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getOutputInteriorGroup();
619  bool result;
620  OP_Utils::evalOpParm(result, thissop, "outputinteriorgroup", cookparms.getCookTime(), 0);
621  return result;
622  }
623  const UT_StringHolder & getInteriorGroupName() const { return myInteriorGroupName; }
624  void setInteriorGroupName(const UT_StringHolder & val) { myInteriorGroupName = val; }
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getInteriorGroupName();
630  OP_Utils::evalOpParm(result, thissop, "interiorgroupname", cookparms.getCookTime(), 0);
631  return result;
632  }
633 
634 private:
635  UT_StringHolder myGroup;
636  bool myUsePieceAttrib;
637  UT_StringHolder myPieceAttrib;
638  fpreal64 myMaxConcavity;
639  bool myTreatAsSolid;
640  bool myMergeSegments;
641  int64 myGeometryOutput;
642  bool myOutputSegmentAttrib;
643  UT_StringHolder mySegmentAttrib;
644  bool myOutputInteriorGroup;
645  UT_StringHolder myInteriorGroupName;
646 
647 };
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)
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
SYS_FORCE_INLINE UT_StringHolder getToken(GeometryOutput enum_value)
fpreal64 opMaxConcavity(const SOP_NodeVerb::CookParms &cookparms) const
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)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
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
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
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
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:1395
#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:97
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
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)