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