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 <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_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 
231  if (baseGetSignature() != src.baseGetSignature()) return false;
232 
233  return true;
234  }
235  bool operator!=(const SOP_PolyPatchParms &src) const
236  {
237  return !operator==(src);
238  }
247 
248 
249 
250  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
251  {
252  myGroup = ""_UTsh;
253  if (true)
254  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
255  myBasis = 0;
256  if (true)
257  graph->evalOpParm(myBasis, nodeidx, "basis", time, graph->isDirect()?nullptr:depnode);
258  myConnecttype = 4;
259  if (true)
260  graph->evalOpParm(myConnecttype, nodeidx, "connecttype", time, graph->isDirect()?nullptr:depnode);
261  myCloseu = 2;
262  if (true)
263  graph->evalOpParm(myCloseu, nodeidx, "closeu", time, graph->isDirect()?nullptr:depnode);
264  myClosev = 2;
265  if (true)
266  graph->evalOpParm(myClosev, nodeidx, "closev", time, graph->isDirect()?nullptr:depnode);
267  myFirstuclamp = 2;
268  if (true)
269  graph->evalOpParm(myFirstuclamp, nodeidx, "firstuclamp", time, graph->isDirect()?nullptr:depnode);
270  myLastuclamp = 2;
271  if (true)
272  graph->evalOpParm(myLastuclamp, nodeidx, "lastuclamp", time, graph->isDirect()?nullptr:depnode);
273  myFirstvclamp = 2;
274  if (true)
275  graph->evalOpParm(myFirstvclamp, nodeidx, "firstvclamp", time, graph->isDirect()?nullptr:depnode);
276  myLastvclamp = 2;
277  if (true)
278  graph->evalOpParm(myLastvclamp, nodeidx, "lastvclamp", time, graph->isDirect()?nullptr:depnode);
279  myDivisions = 0;
280  if (true)
281  graph->evalOpParm(myDivisions, nodeidx, "divisions", time, graph->isDirect()?nullptr:depnode);
282  myPolys = false;
283  if (true)
284  graph->evalOpParm(myPolys, nodeidx, "polys", time, graph->isDirect()?nullptr:depnode);
285 
286  }
287 
288 
289  void loadFromOpSubclass(const LoadParms &loadparms) override
290  {
291  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
292  }
293 
294 
295  void copyFrom(const OP_NodeParms *src) override
296  {
297  *this = *((const SOP_PolyPatchParms *)src);
298  }
299 
300  template <typename T>
301  void
302  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
303  {
304  if (idx.size() < 1)
305  return;
306  UT_ASSERT(idx.size() == instance.size()+1);
307  if (idx.size() != instance.size()+1)
308  return;
309  switch (idx[0])
310  {
311  case 0:
312  coerceValue(value, myGroup);
313  break;
314  case 1:
315  coerceValue(value, myBasis);
316  break;
317  case 2:
318  coerceValue(value, myConnecttype);
319  break;
320  case 3:
321  coerceValue(value, myCloseu);
322  break;
323  case 4:
324  coerceValue(value, myClosev);
325  break;
326  case 5:
327  coerceValue(value, myFirstuclamp);
328  break;
329  case 6:
330  coerceValue(value, myLastuclamp);
331  break;
332  case 7:
333  coerceValue(value, myFirstvclamp);
334  break;
335  case 8:
336  coerceValue(value, myLastvclamp);
337  break;
338  case 9:
339  coerceValue(value, myDivisions);
340  break;
341  case 10:
342  coerceValue(value, myPolys);
343  break;
344 
345  }
346  }
347 
348  bool isParmColorRamp(exint idx) const override
349  {
350  switch (idx)
351  {
352 
353  }
354  return false;
355  }
356 
357  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
358  { doGetParmValue(idx, instance, value); }
359  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
360  { doGetParmValue(idx, instance, value); }
361  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
362  { doGetParmValue(idx, instance, value); }
363  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
364  { doGetParmValue(idx, instance, value); }
365  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
366  { doGetParmValue(idx, instance, value); }
367  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
368  { doGetParmValue(idx, instance, value); }
369  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
370  { doGetParmValue(idx, instance, value); }
371  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
372  { doGetParmValue(idx, instance, value); }
373  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
374  { doGetParmValue(idx, instance, value); }
375  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
376  { doGetParmValue(idx, instance, value); }
377  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
378  { doGetParmValue(idx, instance, value); }
379 
380  template <typename T>
381  void
382  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
383  {
384  if (idx.size() < 1)
385  return;
386  UT_ASSERT(idx.size() == instance.size()+1);
387  if (idx.size() != instance.size()+1)
388  return;
389  switch (idx[0])
390  {
391  case 0:
392  coerceValue(myGroup, ( ( value ) ));
393  break;
394  case 1:
395  coerceValue(myBasis, clampMinValue(0, clampMaxValue(1, value ) ));
396  break;
397  case 2:
398  coerceValue(myConnecttype, clampMinValue(0, clampMaxValue(7, value ) ));
399  break;
400  case 3:
401  coerceValue(myCloseu, clampMinValue(0, clampMaxValue(2, value ) ));
402  break;
403  case 4:
404  coerceValue(myClosev, clampMinValue(0, clampMaxValue(2, value ) ));
405  break;
406  case 5:
407  coerceValue(myFirstuclamp, clampMinValue(0, clampMaxValue(2, value ) ));
408  break;
409  case 6:
410  coerceValue(myLastuclamp, clampMinValue(0, clampMaxValue(2, value ) ));
411  break;
412  case 7:
413  coerceValue(myFirstvclamp, clampMinValue(0, clampMaxValue(2, value ) ));
414  break;
415  case 8:
416  coerceValue(myLastvclamp, clampMinValue(0, clampMaxValue(2, value ) ));
417  break;
418  case 9:
419  coerceValue(myDivisions, clampMinValue(1, ( value ) ));
420  break;
421  case 10:
422  coerceValue(myPolys, ( ( value ) ));
423  break;
424 
425  }
426  }
427 
428  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
429  { doSetParmValue(idx, instance, value); }
430  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
431  { doSetParmValue(idx, instance, value); }
432  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
433  { doSetParmValue(idx, instance, value); }
434  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
435  { doSetParmValue(idx, instance, value); }
436  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
437  { doSetParmValue(idx, instance, value); }
438  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
439  { doSetParmValue(idx, instance, value); }
440  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
441  { doSetParmValue(idx, instance, value); }
442  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
443  { doSetParmValue(idx, instance, value); }
444  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
445  { doSetParmValue(idx, instance, value); }
446  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
447  { doSetParmValue(idx, instance, value); }
448  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
449  { doSetParmValue(idx, instance, value); }
450 
451  exint getNestNumParms(TempIndex idx) const override
452  {
453  if (idx.size() == 0)
454  return 11;
455  switch (idx[0])
456  {
457 
458  }
459  // Invalid
460  return 0;
461  }
462 
463  const char *getNestParmName(TempIndex fieldnum) const override
464  {
465  if (fieldnum.size() < 1)
466  return 0;
467  switch (fieldnum[0])
468  {
469  case 0:
470  return "group";
471  case 1:
472  return "basis";
473  case 2:
474  return "connecttype";
475  case 3:
476  return "closeu";
477  case 4:
478  return "closev";
479  case 5:
480  return "firstuclamp";
481  case 6:
482  return "lastuclamp";
483  case 7:
484  return "firstvclamp";
485  case 8:
486  return "lastvclamp";
487  case 9:
488  return "divisions";
489  case 10:
490  return "polys";
491 
492  }
493  return 0;
494  }
495 
496  ParmType getNestParmType(TempIndex fieldnum) const override
497  {
498  if (fieldnum.size() < 1)
499  return PARM_UNSUPPORTED;
500  switch (fieldnum[0])
501  {
502  case 0:
503  return PARM_STRING;
504  case 1:
505  return PARM_INTEGER;
506  case 2:
507  return PARM_INTEGER;
508  case 3:
509  return PARM_INTEGER;
510  case 4:
511  return PARM_INTEGER;
512  case 5:
513  return PARM_INTEGER;
514  case 6:
515  return PARM_INTEGER;
516  case 7:
517  return PARM_INTEGER;
518  case 8:
519  return PARM_INTEGER;
520  case 9:
521  return PARM_VECTOR2;
522  case 10:
523  return PARM_INTEGER;
524 
525  }
526  return PARM_UNSUPPORTED;
527  }
528 
529  // Boiler plate to load individual types.
530  static void loadData(UT_IStream &is, int64 &v)
531  { is.bread(&v, 1); }
532  static void loadData(UT_IStream &is, bool &v)
533  { int64 iv; is.bread(&iv, 1); v = iv; }
534  static void loadData(UT_IStream &is, fpreal64 &v)
535  { is.bread<fpreal64>(&v, 1); }
536  static void loadData(UT_IStream &is, UT_Vector2D &v)
537  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
538  static void loadData(UT_IStream &is, UT_Vector3D &v)
539  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
540  is.bread<fpreal64>(&v.z(), 1); }
541  static void loadData(UT_IStream &is, UT_Vector4D &v)
542  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
543  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
544  static void loadData(UT_IStream &is, UT_Matrix2D &v)
545  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
546  static void loadData(UT_IStream &is, UT_Matrix3D &v)
547  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
548  static void loadData(UT_IStream &is, UT_Matrix4D &v)
549  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
550  static void loadData(UT_IStream &is, UT_Vector2I &v)
551  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
552  static void loadData(UT_IStream &is, UT_Vector3I &v)
553  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
554  is.bread<int64>(&v.z(), 1); }
555  static void loadData(UT_IStream &is, UT_Vector4I &v)
556  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
557  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
559  { is.bread(v); }
561  { UT_StringHolder rampdata;
562  loadData(is, rampdata);
563  if (rampdata.isstring())
564  {
565  v.reset(new UT_Ramp());
566  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
567  v->load(istr);
568  }
569  else v.reset();
570  }
573  loadData(is, data);
574  if (data.isstring())
575  {
576  // Find the data type.
577  const char *colon = UT_StringWrap(data).findChar(':');
578  if (colon)
579  {
580  int typelen = colon - data.buffer();
582  type.strncpy(data.buffer(), typelen);
583  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
584 
585  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
586  }
587  }
588  else v.reset();
589  }
590 
591  static void saveData(std::ostream &os, int64 v)
592  { UTwrite(os, &v); }
593  static void saveData(std::ostream &os, bool v)
594  { int64 iv = v; UTwrite(os, &iv); }
595  static void saveData(std::ostream &os, fpreal64 v)
596  { UTwrite<fpreal64>(os, &v); }
597  static void saveData(std::ostream &os, UT_Vector2D v)
598  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
599  static void saveData(std::ostream &os, UT_Vector3D v)
600  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
601  UTwrite<fpreal64>(os, &v.z()); }
602  static void saveData(std::ostream &os, UT_Vector4D v)
603  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
604  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
605  static void saveData(std::ostream &os, UT_Matrix2D v)
607  static void saveData(std::ostream &os, UT_Matrix3D v)
609  static void saveData(std::ostream &os, UT_Matrix4D v)
611  static void saveData(std::ostream &os, UT_StringHolder s)
612  { UT_StringWrap(s).saveBinary(os); }
613  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
615  UT_OStringStream ostr;
616  if (s) s->save(ostr);
617  result = ostr.str();
618  saveData(os, result);
619  }
620  static void saveData(std::ostream &os, PRM_DataItemHandle s)
622  UT_OStringStream ostr;
623  if (s)
624  {
625  ostr << s->getDataTypeToken();
626  ostr << ":";
627  s->saveBinary(ostr);
628  }
629  result = ostr.str();
630  saveData(os, result);
631  }
632 
633 
634  void save(std::ostream &os) const
635  {
636  int32 v = version();
637  UTwrite(os, &v);
638  saveData(os, myGroup);
639  saveData(os, myBasis);
640  saveData(os, myConnecttype);
641  saveData(os, myCloseu);
642  saveData(os, myClosev);
643  saveData(os, myFirstuclamp);
644  saveData(os, myLastuclamp);
645  saveData(os, myFirstvclamp);
646  saveData(os, myLastvclamp);
647  saveData(os, myDivisions);
648  saveData(os, myPolys);
649 
650  }
651 
652  bool load(UT_IStream &is)
653  {
654  int32 v;
655  is.bread(&v, 1);
656  if (version() != v)
657  {
658  // Fail incompatible versions
659  return false;
660  }
661  loadData(is, myGroup);
662  loadData(is, myBasis);
663  loadData(is, myConnecttype);
664  loadData(is, myCloseu);
665  loadData(is, myClosev);
666  loadData(is, myFirstuclamp);
667  loadData(is, myLastuclamp);
668  loadData(is, myFirstvclamp);
669  loadData(is, myLastvclamp);
670  loadData(is, myDivisions);
671  loadData(is, myPolys);
672 
673  return true;
674  }
675 
676  const UT_StringHolder & getGroup() const { return myGroup; }
677  void setGroup(const UT_StringHolder & val) { myGroup = val; }
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getGroup();
683  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
684  return result;
685  }
686  Basis getBasis() const { return Basis(myBasis); }
687  void setBasis(Basis val) { myBasis = int64(val); }
688  Basis opBasis(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getBasis();
692  int64 result;
693  OP_Utils::evalOpParm(result, thissop, "basis", cookparms.getCookTime(), 0);
694  return Basis(result);
695  }
696  Connecttype getConnecttype() const { return Connecttype(myConnecttype); }
697  void setConnecttype(Connecttype val) { myConnecttype = int64(val); }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getConnecttype();
702  int64 result;
703  OP_Utils::evalOpParm(result, thissop, "connecttype", cookparms.getCookTime(), 0);
704  return Connecttype(result);
705  }
706  Closeu getCloseu() const { return Closeu(myCloseu); }
707  void setCloseu(Closeu val) { myCloseu = int64(val); }
708  Closeu opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getCloseu();
712  int64 result;
713  OP_Utils::evalOpParm(result, thissop, "closeu", cookparms.getCookTime(), 0);
714  return Closeu(result);
715  }
716  Closev getClosev() const { return Closev(myClosev); }
717  void setClosev(Closev val) { myClosev = int64(val); }
718  Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getClosev();
722  int64 result;
723  OP_Utils::evalOpParm(result, thissop, "closev", cookparms.getCookTime(), 0);
724  return Closev(result);
725  }
726  Firstuclamp getFirstuclamp() const { return Firstuclamp(myFirstuclamp); }
727  void setFirstuclamp(Firstuclamp val) { myFirstuclamp = int64(val); }
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getFirstuclamp();
732  int64 result;
733  OP_Utils::evalOpParm(result, thissop, "firstuclamp", cookparms.getCookTime(), 0);
734  return Firstuclamp(result);
735  }
736  Lastuclamp getLastuclamp() const { return Lastuclamp(myLastuclamp); }
737  void setLastuclamp(Lastuclamp val) { myLastuclamp = int64(val); }
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getLastuclamp();
742  int64 result;
743  OP_Utils::evalOpParm(result, thissop, "lastuclamp", cookparms.getCookTime(), 0);
744  return Lastuclamp(result);
745  }
746  Firstvclamp getFirstvclamp() const { return Firstvclamp(myFirstvclamp); }
747  void setFirstvclamp(Firstvclamp val) { myFirstvclamp = int64(val); }
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getFirstvclamp();
752  int64 result;
753  OP_Utils::evalOpParm(result, thissop, "firstvclamp", cookparms.getCookTime(), 0);
754  return Firstvclamp(result);
755  }
756  Lastvclamp getLastvclamp() const { return Lastvclamp(myLastvclamp); }
757  void setLastvclamp(Lastvclamp val) { myLastvclamp = int64(val); }
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getLastvclamp();
762  int64 result;
763  OP_Utils::evalOpParm(result, thissop, "lastvclamp", cookparms.getCookTime(), 0);
764  return Lastvclamp(result);
765  }
766  UT_Vector2I getDivisions() const { return myDivisions; }
767  void setDivisions(UT_Vector2I val) { myDivisions = val; }
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getDivisions();
773  OP_Utils::evalOpParm(result, thissop, "divisions", cookparms.getCookTime(), 0);
774  return result;
775  }
776  bool getPolys() const { return myPolys; }
777  void setPolys(bool val) { myPolys = val; }
778  bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getPolys();
782  bool result;
783  OP_Utils::evalOpParm(result, thissop, "polys", cookparms.getCookTime(), 0);
784  return result;
785  }
786 
787 private:
788  UT_StringHolder myGroup;
789  int64 myBasis;
790  int64 myConnecttype;
791  int64 myCloseu;
792  int64 myClosev;
793  int64 myFirstuclamp;
794  int64 myLastuclamp;
795  int64 myFirstvclamp;
796  int64 myLastvclamp;
797  UT_Vector2I myDivisions;
798  bool myPolys;
799 
800 };
void setLastuclamp(Lastuclamp val)
Lastvclamp opLastvclamp(const SOP_NodeVerb::CookParms &cookparms) const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:556
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:63
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
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:622
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
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:303
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:278
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:96
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
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#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:372
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:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
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)
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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
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