HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyPatch.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_PolyPatchEnums
24 {
25  enum class Basis
26  {
27  CARDINAL = 0,
28  BSPLINE
29  };
30 
32  getToken(Basis enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Basis::CARDINAL: return "cardinal"_sh;
37  case Basis::BSPLINE: return "bspline"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class Connecttype
43  {
44  ROWS = 0,
45  COLS,
46  ROWCOL,
47  TRIANGLES,
48  QUADS,
52  };
53 
55  getToken(Connecttype enum_value)
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case Connecttype::ROWS: return "rows"_sh;
60  case Connecttype::COLS: return "cols"_sh;
61  case Connecttype::ROWCOL: return "rowcol"_sh;
62  case Connecttype::TRIANGLES: return "triangles"_sh;
63  case Connecttype::QUADS: return "quads"_sh;
64  case Connecttype::ALTTRIANGLES: return "alttriangles"_sh;
65  case Connecttype::REVTRIANGLES: return "revtriangles"_sh;
66  case Connecttype::INHERITCONNECT: return "inheritconnect"_sh;
67  default: UT_ASSERT(false); return ""_sh;
68  }
69  }
70 
71  enum class Closeu
72  {
73  NONEWU = 0,
74  WU,
75  IFPRIMWU
76  };
77 
79  getToken(Closeu enum_value)
80  {
81  using namespace UT::Literal;
82  switch (enum_value) {
83  case Closeu::NONEWU: return "nonewu"_sh;
84  case Closeu::WU: return "wu"_sh;
85  case Closeu::IFPRIMWU: return "ifprimwu"_sh;
86  default: UT_ASSERT(false); return ""_sh;
87  }
88  }
89 
90  enum class Closev
91  {
92  NONEWV = 0,
93  WV,
94  IFPRIMWV
95  };
96 
98  getToken(Closev enum_value)
99  {
100  using namespace UT::Literal;
101  switch (enum_value) {
102  case Closev::NONEWV: return "nonewv"_sh;
103  case Closev::WV: return "wv"_sh;
104  case Closev::IFPRIMWV: return "ifprimwv"_sh;
105  default: UT_ASSERT(false); return ""_sh;
106  }
107  }
108 
109  enum class Firstuclamp
110  {
111  FIRSTUCLAMPOFF = 0,
114  };
115 
117  getToken(Firstuclamp enum_value)
118  {
119  using namespace UT::Literal;
120  switch (enum_value) {
121  case Firstuclamp::FIRSTUCLAMPOFF: return "firstuclampoff"_sh;
122  case Firstuclamp::FIRSTUCLAMPON: return "firstuclampon"_sh;
123  case Firstuclamp::FIRSTUCLAMPIFPRIM: return "firstuclampifprim"_sh;
124  default: UT_ASSERT(false); return ""_sh;
125  }
126  }
127 
128  enum class Lastuclamp
129  {
130  LASTUCLAMPOFF = 0,
131  LASTUCLAMPON,
133  };
134 
136  getToken(Lastuclamp enum_value)
137  {
138  using namespace UT::Literal;
139  switch (enum_value) {
140  case Lastuclamp::LASTUCLAMPOFF: return "lastuclampoff"_sh;
141  case Lastuclamp::LASTUCLAMPON: return "lastuclampon"_sh;
142  case Lastuclamp::LASTUCLAMPIFPRIM: return "lastuclampifprim"_sh;
143  default: UT_ASSERT(false); return ""_sh;
144  }
145  }
146 
147  enum class Firstvclamp
148  {
149  FIRSTVCLAMPOFF = 0,
152  };
153 
155  getToken(Firstvclamp enum_value)
156  {
157  using namespace UT::Literal;
158  switch (enum_value) {
159  case Firstvclamp::FIRSTVCLAMPOFF: return "firstvclampoff"_sh;
160  case Firstvclamp::FIRSTVCLAMPON: return "firstvclampon"_sh;
161  case Firstvclamp::FIRSTVCLAMPIFPRIM: return "firstvclampifprim"_sh;
162  default: UT_ASSERT(false); return ""_sh;
163  }
164  }
165 
166  enum class Lastvclamp
167  {
168  LASTVCLAMPOFF = 0,
169  LASTVCLAMPON,
171  };
172 
174  getToken(Lastvclamp enum_value)
175  {
176  using namespace UT::Literal;
177  switch (enum_value) {
178  case Lastvclamp::LASTVCLAMPOFF: return "lastvclampoff"_sh;
179  case Lastvclamp::LASTVCLAMPON: return "lastvclampon"_sh;
180  case Lastvclamp::LASTVCLAMPIFPRIM: return "lastvclampifprim"_sh;
181  default: UT_ASSERT(false); return ""_sh;
182  }
183  }
184 
185 }
186 
187 
189 {
190 public:
191  static int version() { return 1; }
192 
194  {
195  myGroup = ""_UTsh;
196  myBasis = 0;
197  myConnecttype = 4;
198  myCloseu = 2;
199  myClosev = 2;
200  myFirstuclamp = 2;
201  myLastuclamp = 2;
202  myFirstvclamp = 2;
203  myLastvclamp = 2;
204  myDivisions = 0;
205  myPolys = false;
206 
207  }
208 
209  explicit SOP_PolyPatchParms(const SOP_PolyPatchParms &) = default;
210  SOP_PolyPatchParms &operator=(const SOP_PolyPatchParms &) = default;
211  SOP_PolyPatchParms(SOP_PolyPatchParms &&) noexcept = default;
212  SOP_PolyPatchParms &operator=(SOP_PolyPatchParms &&) noexcept = default;
213 
214  ~SOP_PolyPatchParms() override {}
215 
216  bool operator==(const SOP_PolyPatchParms &src) const
217  {
218  if (myGroup != src.myGroup) return false;
219  if (myBasis != src.myBasis) return false;
220  if (myConnecttype != src.myConnecttype) return false;
221  if (myCloseu != src.myCloseu) return false;
222  if (myClosev != src.myClosev) return false;
223  if (myFirstuclamp != src.myFirstuclamp) return false;
224  if (myLastuclamp != src.myLastuclamp) return false;
225  if (myFirstvclamp != src.myFirstvclamp) return false;
226  if (myLastvclamp != src.myLastvclamp) return false;
227  if (myDivisions != src.myDivisions) return false;
228  if (myPolys != src.myPolys) return false;
229 
230  return true;
231  }
232  bool operator!=(const SOP_PolyPatchParms &src) const
233  {
234  return !operator==(src);
235  }
244 
245 
246 
247  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
248  {
249  myGroup = ""_UTsh;
250  if (true)
251  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
252  myBasis = 0;
253  if (true)
254  graph->evalOpParm(myBasis, nodeidx, "basis", time, 0);
255  myConnecttype = 4;
256  if (true)
257  graph->evalOpParm(myConnecttype, nodeidx, "connecttype", time, 0);
258  myCloseu = 2;
259  if (true)
260  graph->evalOpParm(myCloseu, nodeidx, "closeu", time, 0);
261  myClosev = 2;
262  if (true)
263  graph->evalOpParm(myClosev, nodeidx, "closev", time, 0);
264  myFirstuclamp = 2;
265  if (true)
266  graph->evalOpParm(myFirstuclamp, nodeidx, "firstuclamp", time, 0);
267  myLastuclamp = 2;
268  if (true)
269  graph->evalOpParm(myLastuclamp, nodeidx, "lastuclamp", time, 0);
270  myFirstvclamp = 2;
271  if (true)
272  graph->evalOpParm(myFirstvclamp, nodeidx, "firstvclamp", time, 0);
273  myLastvclamp = 2;
274  if (true)
275  graph->evalOpParm(myLastvclamp, nodeidx, "lastvclamp", time, 0);
276  myDivisions = 0;
277  if (true)
278  graph->evalOpParm(myDivisions, nodeidx, "divisions", time, 0);
279  myPolys = false;
280  if (true)
281  graph->evalOpParm(myPolys, nodeidx, "polys", time, 0);
282 
283  }
284 
285 
286  void loadFromOpSubclass(const LoadParms &loadparms) override
287  {
288  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
289  }
290 
291 
292  void copyFrom(const OP_NodeParms *src) override
293  {
294  *this = *((const SOP_PolyPatchParms *)src);
295  }
296 
297  template <typename T>
298  void
299  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
300  {
301  if (idx.size() < 1)
302  return;
303  UT_ASSERT(idx.size() == instance.size()+1);
304  if (idx.size() != instance.size()+1)
305  return;
306  switch (idx[0])
307  {
308  case 0:
309  coerceValue(value, myGroup);
310  break;
311  case 1:
312  coerceValue(value, myBasis);
313  break;
314  case 2:
315  coerceValue(value, myConnecttype);
316  break;
317  case 3:
318  coerceValue(value, myCloseu);
319  break;
320  case 4:
321  coerceValue(value, myClosev);
322  break;
323  case 5:
324  coerceValue(value, myFirstuclamp);
325  break;
326  case 6:
327  coerceValue(value, myLastuclamp);
328  break;
329  case 7:
330  coerceValue(value, myFirstvclamp);
331  break;
332  case 8:
333  coerceValue(value, myLastvclamp);
334  break;
335  case 9:
336  coerceValue(value, myDivisions);
337  break;
338  case 10:
339  coerceValue(value, myPolys);
340  break;
341 
342  }
343  }
344 
345  bool isParmColorRamp(exint idx) const override
346  {
347  switch (idx)
348  {
349 
350  }
351  return false;
352  }
353 
354  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
355  { doGetParmValue(idx, instance, value); }
356  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
357  { doGetParmValue(idx, instance, value); }
358  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
359  { doGetParmValue(idx, instance, value); }
360  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
361  { doGetParmValue(idx, instance, value); }
362  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
363  { doGetParmValue(idx, instance, value); }
364  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
365  { doGetParmValue(idx, instance, value); }
366  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
367  { doGetParmValue(idx, instance, value); }
368  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
369  { doGetParmValue(idx, instance, value); }
370  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
371  { doGetParmValue(idx, instance, value); }
372  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
373  { doGetParmValue(idx, instance, value); }
374  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
375  { doGetParmValue(idx, instance, value); }
376 
377  template <typename T>
378  void
379  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
380  {
381  if (idx.size() < 1)
382  return;
383  UT_ASSERT(idx.size() == instance.size()+1);
384  if (idx.size() != instance.size()+1)
385  return;
386  switch (idx[0])
387  {
388  case 0:
389  coerceValue(myGroup, ( ( value ) ));
390  break;
391  case 1:
392  coerceValue(myBasis, clampMinValue(0, clampMaxValue(1, value ) ));
393  break;
394  case 2:
395  coerceValue(myConnecttype, clampMinValue(0, clampMaxValue(7, value ) ));
396  break;
397  case 3:
398  coerceValue(myCloseu, clampMinValue(0, clampMaxValue(2, value ) ));
399  break;
400  case 4:
401  coerceValue(myClosev, clampMinValue(0, clampMaxValue(2, value ) ));
402  break;
403  case 5:
404  coerceValue(myFirstuclamp, clampMinValue(0, clampMaxValue(2, value ) ));
405  break;
406  case 6:
407  coerceValue(myLastuclamp, clampMinValue(0, clampMaxValue(2, value ) ));
408  break;
409  case 7:
410  coerceValue(myFirstvclamp, clampMinValue(0, clampMaxValue(2, value ) ));
411  break;
412  case 8:
413  coerceValue(myLastvclamp, clampMinValue(0, clampMaxValue(2, value ) ));
414  break;
415  case 9:
416  coerceValue(myDivisions, clampMinValue(1, ( value ) ));
417  break;
418  case 10:
419  coerceValue(myPolys, ( ( value ) ));
420  break;
421 
422  }
423  }
424 
425  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
426  { doSetParmValue(idx, instance, value); }
427  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
428  { doSetParmValue(idx, instance, value); }
429  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
430  { doSetParmValue(idx, instance, value); }
431  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
432  { doSetParmValue(idx, instance, value); }
433  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
434  { doSetParmValue(idx, instance, value); }
435  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
436  { doSetParmValue(idx, instance, value); }
437  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
438  { doSetParmValue(idx, instance, value); }
439  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
440  { doSetParmValue(idx, instance, value); }
441  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
442  { doSetParmValue(idx, instance, value); }
443  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
444  { doSetParmValue(idx, instance, value); }
445  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
446  { doSetParmValue(idx, instance, value); }
447 
448  exint getNestNumParms(TempIndex idx) const override
449  {
450  if (idx.size() == 0)
451  return 11;
452  switch (idx[0])
453  {
454 
455  }
456  // Invalid
457  return 0;
458  }
459 
460  const char *getNestParmName(TempIndex fieldnum) const override
461  {
462  if (fieldnum.size() < 1)
463  return 0;
464  switch (fieldnum[0])
465  {
466  case 0:
467  return "group";
468  case 1:
469  return "basis";
470  case 2:
471  return "connecttype";
472  case 3:
473  return "closeu";
474  case 4:
475  return "closev";
476  case 5:
477  return "firstuclamp";
478  case 6:
479  return "lastuclamp";
480  case 7:
481  return "firstvclamp";
482  case 8:
483  return "lastvclamp";
484  case 9:
485  return "divisions";
486  case 10:
487  return "polys";
488 
489  }
490  return 0;
491  }
492 
493  ParmType getNestParmType(TempIndex fieldnum) const override
494  {
495  if (fieldnum.size() < 1)
496  return PARM_UNSUPPORTED;
497  switch (fieldnum[0])
498  {
499  case 0:
500  return PARM_STRING;
501  case 1:
502  return PARM_INTEGER;
503  case 2:
504  return PARM_INTEGER;
505  case 3:
506  return PARM_INTEGER;
507  case 4:
508  return PARM_INTEGER;
509  case 5:
510  return PARM_INTEGER;
511  case 6:
512  return PARM_INTEGER;
513  case 7:
514  return PARM_INTEGER;
515  case 8:
516  return PARM_INTEGER;
517  case 9:
518  return PARM_VECTOR2;
519  case 10:
520  return PARM_INTEGER;
521 
522  }
523  return PARM_UNSUPPORTED;
524  }
525 
526  // Boiler plate to load individual types.
527  static void loadData(UT_IStream &is, int64 &v)
528  { is.bread(&v, 1); }
529  static void loadData(UT_IStream &is, bool &v)
530  { int64 iv; is.bread(&iv, 1); v = iv; }
531  static void loadData(UT_IStream &is, fpreal64 &v)
532  { is.bread<fpreal64>(&v, 1); }
533  static void loadData(UT_IStream &is, UT_Vector2D &v)
534  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
535  static void loadData(UT_IStream &is, UT_Vector3D &v)
536  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
537  is.bread<fpreal64>(&v.z(), 1); }
538  static void loadData(UT_IStream &is, UT_Vector4D &v)
539  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
540  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
541  static void loadData(UT_IStream &is, UT_Matrix2D &v)
542  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
543  static void loadData(UT_IStream &is, UT_Matrix3D &v)
544  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
545  static void loadData(UT_IStream &is, UT_Matrix4D &v)
546  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
547  static void loadData(UT_IStream &is, UT_Vector2I &v)
548  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
549  static void loadData(UT_IStream &is, UT_Vector3I &v)
550  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
551  is.bread<int64>(&v.z(), 1); }
552  static void loadData(UT_IStream &is, UT_Vector4I &v)
553  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
554  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
556  { is.bread(v); }
558  { UT_StringHolder rampdata;
559  loadData(is, rampdata);
560  if (rampdata.isstring())
561  {
562  v.reset(new UT_Ramp());
563  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
564  v->load(istr);
565  }
566  else v.reset();
567  }
570  loadData(is, data);
571  if (data.isstring())
572  {
573  // Find the data type.
574  const char *colon = UT_StringWrap(data).findChar(':');
575  if (colon)
576  {
577  int typelen = colon - data.buffer();
579  type.strncpy(data.buffer(), typelen);
580  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
581 
582  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
583  }
584  }
585  else v.reset();
586  }
587 
588  static void saveData(std::ostream &os, int64 v)
589  { UTwrite(os, &v); }
590  static void saveData(std::ostream &os, bool v)
591  { int64 iv = v; UTwrite(os, &iv); }
592  static void saveData(std::ostream &os, fpreal64 v)
593  { UTwrite<fpreal64>(os, &v); }
594  static void saveData(std::ostream &os, UT_Vector2D v)
595  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
596  static void saveData(std::ostream &os, UT_Vector3D v)
597  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
598  UTwrite<fpreal64>(os, &v.z()); }
599  static void saveData(std::ostream &os, UT_Vector4D v)
600  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
601  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
602  static void saveData(std::ostream &os, UT_Matrix2D v)
604  static void saveData(std::ostream &os, UT_Matrix3D v)
606  static void saveData(std::ostream &os, UT_Matrix4D v)
608  static void saveData(std::ostream &os, UT_StringHolder s)
609  { UT_StringWrap(s).saveBinary(os); }
610  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
612  UT_OStringStream ostr;
613  if (s) s->save(ostr);
614  result = ostr.str();
615  saveData(os, result);
616  }
617  static void saveData(std::ostream &os, PRM_DataItemHandle s)
619  UT_OStringStream ostr;
620  if (s)
621  {
622  ostr << s->getDataTypeToken();
623  ostr << ":";
624  s->saveBinary(ostr);
625  }
626  result = ostr.str();
627  saveData(os, result);
628  }
629 
630 
631  void save(std::ostream &os) const
632  {
633  int32 v = version();
634  UTwrite(os, &v);
635  saveData(os, myGroup);
636  saveData(os, myBasis);
637  saveData(os, myConnecttype);
638  saveData(os, myCloseu);
639  saveData(os, myClosev);
640  saveData(os, myFirstuclamp);
641  saveData(os, myLastuclamp);
642  saveData(os, myFirstvclamp);
643  saveData(os, myLastvclamp);
644  saveData(os, myDivisions);
645  saveData(os, myPolys);
646 
647  }
648 
649  bool load(UT_IStream &is)
650  {
651  int32 v;
652  is.bread(&v, 1);
653  if (version() != v)
654  {
655  // Fail incompatible versions
656  return false;
657  }
658  loadData(is, myGroup);
659  loadData(is, myBasis);
660  loadData(is, myConnecttype);
661  loadData(is, myCloseu);
662  loadData(is, myClosev);
663  loadData(is, myFirstuclamp);
664  loadData(is, myLastuclamp);
665  loadData(is, myFirstvclamp);
666  loadData(is, myLastvclamp);
667  loadData(is, myDivisions);
668  loadData(is, myPolys);
669 
670  return true;
671  }
672 
673  const UT_StringHolder & getGroup() const { return myGroup; }
674  void setGroup(const UT_StringHolder & val) { myGroup = val; }
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getGroup();
680  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
681  return result;
682  }
683  Basis getBasis() const { return Basis(myBasis); }
684  void setBasis(Basis val) { myBasis = int64(val); }
685  Basis opBasis(const SOP_NodeVerb::CookParms &cookparms) const
686  {
687  SOP_Node *thissop = cookparms.getNode();
688  if (!thissop) return getBasis();
689  int64 result;
690  OP_Utils::evalOpParm(result, thissop, "basis", cookparms.getCookTime(), 0);
691  return Basis(result);
692  }
693  Connecttype getConnecttype() const { return Connecttype(myConnecttype); }
694  void setConnecttype(Connecttype val) { myConnecttype = int64(val); }
696  {
697  SOP_Node *thissop = cookparms.getNode();
698  if (!thissop) return getConnecttype();
699  int64 result;
700  OP_Utils::evalOpParm(result, thissop, "connecttype", cookparms.getCookTime(), 0);
701  return Connecttype(result);
702  }
703  Closeu getCloseu() const { return Closeu(myCloseu); }
704  void setCloseu(Closeu val) { myCloseu = int64(val); }
705  Closeu opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
706  {
707  SOP_Node *thissop = cookparms.getNode();
708  if (!thissop) return getCloseu();
709  int64 result;
710  OP_Utils::evalOpParm(result, thissop, "closeu", cookparms.getCookTime(), 0);
711  return Closeu(result);
712  }
713  Closev getClosev() const { return Closev(myClosev); }
714  void setClosev(Closev val) { myClosev = int64(val); }
715  Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getClosev();
719  int64 result;
720  OP_Utils::evalOpParm(result, thissop, "closev", cookparms.getCookTime(), 0);
721  return Closev(result);
722  }
723  Firstuclamp getFirstuclamp() const { return Firstuclamp(myFirstuclamp); }
724  void setFirstuclamp(Firstuclamp val) { myFirstuclamp = int64(val); }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getFirstuclamp();
729  int64 result;
730  OP_Utils::evalOpParm(result, thissop, "firstuclamp", cookparms.getCookTime(), 0);
731  return Firstuclamp(result);
732  }
733  Lastuclamp getLastuclamp() const { return Lastuclamp(myLastuclamp); }
734  void setLastuclamp(Lastuclamp val) { myLastuclamp = int64(val); }
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getLastuclamp();
739  int64 result;
740  OP_Utils::evalOpParm(result, thissop, "lastuclamp", cookparms.getCookTime(), 0);
741  return Lastuclamp(result);
742  }
743  Firstvclamp getFirstvclamp() const { return Firstvclamp(myFirstvclamp); }
744  void setFirstvclamp(Firstvclamp val) { myFirstvclamp = int64(val); }
746  {
747  SOP_Node *thissop = cookparms.getNode();
748  if (!thissop) return getFirstvclamp();
749  int64 result;
750  OP_Utils::evalOpParm(result, thissop, "firstvclamp", cookparms.getCookTime(), 0);
751  return Firstvclamp(result);
752  }
753  Lastvclamp getLastvclamp() const { return Lastvclamp(myLastvclamp); }
754  void setLastvclamp(Lastvclamp val) { myLastvclamp = int64(val); }
756  {
757  SOP_Node *thissop = cookparms.getNode();
758  if (!thissop) return getLastvclamp();
759  int64 result;
760  OP_Utils::evalOpParm(result, thissop, "lastvclamp", cookparms.getCookTime(), 0);
761  return Lastvclamp(result);
762  }
763  UT_Vector2I getDivisions() const { return myDivisions; }
764  void setDivisions(UT_Vector2I val) { myDivisions = val; }
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return getDivisions();
770  OP_Utils::evalOpParm(result, thissop, "divisions", cookparms.getCookTime(), 0);
771  return result;
772  }
773  bool getPolys() const { return myPolys; }
774  void setPolys(bool val) { myPolys = val; }
775  bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
776  {
777  SOP_Node *thissop = cookparms.getNode();
778  if (!thissop) return getPolys();
779  bool result;
780  OP_Utils::evalOpParm(result, thissop, "polys", cookparms.getCookTime(), 0);
781  return result;
782  }
783 
784 private:
785  UT_StringHolder myGroup;
786  int64 myBasis;
787  int64 myConnecttype;
788  int64 myCloseu;
789  int64 myClosev;
790  int64 myFirstuclamp;
791  int64 myLastuclamp;
792  int64 myFirstvclamp;
793  int64 myLastvclamp;
794  UT_Vector2I myDivisions;
795  bool myPolys;
796 
797 };
void setLastuclamp(Lastuclamp val)
Lastvclamp opLastvclamp(const SOP_NodeVerb::CookParms &cookparms) const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Connecttype getConnecttype() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
Closev getClosev() const
void setLastvclamp(Lastvclamp val)
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setFirstvclamp(Firstvclamp val)
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
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
Firstuclamp getFirstuclamp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SYS_FORCE_INLINE const char * buffer() const
void setGroup(const UT_StringHolder &val)
Firstvclamp getFirstvclamp() const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
An output stream object that owns its own string buffer storage.
Basis opBasis(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
Closeu getCloseu() const
Lastvclamp getLastvclamp() const
**But if you need a result
Definition: thread.h:613
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
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.
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, fpreal64 &v)
double fpreal64
Definition: SYS_Types.h:201
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
exint length() const
void setClosev(Closev val)
void setBasis(Basis val)
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
static void saveData(std::ostream &os, fpreal64 v)
void setFirstuclamp(Firstuclamp val)
Lastuclamp opLastuclamp(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
void setConnecttype(Connecttype val)
long long int64
Definition: SYS_Types.h:116
void setCloseu(Closeu val)
Connecttype opConnecttype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void save(std::ostream &os) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
bool operator!=(const SOP_PolyPatchParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, int64 v)
bool operator==(const SOP_PolyPatchParms &src) const
Firstvclamp opFirstvclamp(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
GT_Basis myBasis
Definition: GT_CurveEval.h:262
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, bool v)
exint getNestNumParms(TempIndex idx) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void copyFrom(const OP_NodeParms *src) override
LeafData & operator=(const LeafData &)=delete
void setDivisions(UT_Vector2I val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
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
static void loadData(UT_IStream &is, UT_Matrix4D &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Basis enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_Vector2I opDivisions(const SOP_NodeVerb::CookParms &cookparms) const
Closeu opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
Lastuclamp getLastuclamp() const
GLboolean r
Definition: glcorearb.h:1222
Firstuclamp opFirstuclamp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
UT_Vector2I getDivisions() const
static void loadData(UT_IStream &is, int64 &v)
type
Definition: core.h:1059
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
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
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663