HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CollisionDetectCL.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_CollisionDetectCLEnums
24 {
25  enum class Coldetect
26  {
27  NONE = 0,
28  DISCRETE,
30  };
31 
33  getToken(Coldetect enum_value)
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case Coldetect::NONE: return "none"_sh;
38  case Coldetect::DISCRETE: return "discrete"_sh;
39  case Coldetect::CONTINUOUS: return "continuous"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44 }
45 
46 
48 {
49 public:
50  static int version() { return 1; }
51 
53  {
54  myGroup = "surface_triangles"_UTsh;
55  myTetGroup = "!surface_triangles"_UTsh;
56  myRadiusscale = 1;
57  myDotets = false;
58  myColdetect = 1;
59  myDopttri = true;
60  myDoedgeedge = true;
61  myCcdaccuracy = 0.9;
62  myIgnorepiece = false;
63  myHittypesattr = "hittypes"_UTsh;
64  myHitptsattr = "hitpts"_UTsh;
65  myHituvsattr = "hituvs"_UTsh;
66  myHitnmlsattr = "hitnmls"_UTsh;
67  myHitidxattr = "hitidx"_UTsh;
68  myHitvtxattr = "hitvtx"_UTsh;
69  myResetKey = -1;
70  myLeaveongpu = false;
71 
72  }
73 
74  explicit SOP_CollisionDetectCLParms(const SOP_CollisionDetectCLParms &) = default;
77  SOP_CollisionDetectCLParms &operator=(SOP_CollisionDetectCLParms &&) noexcept = default;
78 
80 
82  {
83  if (myGroup != src.myGroup) return false;
84  if (myTetGroup != src.myTetGroup) return false;
85  if (myRadiusscale != src.myRadiusscale) return false;
86  if (myDotets != src.myDotets) return false;
87  if (myColdetect != src.myColdetect) return false;
88  if (myDopttri != src.myDopttri) return false;
89  if (myDoedgeedge != src.myDoedgeedge) return false;
90  if (myCcdaccuracy != src.myCcdaccuracy) return false;
91  if (myIgnorepiece != src.myIgnorepiece) return false;
92  if (myHittypesattr != src.myHittypesattr) return false;
93  if (myHitptsattr != src.myHitptsattr) return false;
94  if (myHituvsattr != src.myHituvsattr) return false;
95  if (myHitnmlsattr != src.myHitnmlsattr) return false;
96  if (myHitidxattr != src.myHitidxattr) return false;
97  if (myHitvtxattr != src.myHitvtxattr) return false;
98  if (myResetKey != src.myResetKey) return false;
99  if (myLeaveongpu != src.myLeaveongpu) return false;
100 
101 
102  if (baseGetSignature() != src.baseGetSignature()) return false;
103 
104  return true;
105  }
107  {
108  return !operator==(src);
109  }
111 
112 
113 
114  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
115  {
116  myGroup = "surface_triangles"_UTsh;
117  if (true)
118  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
119  myTetGroup = "!surface_triangles"_UTsh;
120  if (true)
121  graph->evalOpParm(myTetGroup, nodeidx, "tetgroup", time, graph->isDirect()?nullptr:depnode);
122  myRadiusscale = 1;
123  if (true)
124  graph->evalOpParm(myRadiusscale, nodeidx, "radiusscale", time, graph->isDirect()?nullptr:depnode);
125  myDotets = false;
126  if (true)
127  graph->evalOpParm(myDotets, nodeidx, "dotets", time, graph->isDirect()?nullptr:depnode);
128  myColdetect = 1;
129  if (true)
130  graph->evalOpParm(myColdetect, nodeidx, "coldetect", time, graph->isDirect()?nullptr:depnode);
131  myDopttri = true;
132  if (true)
133  graph->evalOpParm(myDopttri, nodeidx, "dopttri", time, graph->isDirect()?nullptr:depnode);
134  myDoedgeedge = true;
135  if (true)
136  graph->evalOpParm(myDoedgeedge, nodeidx, "doedgeedge", time, graph->isDirect()?nullptr:depnode);
137  myCcdaccuracy = 0.9;
138  if (true && ( (true&&!(((int64(getColdetect())!=2)))) ) )
139  graph->evalOpParm(myCcdaccuracy, nodeidx, "ccdaccuracy", time, graph->isDirect()?nullptr:depnode);
140  myIgnorepiece = false;
141  if (true)
142  graph->evalOpParm(myIgnorepiece, nodeidx, "ignorepiece", time, graph->isDirect()?nullptr:depnode);
143  myHittypesattr = "hittypes"_UTsh;
144  if (true)
145  graph->evalOpParm(myHittypesattr, nodeidx, "hittypesattr", time, graph->isDirect()?nullptr:depnode);
146  myHitptsattr = "hitpts"_UTsh;
147  if (true)
148  graph->evalOpParm(myHitptsattr, nodeidx, "hitptsattr", time, graph->isDirect()?nullptr:depnode);
149  myHituvsattr = "hituvs"_UTsh;
150  if (true)
151  graph->evalOpParm(myHituvsattr, nodeidx, "hituvsattr", time, graph->isDirect()?nullptr:depnode);
152  myHitnmlsattr = "hitnmls"_UTsh;
153  if (true)
154  graph->evalOpParm(myHitnmlsattr, nodeidx, "hitnmlsattr", time, graph->isDirect()?nullptr:depnode);
155  myHitidxattr = "hitidx"_UTsh;
156  if (true)
157  graph->evalOpParm(myHitidxattr, nodeidx, "hitidxattr", time, graph->isDirect()?nullptr:depnode);
158  myHitvtxattr = "hitvtx"_UTsh;
159  if (true)
160  graph->evalOpParm(myHitvtxattr, nodeidx, "hitvtxattr", time, graph->isDirect()?nullptr:depnode);
161  myResetKey = -1;
162  if (true)
163  graph->evalOpParm(myResetKey, nodeidx, "resetkey", time, graph->isDirect()?nullptr:depnode);
164  myLeaveongpu = false;
165  if (true)
166  graph->evalOpParm(myLeaveongpu, nodeidx, "leaveongpu", time, graph->isDirect()?nullptr:depnode);
167 
168  }
169 
170 
171  void loadFromOpSubclass(const LoadParms &loadparms) override
172  {
173  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
174  }
175 
176 
177  void copyFrom(const OP_NodeParms *src) override
178  {
179  *this = *((const SOP_CollisionDetectCLParms *)src);
180  }
181 
182  template <typename T>
183  void
184  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
185  {
186  if (idx.size() < 1)
187  return;
188  UT_ASSERT(idx.size() == instance.size()+1);
189  if (idx.size() != instance.size()+1)
190  return;
191  switch (idx[0])
192  {
193  case 0:
194  coerceValue(value, myGroup);
195  break;
196  case 1:
197  coerceValue(value, myTetGroup);
198  break;
199  case 2:
200  coerceValue(value, myRadiusscale);
201  break;
202  case 3:
203  coerceValue(value, myDotets);
204  break;
205  case 4:
206  coerceValue(value, myColdetect);
207  break;
208  case 5:
209  coerceValue(value, myDopttri);
210  break;
211  case 6:
212  coerceValue(value, myDoedgeedge);
213  break;
214  case 7:
215  coerceValue(value, myCcdaccuracy);
216  break;
217  case 8:
218  coerceValue(value, myIgnorepiece);
219  break;
220  case 9:
221  coerceValue(value, myHittypesattr);
222  break;
223  case 10:
224  coerceValue(value, myHitptsattr);
225  break;
226  case 11:
227  coerceValue(value, myHituvsattr);
228  break;
229  case 12:
230  coerceValue(value, myHitnmlsattr);
231  break;
232  case 13:
233  coerceValue(value, myHitidxattr);
234  break;
235  case 14:
236  coerceValue(value, myHitvtxattr);
237  break;
238  case 15:
239  coerceValue(value, myResetKey);
240  break;
241  case 16:
242  coerceValue(value, myLeaveongpu);
243  break;
244 
245  }
246  }
247 
248  bool isParmColorRamp(exint idx) const override
249  {
250  switch (idx)
251  {
252 
253  }
254  return false;
255  }
256 
257  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
258  { doGetParmValue(idx, instance, value); }
259  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
260  { doGetParmValue(idx, instance, value); }
261  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
262  { doGetParmValue(idx, instance, value); }
263  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
264  { doGetParmValue(idx, instance, value); }
265  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
266  { doGetParmValue(idx, instance, value); }
267  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
270  { doGetParmValue(idx, instance, value); }
271  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
278  { doGetParmValue(idx, instance, value); }
279 
280  template <typename T>
281  void
282  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
283  {
284  if (idx.size() < 1)
285  return;
286  UT_ASSERT(idx.size() == instance.size()+1);
287  if (idx.size() != instance.size()+1)
288  return;
289  switch (idx[0])
290  {
291  case 0:
292  coerceValue(myGroup, ( ( value ) ));
293  break;
294  case 1:
295  coerceValue(myTetGroup, ( ( value ) ));
296  break;
297  case 2:
298  coerceValue(myRadiusscale, ( ( value ) ));
299  break;
300  case 3:
301  coerceValue(myDotets, ( ( value ) ));
302  break;
303  case 4:
304  coerceValue(myColdetect, clampMinValue(0, clampMaxValue(2, value ) ));
305  break;
306  case 5:
307  coerceValue(myDopttri, ( ( value ) ));
308  break;
309  case 6:
310  coerceValue(myDoedgeedge, ( ( value ) ));
311  break;
312  case 7:
313  coerceValue(myCcdaccuracy, ( ( value ) ));
314  break;
315  case 8:
316  coerceValue(myIgnorepiece, ( ( value ) ));
317  break;
318  case 9:
319  coerceValue(myHittypesattr, ( ( value ) ));
320  break;
321  case 10:
322  coerceValue(myHitptsattr, ( ( value ) ));
323  break;
324  case 11:
325  coerceValue(myHituvsattr, ( ( value ) ));
326  break;
327  case 12:
328  coerceValue(myHitnmlsattr, ( ( value ) ));
329  break;
330  case 13:
331  coerceValue(myHitidxattr, ( ( value ) ));
332  break;
333  case 14:
334  coerceValue(myHitvtxattr, ( ( value ) ));
335  break;
336  case 15:
337  coerceValue(myResetKey, ( ( value ) ));
338  break;
339  case 16:
340  coerceValue(myLeaveongpu, ( ( value ) ));
341  break;
342 
343  }
344  }
345 
346  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
355  { doSetParmValue(idx, instance, value); }
356  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
359  { doSetParmValue(idx, instance, value); }
360  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
361  { doSetParmValue(idx, instance, value); }
362  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
363  { doSetParmValue(idx, instance, value); }
364  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
365  { doSetParmValue(idx, instance, value); }
366  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
367  { doSetParmValue(idx, instance, value); }
368 
369  exint getNestNumParms(TempIndex idx) const override
370  {
371  if (idx.size() == 0)
372  return 17;
373  switch (idx[0])
374  {
375 
376  }
377  // Invalid
378  return 0;
379  }
380 
381  const char *getNestParmName(TempIndex fieldnum) const override
382  {
383  if (fieldnum.size() < 1)
384  return 0;
385  switch (fieldnum[0])
386  {
387  case 0:
388  return "group";
389  case 1:
390  return "tetgroup";
391  case 2:
392  return "radiusscale";
393  case 3:
394  return "dotets";
395  case 4:
396  return "coldetect";
397  case 5:
398  return "dopttri";
399  case 6:
400  return "doedgeedge";
401  case 7:
402  return "ccdaccuracy";
403  case 8:
404  return "ignorepiece";
405  case 9:
406  return "hittypesattr";
407  case 10:
408  return "hitptsattr";
409  case 11:
410  return "hituvsattr";
411  case 12:
412  return "hitnmlsattr";
413  case 13:
414  return "hitidxattr";
415  case 14:
416  return "hitvtxattr";
417  case 15:
418  return "resetkey";
419  case 16:
420  return "leaveongpu";
421 
422  }
423  return 0;
424  }
425 
426  ParmType getNestParmType(TempIndex fieldnum) const override
427  {
428  if (fieldnum.size() < 1)
429  return PARM_UNSUPPORTED;
430  switch (fieldnum[0])
431  {
432  case 0:
433  return PARM_STRING;
434  case 1:
435  return PARM_STRING;
436  case 2:
437  return PARM_FLOAT;
438  case 3:
439  return PARM_INTEGER;
440  case 4:
441  return PARM_INTEGER;
442  case 5:
443  return PARM_INTEGER;
444  case 6:
445  return PARM_INTEGER;
446  case 7:
447  return PARM_FLOAT;
448  case 8:
449  return PARM_INTEGER;
450  case 9:
451  return PARM_STRING;
452  case 10:
453  return PARM_STRING;
454  case 11:
455  return PARM_STRING;
456  case 12:
457  return PARM_STRING;
458  case 13:
459  return PARM_STRING;
460  case 14:
461  return PARM_STRING;
462  case 15:
463  return PARM_FLOAT;
464  case 16:
465  return PARM_INTEGER;
466 
467  }
468  return PARM_UNSUPPORTED;
469  }
470 
471  // Boiler plate to load individual types.
472  static void loadData(UT_IStream &is, int64 &v)
473  { is.bread(&v, 1); }
474  static void loadData(UT_IStream &is, bool &v)
475  { int64 iv; is.bread(&iv, 1); v = iv; }
476  static void loadData(UT_IStream &is, fpreal64 &v)
477  { is.bread<fpreal64>(&v, 1); }
478  static void loadData(UT_IStream &is, UT_Vector2D &v)
479  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
480  static void loadData(UT_IStream &is, UT_Vector3D &v)
481  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
482  is.bread<fpreal64>(&v.z(), 1); }
483  static void loadData(UT_IStream &is, UT_Vector4D &v)
484  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
485  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
486  static void loadData(UT_IStream &is, UT_Matrix2D &v)
487  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
488  static void loadData(UT_IStream &is, UT_Matrix3D &v)
489  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
490  static void loadData(UT_IStream &is, UT_Matrix4D &v)
491  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
492  static void loadData(UT_IStream &is, UT_Vector2I &v)
493  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
494  static void loadData(UT_IStream &is, UT_Vector3I &v)
495  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
496  is.bread<int64>(&v.z(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector4I &v)
498  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
499  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
501  { is.bread(v); }
503  { UT_StringHolder rampdata;
504  loadData(is, rampdata);
505  if (rampdata.isstring())
506  {
507  v.reset(new UT_Ramp());
508  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
509  v->load(istr);
510  }
511  else v.reset();
512  }
515  loadData(is, data);
516  if (data.isstring())
517  {
518  // Find the data type.
519  const char *colon = UT_StringWrap(data).findChar(':');
520  if (colon)
521  {
522  int typelen = colon - data.buffer();
524  type.strncpy(data.buffer(), typelen);
525  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
526 
527  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
528  }
529  }
530  else v.reset();
531  }
532 
533  static void saveData(std::ostream &os, int64 v)
534  { UTwrite(os, &v); }
535  static void saveData(std::ostream &os, bool v)
536  { int64 iv = v; UTwrite(os, &iv); }
537  static void saveData(std::ostream &os, fpreal64 v)
538  { UTwrite<fpreal64>(os, &v); }
539  static void saveData(std::ostream &os, UT_Vector2D v)
540  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
541  static void saveData(std::ostream &os, UT_Vector3D v)
542  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
543  UTwrite<fpreal64>(os, &v.z()); }
544  static void saveData(std::ostream &os, UT_Vector4D v)
545  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
546  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
547  static void saveData(std::ostream &os, UT_Matrix2D v)
549  static void saveData(std::ostream &os, UT_Matrix3D v)
551  static void saveData(std::ostream &os, UT_Matrix4D v)
553  static void saveData(std::ostream &os, UT_StringHolder s)
554  { UT_StringWrap(s).saveBinary(os); }
555  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
557  UT_OStringStream ostr;
558  if (s) s->save(ostr);
559  result = ostr.str();
560  saveData(os, result);
561  }
562  static void saveData(std::ostream &os, PRM_DataItemHandle s)
564  UT_OStringStream ostr;
565  if (s)
566  {
567  ostr << s->getDataTypeToken();
568  ostr << ":";
569  s->saveBinary(ostr);
570  }
571  result = ostr.str();
572  saveData(os, result);
573  }
574 
575 
576  void save(std::ostream &os) const
577  {
578  int32 v = version();
579  UTwrite(os, &v);
580  saveData(os, myGroup);
581  saveData(os, myTetGroup);
582  saveData(os, myRadiusscale);
583  saveData(os, myDotets);
584  saveData(os, myColdetect);
585  saveData(os, myDopttri);
586  saveData(os, myDoedgeedge);
587  saveData(os, myCcdaccuracy);
588  saveData(os, myIgnorepiece);
589  saveData(os, myHittypesattr);
590  saveData(os, myHitptsattr);
591  saveData(os, myHituvsattr);
592  saveData(os, myHitnmlsattr);
593  saveData(os, myHitidxattr);
594  saveData(os, myHitvtxattr);
595  saveData(os, myResetKey);
596  saveData(os, myLeaveongpu);
597 
598  }
599 
600  bool load(UT_IStream &is)
601  {
602  int32 v;
603  is.bread(&v, 1);
604  if (version() != v)
605  {
606  // Fail incompatible versions
607  return false;
608  }
609  loadData(is, myGroup);
610  loadData(is, myTetGroup);
611  loadData(is, myRadiusscale);
612  loadData(is, myDotets);
613  loadData(is, myColdetect);
614  loadData(is, myDopttri);
615  loadData(is, myDoedgeedge);
616  loadData(is, myCcdaccuracy);
617  loadData(is, myIgnorepiece);
618  loadData(is, myHittypesattr);
619  loadData(is, myHitptsattr);
620  loadData(is, myHituvsattr);
621  loadData(is, myHitnmlsattr);
622  loadData(is, myHitidxattr);
623  loadData(is, myHitvtxattr);
624  loadData(is, myResetKey);
625  loadData(is, myLeaveongpu);
626 
627  return true;
628  }
629 
630  const UT_StringHolder & getGroup() const { return myGroup; }
631  void setGroup(const UT_StringHolder & val) { myGroup = val; }
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getGroup();
637  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
638  return result;
639  }
640  const UT_StringHolder & getTetGroup() const { return myTetGroup; }
641  void setTetGroup(const UT_StringHolder & val) { myTetGroup = val; }
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getTetGroup();
647  OP_Utils::evalOpParm(result, thissop, "tetgroup", cookparms.getCookTime(), 0);
648  return result;
649  }
650  fpreal64 getRadiusscale() const { return myRadiusscale; }
651  void setRadiusscale(fpreal64 val) { myRadiusscale = val; }
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getRadiusscale();
657  OP_Utils::evalOpParm(result, thissop, "radiusscale", cookparms.getCookTime(), 0);
658  return result;
659  }
660  bool getDotets() const { return myDotets; }
661  void setDotets(bool val) { myDotets = val; }
662  bool opDotets(const SOP_NodeVerb::CookParms &cookparms) const
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getDotets();
666  bool result;
667  OP_Utils::evalOpParm(result, thissop, "dotets", cookparms.getCookTime(), 0);
668  return result;
669  }
670  Coldetect getColdetect() const { return Coldetect(myColdetect); }
671  void setColdetect(Coldetect val) { myColdetect = int64(val); }
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getColdetect();
676  int64 result;
677  OP_Utils::evalOpParm(result, thissop, "coldetect", cookparms.getCookTime(), 0);
678  return Coldetect(result);
679  }
680  bool getDopttri() const { return myDopttri; }
681  void setDopttri(bool val) { myDopttri = val; }
682  bool opDopttri(const SOP_NodeVerb::CookParms &cookparms) const
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getDopttri();
686  bool result;
687  OP_Utils::evalOpParm(result, thissop, "dopttri", cookparms.getCookTime(), 0);
688  return result;
689  }
690  bool getDoedgeedge() const { return myDoedgeedge; }
691  void setDoedgeedge(bool val) { myDoedgeedge = val; }
692  bool opDoedgeedge(const SOP_NodeVerb::CookParms &cookparms) const
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getDoedgeedge();
696  bool result;
697  OP_Utils::evalOpParm(result, thissop, "doedgeedge", cookparms.getCookTime(), 0);
698  return result;
699  }
700  fpreal64 getCcdaccuracy() const { return myCcdaccuracy; }
701  void setCcdaccuracy(fpreal64 val) { myCcdaccuracy = val; }
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return getCcdaccuracy();
707  OP_Utils::evalOpParm(result, thissop, "ccdaccuracy", cookparms.getCookTime(), 0);
708  return result;
709  }
710  bool getIgnorepiece() const { return myIgnorepiece; }
711  void setIgnorepiece(bool val) { myIgnorepiece = val; }
712  bool opIgnorepiece(const SOP_NodeVerb::CookParms &cookparms) const
713  {
714  SOP_Node *thissop = cookparms.getNode();
715  if (!thissop) return getIgnorepiece();
716  bool result;
717  OP_Utils::evalOpParm(result, thissop, "ignorepiece", cookparms.getCookTime(), 0);
718  return result;
719  }
720  const UT_StringHolder & getHittypesattr() const { return myHittypesattr; }
721  void setHittypesattr(const UT_StringHolder & val) { myHittypesattr = val; }
723  {
724  SOP_Node *thissop = cookparms.getNode();
725  if (!thissop) return getHittypesattr();
727  OP_Utils::evalOpParm(result, thissop, "hittypesattr", cookparms.getCookTime(), 0);
728  return result;
729  }
730  const UT_StringHolder & getHitptsattr() const { return myHitptsattr; }
731  void setHitptsattr(const UT_StringHolder & val) { myHitptsattr = val; }
733  {
734  SOP_Node *thissop = cookparms.getNode();
735  if (!thissop) return getHitptsattr();
737  OP_Utils::evalOpParm(result, thissop, "hitptsattr", cookparms.getCookTime(), 0);
738  return result;
739  }
740  const UT_StringHolder & getHituvsattr() const { return myHituvsattr; }
741  void setHituvsattr(const UT_StringHolder & val) { myHituvsattr = val; }
743  {
744  SOP_Node *thissop = cookparms.getNode();
745  if (!thissop) return getHituvsattr();
747  OP_Utils::evalOpParm(result, thissop, "hituvsattr", cookparms.getCookTime(), 0);
748  return result;
749  }
750  const UT_StringHolder & getHitnmlsattr() const { return myHitnmlsattr; }
751  void setHitnmlsattr(const UT_StringHolder & val) { myHitnmlsattr = val; }
753  {
754  SOP_Node *thissop = cookparms.getNode();
755  if (!thissop) return getHitnmlsattr();
757  OP_Utils::evalOpParm(result, thissop, "hitnmlsattr", cookparms.getCookTime(), 0);
758  return result;
759  }
760  const UT_StringHolder & getHitidxattr() const { return myHitidxattr; }
761  void setHitidxattr(const UT_StringHolder & val) { myHitidxattr = val; }
763  {
764  SOP_Node *thissop = cookparms.getNode();
765  if (!thissop) return getHitidxattr();
767  OP_Utils::evalOpParm(result, thissop, "hitidxattr", cookparms.getCookTime(), 0);
768  return result;
769  }
770  const UT_StringHolder & getHitvtxattr() const { return myHitvtxattr; }
771  void setHitvtxattr(const UT_StringHolder & val) { myHitvtxattr = val; }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return getHitvtxattr();
777  OP_Utils::evalOpParm(result, thissop, "hitvtxattr", cookparms.getCookTime(), 0);
778  return result;
779  }
780  fpreal64 getResetKey() const { return myResetKey; }
781  void setResetKey(fpreal64 val) { myResetKey = val; }
783  {
784  SOP_Node *thissop = cookparms.getNode();
785  if (!thissop) return getResetKey();
787  OP_Utils::evalOpParm(result, thissop, "resetkey", cookparms.getCookTime(), 0);
788  return result;
789  }
790  bool getLeaveongpu() const { return myLeaveongpu; }
791  void setLeaveongpu(bool val) { myLeaveongpu = val; }
792  bool opLeaveongpu(const SOP_NodeVerb::CookParms &cookparms) const
793  {
794  SOP_Node *thissop = cookparms.getNode();
795  if (!thissop) return getLeaveongpu();
796  bool result;
797  OP_Utils::evalOpParm(result, thissop, "leaveongpu", cookparms.getCookTime(), 0);
798  return result;
799  }
800 
801 private:
802  UT_StringHolder myGroup;
803  UT_StringHolder myTetGroup;
804  fpreal64 myRadiusscale;
805  bool myDotets;
806  int64 myColdetect;
807  bool myDopttri;
808  bool myDoedgeedge;
809  fpreal64 myCcdaccuracy;
810  bool myIgnorepiece;
811  UT_StringHolder myHittypesattr;
812  UT_StringHolder myHitptsattr;
813  UT_StringHolder myHituvsattr;
814  UT_StringHolder myHitnmlsattr;
815  UT_StringHolder myHitidxattr;
816  UT_StringHolder myHitvtxattr;
817  fpreal64 myResetKey;
818  bool myLeaveongpu;
819 
820 };
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
type
Definition: core.h:556
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void setHitidxattr(const UT_StringHolder &val)
UT_StringHolder opHitptsattr(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opHituvsattr(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_CollisionDetectCLParms &src) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setHitvtxattr(const UT_StringHolder &val)
const UT_StringHolder & getHituvsattr() const
void setGroup(const UT_StringHolder &val)
bool operator!=(const SOP_CollisionDetectCLParms &src) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, UT_Vector2I &v)
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
fpreal64 opResetKey(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static void loadData(UT_IStream &is, fpreal64 &v)
UT_StringHolder opHitvtxattr(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
const UT_StringHolder & getHitvtxattr() const
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
const UT_StringHolder & getHitnmlsattr() const
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
**But if you need a result
Definition: thread.h:622
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
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 copyFrom(const OP_NodeParms *src) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opLeaveongpu(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getHitptsattr() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_StringHolder opTetGroup(const SOP_NodeVerb::CookParms &cookparms) const
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
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, int64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
const char * getNestParmName(TempIndex fieldnum) const override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opHitnmlsattr(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Coldetect enum_value)
long long int64
Definition: SYS_Types.h:116
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool opDopttri(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getHitidxattr() const
bool opIgnorepiece(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
void save(std::ostream &os) const
bool isParmColorRamp(exint idx) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_StringHolder opHittypesattr(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
bool opDotets(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
exint getNestNumParms(TempIndex idx) const override
GT_API const UT_StringHolder version
void setTetGroup(const UT_StringHolder &val)
const UT_StringHolder & getHittypesattr() const
void setHittypesattr(const UT_StringHolder &val)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opDoedgeedge(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:278
static void loadData(UT_IStream &is, UT_Matrix4D &v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
const UT_StringHolder & getTetGroup() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
fpreal64 opRadiusscale(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
fpreal64 opCcdaccuracy(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GLboolean r
Definition: glcorearb.h:1222
void setHitnmlsattr(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Coldetect opColdetect(const SOP_NodeVerb::CookParms &cookparms) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void setHitptsattr(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
UT_StringHolder opHitidxattr(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE bool isstring() const
void setHituvsattr(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663