HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVTransform-2.0.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_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_UVTransform_2_0Enums
22 {
23  enum class GroupType
24  {
25  GUESS = 0,
26  VERTICES,
27  EDGES,
28  POINTS,
29  PRIMS
30  };
31  enum class XOrd
32  {
33  SRT = 0,
34  STR,
35  RST,
36  RTS,
37  TSR,
38  TRS
39  };
40  enum class ROrd
41  {
42  XYZ = 0,
43  XZY,
44  YXZ,
45  YZX,
46  ZXY,
47  ZYX
48  };
49  enum class Type
50  {
51  LINEAR = 0,
52  QUADRATIC,
53  CUBIC,
54  META
55  };
56  enum class Metric
57  {
58  UV = 0,
59  UVW,
60  XYZ
61  };
62  enum class Visualizefalloff
63  {
64  NEVER = 0,
65  ALWAYS,
66  STATE
67  };
68 }
69 
70 
72 {
73 public:
74  static int version() { return 1; }
75 
77  {
78  myGroup = ""_sh;
79  myGroupType = 0;
80  myUVAttrib = "uv"_sh;
81  myXOrd = 0;
82  myROrd = 0;
83  myT = UT_Vector3D(0,0,0);
84  myR = UT_Vector3D(0,0,0);
85  myS = UT_Vector3D(1,1,1);
86  myShear = UT_Vector3D(0,0,0);
87  myP = UT_Vector3D(0,0,0);
88  myRad = 0;
89  myType = 2;
90  myTandeg = UT_Vector2D(0,0);
91  myKernel = "wyvill"_sh;
92  myMetric = 0;
93  myGlobal = false;
94  myUVGlobal = false;
95  myVisualizefalloff = 2;
96 
97  }
98 
99  explicit SOP_UVTransform_2_0Parms(const SOP_UVTransform_2_0Parms &) = default;
100 
102 
104  {
105  if (myGroup != src.myGroup) return false;
106  if (myGroupType != src.myGroupType) return false;
107  if (myUVAttrib != src.myUVAttrib) return false;
108  if (myXOrd != src.myXOrd) return false;
109  if (myROrd != src.myROrd) return false;
110  if (myT != src.myT) return false;
111  if (myR != src.myR) return false;
112  if (myS != src.myS) return false;
113  if (myShear != src.myShear) return false;
114  if (myP != src.myP) return false;
115  if (myRad != src.myRad) return false;
116  if (myType != src.myType) return false;
117  if (myTandeg != src.myTandeg) return false;
118  if (myKernel != src.myKernel) return false;
119  if (myMetric != src.myMetric) return false;
120  if (myGlobal != src.myGlobal) return false;
121  if (myUVGlobal != src.myUVGlobal) return false;
122  if (myVisualizefalloff != src.myVisualizefalloff) return false;
123 
124  return true;
125  }
127  {
128  return !operator==(src);
129  }
136 
137 
138 
139  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
140  {
141  if (true)
142  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
143  else myGroup = ""_sh;
144  if (true)
145  OP_Utils::evalOpParm(myGroupType, node, "grouptype", time, 0);
146  else myGroupType = 0;
147  if (true)
148  OP_Utils::evalOpParm(myUVAttrib, node, "uvattrib", time, 0);
149  else myUVAttrib = "uv"_sh;
150  if (true)
151  OP_Utils::evalOpParm(myXOrd, node, "xOrd", time, 0);
152  else myXOrd = 0;
153  if (true)
154  OP_Utils::evalOpParm(myROrd, node, "rOrd", time, 0);
155  else myROrd = 0;
156  if (true)
157  OP_Utils::evalOpParm(myT, node, "t", time, 0);
158  else myT = UT_Vector3D(0,0,0);
159  if (true)
160  OP_Utils::evalOpParm(myR, node, "r", time, 0);
161  else myR = UT_Vector3D(0,0,0);
162  if (true)
163  OP_Utils::evalOpParm(myS, node, "s", time, 0);
164  else myS = UT_Vector3D(1,1,1);
165  if (true)
166  OP_Utils::evalOpParm(myShear, node, "shear", time, 0);
167  else myShear = UT_Vector3D(0,0,0);
168  if (true)
169  OP_Utils::evalOpParm(myP, node, "p", time, 0);
170  else myP = UT_Vector3D(0,0,0);
171  if (true)
172  OP_Utils::evalOpParm(myRad, node, "rad", time, 0);
173  else myRad = 0;
174  if (true)
175  OP_Utils::evalOpParm(myType, node, "type", time, 0);
176  else myType = 2;
177  if (true && ( (!(((int64(getType())!=2)))) ) )
178  OP_Utils::evalOpParm(myTandeg, node, "tandeg", time, 0);
179  else myTandeg = UT_Vector2D(0,0);
180  if (true && ( (!(((int64(getType())!=3)))) ) )
181  OP_Utils::evalOpParm(myKernel, node, "kernel", time, 0);
182  else myKernel = "wyvill"_sh;
183  if (true)
184  OP_Utils::evalOpParm(myMetric, node, "metric", time, 0);
185  else myMetric = 0;
186  if (true)
187  OP_Utils::evalOpParm(myGlobal, node, "global", time, 0);
188  else myGlobal = false;
189  if (true)
190  OP_Utils::evalOpParm(myUVGlobal, node, "uvglobal", time, 0);
191  else myUVGlobal = false;
192  if (true)
193  OP_Utils::evalOpParm(myVisualizefalloff, node, "visualizefalloff", time, 0);
194  else myVisualizefalloff = 2;
195 
196  }
197 
198 
199  virtual void loadFromOpSubclass(const LoadParms &loadparms)
200  {
201  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
202  }
203 
204 
205  virtual void copyFrom(const SOP_NodeParms *src)
206  {
207  *this = *((const SOP_UVTransform_2_0Parms *)src);
208  }
209 
210  template <typename T>
211  void
212  doGetParmValue(exint idx, T &value) const
213  {
214  switch (idx)
215  {
216  case 0:
217  coerceValue(value, myGroup);
218  break;
219  case 1:
220  coerceValue(value, myGroupType);
221  break;
222  case 2:
223  coerceValue(value, myUVAttrib);
224  break;
225  case 3:
226  coerceValue(value, myXOrd);
227  break;
228  case 4:
229  coerceValue(value, myROrd);
230  break;
231  case 5:
232  coerceValue(value, myT);
233  break;
234  case 6:
235  coerceValue(value, myR);
236  break;
237  case 7:
238  coerceValue(value, myS);
239  break;
240  case 8:
241  coerceValue(value, myShear);
242  break;
243  case 9:
244  coerceValue(value, myP);
245  break;
246  case 10:
247  coerceValue(value, myRad);
248  break;
249  case 11:
250  coerceValue(value, myType);
251  break;
252  case 12:
253  coerceValue(value, myTandeg);
254  break;
255  case 13:
256  coerceValue(value, myKernel);
257  break;
258  case 14:
259  coerceValue(value, myMetric);
260  break;
261  case 15:
262  coerceValue(value, myGlobal);
263  break;
264  case 16:
265  coerceValue(value, myUVGlobal);
266  break;
267  case 17:
268  coerceValue(value, myVisualizefalloff);
269  break;
270 
271  }
272  }
273 
274  void getParmValue(exint idx, exint &value) const
275  { doGetParmValue(idx, value); }
276  void getParmValue(exint idx, fpreal &value) const
277  { doGetParmValue(idx, value); }
279  { doGetParmValue(idx, value); }
281  { doGetParmValue(idx, value); }
283  { doGetParmValue(idx, value); }
285  { doGetParmValue(idx, value); }
287  { doGetParmValue(idx, value); }
289  { doGetParmValue(idx, value); }
291  { doGetParmValue(idx, value); }
293  { doGetParmValue(idx, value); }
295  { doGetParmValue(idx, value); }
296 
297  template <typename T>
298  void
299  doSetParmValue(exint idx, const T &value)
300  {
301  switch (idx)
302  {
303  case 0:
304  coerceValue(myGroup, value);
305  break;
306  case 1:
307  coerceValue(myGroupType, value);
308  break;
309  case 2:
310  coerceValue(myUVAttrib, value);
311  break;
312  case 3:
313  coerceValue(myXOrd, value);
314  break;
315  case 4:
316  coerceValue(myROrd, value);
317  break;
318  case 5:
319  coerceValue(myT, value);
320  break;
321  case 6:
322  coerceValue(myR, value);
323  break;
324  case 7:
325  coerceValue(myS, value);
326  break;
327  case 8:
328  coerceValue(myShear, value);
329  break;
330  case 9:
331  coerceValue(myP, value);
332  break;
333  case 10:
334  coerceValue(myRad, value);
335  break;
336  case 11:
337  coerceValue(myType, value);
338  break;
339  case 12:
340  coerceValue(myTandeg, value);
341  break;
342  case 13:
343  coerceValue(myKernel, value);
344  break;
345  case 14:
346  coerceValue(myMetric, value);
347  break;
348  case 15:
349  coerceValue(myGlobal, value);
350  break;
351  case 16:
352  coerceValue(myUVGlobal, value);
353  break;
354  case 17:
355  coerceValue(myVisualizefalloff, value);
356  break;
357 
358  }
359  }
360 
361  void setParmValue(exint idx, const exint &value)
362  { doSetParmValue(idx, value); }
363  void setParmValue(exint idx, const fpreal &value)
364  { doSetParmValue(idx, value); }
365  void setParmValue(exint idx, const UT_Vector2D &value)
366  { doSetParmValue(idx, value); }
367  void setParmValue(exint idx, const UT_Vector3D &value)
368  { doSetParmValue(idx, value); }
369  void setParmValue(exint idx, const UT_Vector4D &value)
370  { doSetParmValue(idx, value); }
371  void setParmValue(exint idx, const UT_Matrix2D &value)
372  { doSetParmValue(idx, value); }
373  void setParmValue(exint idx, const UT_Matrix3D &value)
374  { doSetParmValue(idx, value); }
375  void setParmValue(exint idx, const UT_Matrix4D &value)
376  { doSetParmValue(idx, value); }
378  { doSetParmValue(idx, value); }
380  { doSetParmValue(idx, value); }
382  { doSetParmValue(idx, value); }
383 
384  virtual exint getNumParms() const
385  {
386  return 18;
387  }
388 
389  virtual const char *getParmName(exint fieldnum) const
390  {
391  switch (fieldnum)
392  {
393  case 0:
394  return "group";
395  case 1:
396  return "grouptype";
397  case 2:
398  return "uvattrib";
399  case 3:
400  return "xOrd";
401  case 4:
402  return "rOrd";
403  case 5:
404  return "t";
405  case 6:
406  return "r";
407  case 7:
408  return "s";
409  case 8:
410  return "shear";
411  case 9:
412  return "p";
413  case 10:
414  return "rad";
415  case 11:
416  return "type";
417  case 12:
418  return "tandeg";
419  case 13:
420  return "kernel";
421  case 14:
422  return "metric";
423  case 15:
424  return "global";
425  case 16:
426  return "uvglobal";
427  case 17:
428  return "visualizefalloff";
429 
430  }
431  return 0;
432  }
433 
434  virtual ParmType getParmType(exint fieldnum) const
435  {
436  switch (fieldnum)
437  {
438  case 0:
439  return PARM_STRING;
440  case 1:
441  return PARM_INTEGER;
442  case 2:
443  return PARM_STRING;
444  case 3:
445  return PARM_INTEGER;
446  case 4:
447  return PARM_INTEGER;
448  case 5:
449  return PARM_VECTOR3;
450  case 6:
451  return PARM_VECTOR3;
452  case 7:
453  return PARM_VECTOR3;
454  case 8:
455  return PARM_VECTOR3;
456  case 9:
457  return PARM_VECTOR3;
458  case 10:
459  return PARM_FLOAT;
460  case 11:
461  return PARM_INTEGER;
462  case 12:
463  return PARM_VECTOR2;
464  case 13:
465  return PARM_STRING;
466  case 14:
467  return PARM_INTEGER;
468  case 15:
469  return PARM_INTEGER;
470  case 16:
471  return PARM_INTEGER;
472  case 17:
473  return PARM_INTEGER;
474 
475  }
476  return PARM_UNSUPPORTED;
477  }
478 
479  // Boiler plate to load individual types.
480  static void loadData(UT_IStream &is, int64 &v)
481  { is.bread(&v, 1); }
482  static void loadData(UT_IStream &is, bool &v)
483  { int64 iv; is.bread(&iv, 1); v = iv; }
484  static void loadData(UT_IStream &is, fpreal64 &v)
485  { is.bread<fpreal64>(&v, 1); }
486  static void loadData(UT_IStream &is, UT_Vector2D &v)
487  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
488  static void loadData(UT_IStream &is, UT_Vector3D &v)
489  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
490  is.bread<fpreal64>(&v.z(), 1); }
491  static void loadData(UT_IStream &is, UT_Vector4D &v)
492  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
493  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
494  static void loadData(UT_IStream &is, UT_Matrix2D &v)
495  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
496  static void loadData(UT_IStream &is, UT_Matrix3D &v)
497  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
498  static void loadData(UT_IStream &is, UT_Matrix4D &v)
499  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
500  static void loadData(UT_IStream &is, UT_Vector2I &v)
501  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
502  static void loadData(UT_IStream &is, UT_Vector3I &v)
503  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
504  is.bread<int64>(&v.z(), 1); }
505  static void loadData(UT_IStream &is, UT_Vector4I &v)
506  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
507  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
509  { is.bread(v); }
511  { UT_StringHolder rampdata;
512  loadData(is, rampdata);
513  if (rampdata.isstring())
514  {
515  v.reset(new UT_Ramp());
516  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
517  v->load(istr);
518  }
519  else v.reset();
520  }
523  loadData(is, data);
524  if (data.isstring())
525  {
526  // Find the data type.
527  char *colon = UT_StringWrap(data).findChar(':');
528  if (colon)
529  {
530  int typelen = colon - data.buffer();
532  type.strncpy(data.buffer(), typelen);
533  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
534 
535  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
536  }
537  }
538  else v.reset();
539  }
540 
541  static void saveData(std::ostream &os, int64 v)
542  { UTwrite(os, &v); }
543  static void saveData(std::ostream &os, bool v)
544  { int64 iv = v; UTwrite(os, &iv); }
545  static void saveData(std::ostream &os, fpreal64 v)
546  { UTwrite<fpreal64>(os, &v); }
547  static void saveData(std::ostream &os, UT_Vector2D v)
548  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
549  static void saveData(std::ostream &os, UT_Vector3D v)
550  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
551  UTwrite<fpreal64>(os, &v.z()); }
552  static void saveData(std::ostream &os, UT_Vector4D v)
553  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
554  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
555  static void saveData(std::ostream &os, UT_Matrix2D v)
557  static void saveData(std::ostream &os, UT_Matrix3D v)
559  static void saveData(std::ostream &os, UT_Matrix4D v)
561  static void saveData(std::ostream &os, UT_StringHolder s)
562  { UT_StringWrap(s).saveBinary(os); }
563  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
564  { UT_StringHolder result;
565  UT_OStringStream ostr;
566  if (s) s->save(ostr);
567  result = ostr.str();
568  saveData(os, result);
569  }
570  static void saveData(std::ostream &os, PRM_DataItemHandle s)
571  { UT_StringHolder result;
572  UT_OStringStream ostr;
573  if (s)
574  {
575  ostr << s->getDataTypeToken();
576  ostr << ":";
577  s->saveBinary(ostr);
578  }
579  result = ostr.str();
580  saveData(os, result);
581  }
582 
583 
584  void save(std::ostream &os) const
585  {
586  int32 v = version();
587  UTwrite(os, &v);
588  saveData(os, myGroup);
589  saveData(os, myGroupType);
590  saveData(os, myUVAttrib);
591  saveData(os, myXOrd);
592  saveData(os, myROrd);
593  saveData(os, myT);
594  saveData(os, myR);
595  saveData(os, myS);
596  saveData(os, myShear);
597  saveData(os, myP);
598  saveData(os, myRad);
599  saveData(os, myType);
600  saveData(os, myTandeg);
601  saveData(os, myKernel);
602  saveData(os, myMetric);
603  saveData(os, myGlobal);
604  saveData(os, myUVGlobal);
605  saveData(os, myVisualizefalloff);
606 
607  }
608 
609  bool load(UT_IStream &is)
610  {
611  int32 v;
612  is.bread(&v, 1);
613  if (version() != v)
614  {
615  // Fail incompatible versions
616  return false;
617  }
618  loadData(is, myGroup);
619  loadData(is, myGroupType);
620  loadData(is, myUVAttrib);
621  loadData(is, myXOrd);
622  loadData(is, myROrd);
623  loadData(is, myT);
624  loadData(is, myR);
625  loadData(is, myS);
626  loadData(is, myShear);
627  loadData(is, myP);
628  loadData(is, myRad);
629  loadData(is, myType);
630  loadData(is, myTandeg);
631  loadData(is, myKernel);
632  loadData(is, myMetric);
633  loadData(is, myGlobal);
634  loadData(is, myUVGlobal);
635  loadData(is, myVisualizefalloff);
636 
637  return true;
638  }
639 
640  const UT_StringHolder & getGroup() const { return myGroup; }
641  void setGroup(const UT_StringHolder & val) { myGroup = val; }
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getGroup();
646  UT_StringHolder result;
647  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
648  return result;
649  }
650  GroupType getGroupType() const { return GroupType(myGroupType); }
651  void setGroupType(GroupType val) { myGroupType = int64(val); }
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getGroupType();
656  int64 result;
657  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
658  return GroupType(result);
659  }
660  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
661  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getUVAttrib();
666  UT_StringHolder result;
667  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
668  return result;
669  }
670  XOrd getXOrd() const { return XOrd(myXOrd); }
671  void setXOrd(XOrd val) { myXOrd = int64(val); }
672  XOrd opXOrd(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getXOrd();
676  int64 result;
677  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
678  return XOrd(result);
679  }
680  ROrd getROrd() const { return ROrd(myROrd); }
681  void setROrd(ROrd val) { myROrd = int64(val); }
682  ROrd opROrd(const SOP_NodeVerb::CookParms &cookparms) const
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getROrd();
686  int64 result;
687  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
688  return ROrd(result);
689  }
690  UT_Vector3D getT() const { return myT; }
691  void setT(UT_Vector3D val) { myT = val; }
692  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getT();
696  UT_Vector3D result;
697  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
698  return result;
699  }
700  UT_Vector3D getR() const { return myR; }
701  void setR(UT_Vector3D val) { myR = val; }
702  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return getR();
706  UT_Vector3D result;
707  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
708  return result;
709  }
710  UT_Vector3D getS() const { return myS; }
711  void setS(UT_Vector3D val) { myS = val; }
712  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
713  {
714  SOP_Node *thissop = cookparms.getNode();
715  if (!thissop) return getS();
716  UT_Vector3D result;
717  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
718  return result;
719  }
720  UT_Vector3D getShear() const { return myShear; }
721  void setShear(UT_Vector3D val) { myShear = val; }
723  {
724  SOP_Node *thissop = cookparms.getNode();
725  if (!thissop) return getShear();
726  UT_Vector3D result;
727  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
728  return result;
729  }
730  UT_Vector3D getP() const { return myP; }
731  void setP(UT_Vector3D val) { myP = val; }
732  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
733  {
734  SOP_Node *thissop = cookparms.getNode();
735  if (!thissop) return getP();
736  UT_Vector3D result;
737  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
738  return result;
739  }
740  fpreal64 getRad() const { return myRad; }
741  void setRad(fpreal64 val) { myRad = val; }
742  fpreal64 opRad(const SOP_NodeVerb::CookParms &cookparms) const
743  {
744  SOP_Node *thissop = cookparms.getNode();
745  if (!thissop) return getRad();
746  fpreal64 result;
747  OP_Utils::evalOpParm(result, thissop, "rad", cookparms.getCookTime(), 0);
748  return result;
749  }
750  Type getType() const { return Type(myType); }
751  void setType(Type val) { myType = int64(val); }
752  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
753  {
754  SOP_Node *thissop = cookparms.getNode();
755  if (!thissop) return getType();
756  int64 result;
757  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
758  return Type(result);
759  }
760  UT_Vector2D getTandeg() const { return myTandeg; }
761  void setTandeg(UT_Vector2D val) { myTandeg = val; }
763  {
764  SOP_Node *thissop = cookparms.getNode();
765  if (!thissop) return getTandeg();
766  UT_Vector2D result;
767  OP_Utils::evalOpParm(result, thissop, "tandeg", cookparms.getCookTime(), 0);
768  return result;
769  }
770  const UT_StringHolder & getKernel() const { return myKernel; }
771  void setKernel(const UT_StringHolder & val) { myKernel = val; }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return getKernel();
776  UT_StringHolder result;
777  OP_Utils::evalOpParm(result, thissop, "kernel", cookparms.getCookTime(), 0);
778  return result;
779  }
780  Metric getMetric() const { return Metric(myMetric); }
781  void setMetric(Metric val) { myMetric = int64(val); }
782  Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
783  {
784  SOP_Node *thissop = cookparms.getNode();
785  if (!thissop) return getMetric();
786  int64 result;
787  OP_Utils::evalOpParm(result, thissop, "metric", cookparms.getCookTime(), 0);
788  return Metric(result);
789  }
790  bool getGlobal() const { return myGlobal; }
791  void setGlobal(bool val) { myGlobal = val; }
792  bool opGlobal(const SOP_NodeVerb::CookParms &cookparms) const
793  {
794  SOP_Node *thissop = cookparms.getNode();
795  if (!thissop) return getGlobal();
796  bool result;
797  OP_Utils::evalOpParm(result, thissop, "global", cookparms.getCookTime(), 0);
798  return result;
799  }
800  bool getUVGlobal() const { return myUVGlobal; }
801  void setUVGlobal(bool val) { myUVGlobal = val; }
802  bool opUVGlobal(const SOP_NodeVerb::CookParms &cookparms) const
803  {
804  SOP_Node *thissop = cookparms.getNode();
805  if (!thissop) return getUVGlobal();
806  bool result;
807  OP_Utils::evalOpParm(result, thissop, "uvglobal", cookparms.getCookTime(), 0);
808  return result;
809  }
810  Visualizefalloff getVisualizefalloff() const { return Visualizefalloff(myVisualizefalloff); }
811  void setVisualizefalloff(Visualizefalloff val) { myVisualizefalloff = int64(val); }
813  {
814  SOP_Node *thissop = cookparms.getNode();
815  if (!thissop) return getVisualizefalloff();
816  int64 result;
817  OP_Utils::evalOpParm(result, thissop, "visualizefalloff", cookparms.getCookTime(), 0);
818  return Visualizefalloff(result);
819  }
820 
821 private:
822  UT_StringHolder myGroup;
823  int64 myGroupType;
824  UT_StringHolder myUVAttrib;
825  int64 myXOrd;
826  int64 myROrd;
827  UT_Vector3D myT;
828  UT_Vector3D myR;
829  UT_Vector3D myS;
830  UT_Vector3D myShear;
831  UT_Vector3D myP;
832  fpreal64 myRad;
833  int64 myType;
834  UT_Vector2D myTandeg;
835  UT_StringHolder myKernel;
836  int64 myMetric;
837  bool myGlobal;
838  bool myUVGlobal;
839  int64 myVisualizefalloff;
840 
841 };
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
virtual const char * getParmName(exint fieldnum) const
void getParmValue(exint idx, PRM_DataItemHandle &value) const
ROrd opROrd(const SOP_NodeVerb::CookParms &cookparms) const
void setKernel(const UT_StringHolder &val)
Visualizefalloff getVisualizefalloff() const
void doSetParmValue(exint idx, const T &value)
XOrd opXOrd(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
T & z(void)
Definition: UT_Vector4.h:379
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void getParmValue(exint idx, UT_Matrix3D &value) const
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
void setParmValue(exint idx, const UT_Vector4D &value)
UT_Vector2T< fpreal64 > UT_Vector2D
virtual void copyFrom(const SOP_NodeParms *src)
void getParmValue(exint idx, UT_StringHolder &value) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_Vector4D &value) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, bool v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void setParmValue(exint idx, const UT_Vector3D &value)
virtual exint getNumParms() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_StringHolder & getUVAttrib() const
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
void setParmValue(exint idx, const fpreal &value)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator!=(const SOP_UVTransform_2_0Parms &src) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opGlobal(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setParmValue(exint idx, const UT_StringHolder &value)
void setParmValue(exint idx, const UT_Vector2D &value)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
int64 exint
Definition: SYS_Types.h:116
void getParmValue(exint idx, UT_Vector2D &value) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
virtual ParmType getParmType(exint fieldnum) const
void getParmValue(exint idx, UT_Vector3D &value) const
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const exint &value)
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_Vector3D opShear(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
void setParmValue(exint idx, const UT_Matrix3D &value)
GLboolean * data
Definition: glcorearb.h:130
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector2D v)
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
const UT_StringHolder & getKernel() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opKernel(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix2D &value)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void setParmValue(exint idx, const PRM_DataItemHandle &value)
void getParmValue(exint idx, exint &value) const
void getParmValue(exint idx, UT_Matrix4D &value) const
fpreal64 opRad(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void save(std::ostream &os) const
UT_Vector2D opTandeg(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, fpreal &value) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, int64 v)
void setGroup(const UT_StringHolder &val)
void setVisualizefalloff(Visualizefalloff val)
void doGetParmValue(exint idx, T &value) const
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
#define SOP_API
Definition: SOP_API.h:10
void setParmValue(exint idx, const UT_Matrix4D &value)
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
bool operator==(const SOP_UVTransform_2_0Parms &src) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
virtual void loadFromOpSubclass(const LoadParms &loadparms)
T & x(void)
Definition: UT_Vector4.h:375
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setUVAttrib(const UT_StringHolder &val)
bool opUVGlobal(const SOP_NodeVerb::CookParms &cookparms) const
Visualizefalloff opVisualizefalloff(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
T & y(void)
Definition: UT_Vector2.h:287
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLboolean r
Definition: glcorearb.h:1221
T & w(void)
Definition: UT_Vector4.h:381
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1792
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const