HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  }
132 
133 
134 
135  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
136  {
137  if (true)
138  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
139  else myGroup = ""_sh;
140  if (true)
141  OP_Utils::evalOpParm(myGroupType, node, "grouptype", time, 0);
142  else myGroupType = 0;
143  if (true)
144  OP_Utils::evalOpParm(myUVAttrib, node, "uvattrib", time, 0);
145  else myUVAttrib = "uv"_sh;
146  if (true)
147  OP_Utils::evalOpParm(myXOrd, node, "xOrd", time, 0);
148  else myXOrd = 0;
149  if (true)
150  OP_Utils::evalOpParm(myROrd, node, "rOrd", time, 0);
151  else myROrd = 0;
152  if (true)
153  OP_Utils::evalOpParm(myT, node, "t", time, 0);
154  else myT = UT_Vector3D(0,0,0);
155  if (true)
156  OP_Utils::evalOpParm(myR, node, "r", time, 0);
157  else myR = UT_Vector3D(0,0,0);
158  if (true)
159  OP_Utils::evalOpParm(myS, node, "s", time, 0);
160  else myS = UT_Vector3D(1,1,1);
161  if (true)
162  OP_Utils::evalOpParm(myShear, node, "shear", time, 0);
163  else myShear = UT_Vector3D(0,0,0);
164  if (true)
165  OP_Utils::evalOpParm(myP, node, "p", time, 0);
166  else myP = UT_Vector3D(0,0,0);
167  if (true)
168  OP_Utils::evalOpParm(myRad, node, "rad", time, 0);
169  else myRad = 0;
170  if (true)
171  OP_Utils::evalOpParm(myType, node, "type", time, 0);
172  else myType = 2;
173  if (true && ( (!(((int64(getType())!=2)))) ) )
174  OP_Utils::evalOpParm(myTandeg, node, "tandeg", time, 0);
175  else myTandeg = UT_Vector2D(0,0);
176  if (true && ( (!(((int64(getType())!=3)))) ) )
177  OP_Utils::evalOpParm(myKernel, node, "kernel", time, 0);
178  else myKernel = "wyvill"_sh;
179  if (true)
180  OP_Utils::evalOpParm(myMetric, node, "metric", time, 0);
181  else myMetric = 0;
182  if (true)
183  OP_Utils::evalOpParm(myGlobal, node, "global", time, 0);
184  else myGlobal = false;
185  if (true)
186  OP_Utils::evalOpParm(myUVGlobal, node, "uvglobal", time, 0);
187  else myUVGlobal = false;
188  if (true)
189  OP_Utils::evalOpParm(myVisualizefalloff, node, "visualizefalloff", time, 0);
190  else myVisualizefalloff = 2;
191 
192  }
193 
194 
195  virtual void loadFromOpSubclass(const LoadParms &loadparms)
196  {
197  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
198  }
199 
200 
201  virtual void copyFrom(const SOP_NodeParms *src)
202  {
203  *this = *((const SOP_UVTransform_2_0Parms *)src);
204  }
205 
206  template <typename T>
207  void
208  doGetParmValue(exint idx, T &value) const
209  {
210  switch (idx)
211  {
212  case 0:
213  coerceValue(value, myGroup);
214  break;
215  case 1:
216  coerceValue(value, myGroupType);
217  break;
218  case 2:
219  coerceValue(value, myUVAttrib);
220  break;
221  case 3:
222  coerceValue(value, myXOrd);
223  break;
224  case 4:
225  coerceValue(value, myROrd);
226  break;
227  case 5:
228  coerceValue(value, myT);
229  break;
230  case 6:
231  coerceValue(value, myR);
232  break;
233  case 7:
234  coerceValue(value, myS);
235  break;
236  case 8:
237  coerceValue(value, myShear);
238  break;
239  case 9:
240  coerceValue(value, myP);
241  break;
242  case 10:
243  coerceValue(value, myRad);
244  break;
245  case 11:
246  coerceValue(value, myType);
247  break;
248  case 12:
249  coerceValue(value, myTandeg);
250  break;
251  case 13:
252  coerceValue(value, myKernel);
253  break;
254  case 14:
255  coerceValue(value, myMetric);
256  break;
257  case 15:
258  coerceValue(value, myGlobal);
259  break;
260  case 16:
261  coerceValue(value, myUVGlobal);
262  break;
263  case 17:
264  coerceValue(value, myVisualizefalloff);
265  break;
266 
267  }
268  }
269 
270  void getParmValue(exint idx, exint &value) const
271  { doGetParmValue(idx, value); }
272  void getParmValue(exint idx, fpreal &value) const
273  { doGetParmValue(idx, value); }
275  { doGetParmValue(idx, value); }
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); }
292 
293  template <typename T>
294  void
295  doSetParmValue(exint idx, const T &value)
296  {
297  switch (idx)
298  {
299  case 0:
300  coerceValue(myGroup, value);
301  break;
302  case 1:
303  coerceValue(myGroupType, value);
304  break;
305  case 2:
306  coerceValue(myUVAttrib, value);
307  break;
308  case 3:
309  coerceValue(myXOrd, value);
310  break;
311  case 4:
312  coerceValue(myROrd, value);
313  break;
314  case 5:
315  coerceValue(myT, value);
316  break;
317  case 6:
318  coerceValue(myR, value);
319  break;
320  case 7:
321  coerceValue(myS, value);
322  break;
323  case 8:
324  coerceValue(myShear, value);
325  break;
326  case 9:
327  coerceValue(myP, value);
328  break;
329  case 10:
330  coerceValue(myRad, value);
331  break;
332  case 11:
333  coerceValue(myType, value);
334  break;
335  case 12:
336  coerceValue(myTandeg, value);
337  break;
338  case 13:
339  coerceValue(myKernel, value);
340  break;
341  case 14:
342  coerceValue(myMetric, value);
343  break;
344  case 15:
345  coerceValue(myGlobal, value);
346  break;
347  case 16:
348  coerceValue(myUVGlobal, value);
349  break;
350  case 17:
351  coerceValue(myVisualizefalloff, value);
352  break;
353 
354  }
355  }
356 
357  void setParmValue(exint idx, const exint &value)
358  { doSetParmValue(idx, value); }
359  void setParmValue(exint idx, const fpreal &value)
360  { doSetParmValue(idx, value); }
361  void setParmValue(exint idx, const UT_Vector2D &value)
362  { doSetParmValue(idx, value); }
363  void setParmValue(exint idx, const UT_Vector3D &value)
364  { doSetParmValue(idx, value); }
365  void setParmValue(exint idx, const UT_Vector4D &value)
366  { doSetParmValue(idx, value); }
367  void setParmValue(exint idx, const UT_Matrix2D &value)
368  { doSetParmValue(idx, value); }
369  void setParmValue(exint idx, const UT_Matrix3D &value)
370  { doSetParmValue(idx, value); }
371  void setParmValue(exint idx, const UT_Matrix4D &value)
372  { doSetParmValue(idx, value); }
374  { doSetParmValue(idx, value); }
376  { doSetParmValue(idx, value); }
378  { doSetParmValue(idx, value); }
379 
380  virtual exint getNumParms() const
381  {
382  return 18;
383  }
384 
385  virtual const char *getParmName(exint fieldnum) const
386  {
387  switch (fieldnum)
388  {
389  case 0:
390  return "group";
391  case 1:
392  return "grouptype";
393  case 2:
394  return "uvattrib";
395  case 3:
396  return "xOrd";
397  case 4:
398  return "rOrd";
399  case 5:
400  return "t";
401  case 6:
402  return "r";
403  case 7:
404  return "s";
405  case 8:
406  return "shear";
407  case 9:
408  return "p";
409  case 10:
410  return "rad";
411  case 11:
412  return "type";
413  case 12:
414  return "tandeg";
415  case 13:
416  return "kernel";
417  case 14:
418  return "metric";
419  case 15:
420  return "global";
421  case 16:
422  return "uvglobal";
423  case 17:
424  return "visualizefalloff";
425 
426  }
427  return 0;
428  }
429 
430  virtual ParmType getParmType(exint fieldnum) const
431  {
432  switch (fieldnum)
433  {
434  case 0:
435  return PARM_STRING;
436  case 1:
437  return PARM_INTEGER;
438  case 2:
439  return PARM_STRING;
440  case 3:
441  return PARM_INTEGER;
442  case 4:
443  return PARM_INTEGER;
444  case 5:
445  return PARM_VECTOR3;
446  case 6:
447  return PARM_VECTOR3;
448  case 7:
449  return PARM_VECTOR3;
450  case 8:
451  return PARM_VECTOR3;
452  case 9:
453  return PARM_VECTOR3;
454  case 10:
455  return PARM_FLOAT;
456  case 11:
457  return PARM_INTEGER;
458  case 12:
459  return PARM_VECTOR2;
460  case 13:
461  return PARM_STRING;
462  case 14:
463  return PARM_INTEGER;
464  case 15:
465  return PARM_INTEGER;
466  case 16:
467  return PARM_INTEGER;
468  case 17:
469  return PARM_INTEGER;
470 
471  }
472  return PARM_UNSUPPORTED;
473  }
474 
475  // Boiler plate to load individual types.
476  static void loadData(UT_IStream &is, int64 &v)
477  { is.bread(&v, 1); }
478  static void loadData(UT_IStream &is, bool &v)
479  { int64 iv; is.bread(&iv, 1); v = iv; }
480  static void loadData(UT_IStream &is, fpreal64 &v)
481  { is.bread<fpreal64>(&v, 1); }
482  static void loadData(UT_IStream &is, UT_Vector2D &v)
483  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
484  static void loadData(UT_IStream &is, UT_Vector3D &v)
485  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
486  is.bread<fpreal64>(&v.z(), 1); }
487  static void loadData(UT_IStream &is, UT_Vector4D &v)
488  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
489  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
490  static void loadData(UT_IStream &is, UT_Matrix2D &v)
491  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
492  static void loadData(UT_IStream &is, UT_Matrix3D &v)
493  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
494  static void loadData(UT_IStream &is, UT_Matrix4D &v)
495  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
496  static void loadData(UT_IStream &is, UT_Vector2I &v)
497  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
498  static void loadData(UT_IStream &is, UT_Vector3I &v)
499  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
500  is.bread<int64>(&v.z(), 1); }
501  static void loadData(UT_IStream &is, UT_Vector4I &v)
502  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
503  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
505  { is.bread(v); }
507  { UT_StringHolder rampdata;
508  loadData(is, rampdata);
509  if (rampdata.isstring())
510  {
511  v.reset(new UT_Ramp());
512  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
513  v->load(istr);
514  }
515  else v.reset();
516  }
519  loadData(is, data);
520  if (data.isstring())
521  {
522  // Find the data type.
523  char *colon = UT_StringWrap(data).findChar(':');
524  if (colon)
525  {
526  int typelen = colon - data.buffer();
528  type.strncpy(data.buffer(), typelen);
529  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
530 
531  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
532  }
533  }
534  else v.reset();
535  }
536 
537  static void saveData(std::ostream &os, int64 v)
538  { UTwrite(os, &v); }
539  static void saveData(std::ostream &os, bool v)
540  { int64 iv = v; UTwrite(os, &iv); }
541  static void saveData(std::ostream &os, fpreal64 v)
542  { UTwrite<fpreal64>(os, &v); }
543  static void saveData(std::ostream &os, UT_Vector2D v)
544  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
545  static void saveData(std::ostream &os, UT_Vector3D v)
546  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
547  UTwrite<fpreal64>(os, &v.z()); }
548  static void saveData(std::ostream &os, UT_Vector4D v)
549  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
550  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
551  static void saveData(std::ostream &os, UT_Matrix2D v)
553  static void saveData(std::ostream &os, UT_Matrix3D v)
555  static void saveData(std::ostream &os, UT_Matrix4D v)
557  static void saveData(std::ostream &os, UT_StringHolder s)
558  { UT_StringWrap(s).saveBinary(os); }
559  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
560  { UT_StringHolder result;
561  UT_OStringStream ostr;
562  if (s) s->save(ostr);
563  result = ostr.str();
564  saveData(os, result);
565  }
566  static void saveData(std::ostream &os, PRM_DataItemHandle s)
567  { UT_StringHolder result;
568  UT_OStringStream ostr;
569  if (s)
570  {
571  ostr << s->getDataTypeToken();
572  ostr << ":";
573  s->saveBinary(ostr);
574  }
575  result = ostr.str();
576  saveData(os, result);
577  }
578 
579 
580  void save(std::ostream &os) const
581  {
582  int32 v = version();
583  UTwrite(os, &v);
584  saveData(os, myGroup);
585  saveData(os, myGroupType);
586  saveData(os, myUVAttrib);
587  saveData(os, myXOrd);
588  saveData(os, myROrd);
589  saveData(os, myT);
590  saveData(os, myR);
591  saveData(os, myS);
592  saveData(os, myShear);
593  saveData(os, myP);
594  saveData(os, myRad);
595  saveData(os, myType);
596  saveData(os, myTandeg);
597  saveData(os, myKernel);
598  saveData(os, myMetric);
599  saveData(os, myGlobal);
600  saveData(os, myUVGlobal);
601  saveData(os, myVisualizefalloff);
602 
603  }
604 
605  bool load(UT_IStream &is)
606  {
607  int32 v;
608  is.bread(&v, 1);
609  if (version() != v)
610  {
611  // Fail incompatible versions
612  return false;
613  }
614  loadData(is, myGroup);
615  loadData(is, myGroupType);
616  loadData(is, myUVAttrib);
617  loadData(is, myXOrd);
618  loadData(is, myROrd);
619  loadData(is, myT);
620  loadData(is, myR);
621  loadData(is, myS);
622  loadData(is, myShear);
623  loadData(is, myP);
624  loadData(is, myRad);
625  loadData(is, myType);
626  loadData(is, myTandeg);
627  loadData(is, myKernel);
628  loadData(is, myMetric);
629  loadData(is, myGlobal);
630  loadData(is, myUVGlobal);
631  loadData(is, myVisualizefalloff);
632 
633  return true;
634  }
635 
636  const UT_StringHolder & getGroup() const { return myGroup; }
637  void setGroup(const UT_StringHolder & val) { myGroup = val; }
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getGroup();
642  UT_StringHolder result;
643  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
644  return result;
645  }
646  GroupType getGroupType() const { return GroupType(myGroupType); }
647  void setGroupType(GroupType val) { myGroupType = int64(val); }
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getGroupType();
652  int64 result;
653  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
654  return GroupType(result);
655  }
656  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
657  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getUVAttrib();
662  UT_StringHolder result;
663  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
664  return result;
665  }
666  XOrd getXOrd() const { return XOrd(myXOrd); }
667  void setXOrd(XOrd val) { myXOrd = int64(val); }
668  XOrd opXOrd(const SOP_NodeVerb::CookParms &cookparms) const
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getXOrd();
672  int64 result;
673  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
674  return XOrd(result);
675  }
676  ROrd getROrd() const { return ROrd(myROrd); }
677  void setROrd(ROrd val) { myROrd = int64(val); }
678  ROrd opROrd(const SOP_NodeVerb::CookParms &cookparms) const
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getROrd();
682  int64 result;
683  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
684  return ROrd(result);
685  }
686  UT_Vector3D getT() const { return myT; }
687  void setT(UT_Vector3D val) { myT = val; }
688  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getT();
692  UT_Vector3D result;
693  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
694  return result;
695  }
696  UT_Vector3D getR() const { return myR; }
697  void setR(UT_Vector3D val) { myR = val; }
698  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getR();
702  UT_Vector3D result;
703  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
704  return result;
705  }
706  UT_Vector3D getS() const { return myS; }
707  void setS(UT_Vector3D val) { myS = val; }
708  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getS();
712  UT_Vector3D result;
713  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
714  return result;
715  }
716  UT_Vector3D getShear() const { return myShear; }
717  void setShear(UT_Vector3D val) { myShear = val; }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getShear();
722  UT_Vector3D result;
723  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
724  return result;
725  }
726  UT_Vector3D getP() const { return myP; }
727  void setP(UT_Vector3D val) { myP = val; }
728  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getP();
732  UT_Vector3D result;
733  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
734  return result;
735  }
736  fpreal64 getRad() const { return myRad; }
737  void setRad(fpreal64 val) { myRad = val; }
738  fpreal64 opRad(const SOP_NodeVerb::CookParms &cookparms) const
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getRad();
742  fpreal64 result;
743  OP_Utils::evalOpParm(result, thissop, "rad", cookparms.getCookTime(), 0);
744  return result;
745  }
746  Type getType() const { return Type(myType); }
747  void setType(Type val) { myType = int64(val); }
748  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getType();
752  int64 result;
753  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
754  return Type(result);
755  }
756  UT_Vector2D getTandeg() const { return myTandeg; }
757  void setTandeg(UT_Vector2D val) { myTandeg = val; }
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getTandeg();
762  UT_Vector2D result;
763  OP_Utils::evalOpParm(result, thissop, "tandeg", cookparms.getCookTime(), 0);
764  return result;
765  }
766  const UT_StringHolder & getKernel() const { return myKernel; }
767  void setKernel(const UT_StringHolder & val) { myKernel = val; }
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getKernel();
772  UT_StringHolder result;
773  OP_Utils::evalOpParm(result, thissop, "kernel", cookparms.getCookTime(), 0);
774  return result;
775  }
776  Metric getMetric() const { return Metric(myMetric); }
777  void setMetric(Metric val) { myMetric = int64(val); }
778  Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getMetric();
782  int64 result;
783  OP_Utils::evalOpParm(result, thissop, "metric", cookparms.getCookTime(), 0);
784  return Metric(result);
785  }
786  bool getGlobal() const { return myGlobal; }
787  void setGlobal(bool val) { myGlobal = val; }
788  bool opGlobal(const SOP_NodeVerb::CookParms &cookparms) const
789  {
790  SOP_Node *thissop = cookparms.getNode();
791  if (!thissop) return getGlobal();
792  bool result;
793  OP_Utils::evalOpParm(result, thissop, "global", cookparms.getCookTime(), 0);
794  return result;
795  }
796  bool getUVGlobal() const { return myUVGlobal; }
797  void setUVGlobal(bool val) { myUVGlobal = val; }
798  bool opUVGlobal(const SOP_NodeVerb::CookParms &cookparms) const
799  {
800  SOP_Node *thissop = cookparms.getNode();
801  if (!thissop) return getUVGlobal();
802  bool result;
803  OP_Utils::evalOpParm(result, thissop, "uvglobal", cookparms.getCookTime(), 0);
804  return result;
805  }
806  Visualizefalloff getVisualizefalloff() const { return Visualizefalloff(myVisualizefalloff); }
807  void setVisualizefalloff(Visualizefalloff val) { myVisualizefalloff = int64(val); }
809  {
810  SOP_Node *thissop = cookparms.getNode();
811  if (!thissop) return getVisualizefalloff();
812  int64 result;
813  OP_Utils::evalOpParm(result, thissop, "visualizefalloff", cookparms.getCookTime(), 0);
814  return Visualizefalloff(result);
815  }
816 
817 private:
818  UT_StringHolder myGroup;
819  int64 myGroupType;
820  UT_StringHolder myUVAttrib;
821  int64 myXOrd;
822  int64 myROrd;
823  UT_Vector3D myT;
824  UT_Vector3D myR;
825  UT_Vector3D myS;
826  UT_Vector3D myShear;
827  UT_Vector3D myP;
828  fpreal64 myRad;
829  int64 myType;
830  UT_Vector2D myTandeg;
831  UT_StringHolder myKernel;
832  int64 myMetric;
833  bool myGlobal;
834  bool myUVGlobal;
835  int64 myVisualizefalloff;
836 
837 };
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:492
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
T & z(void)
Definition: UT_Vector4.h:372
exint bread(int32 *buffer, exint asize=1)
void getParmValue(exint idx, UT_Matrix3D &value) const
fpreal getTime() const
Definition: OP_Context.h:34
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
T & x(void)
Definition: UT_Vector2.h:284
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:581
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)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
long long int64
Definition: SYS_Types.h:100
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
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
int64 exint
Definition: SYS_Types.h:109
void getParmValue(exint idx, UT_Vector2D &value) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:185
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:28
T & y(void)
Definition: UT_Vector4.h:370
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)
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:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:263
void strncpy(const char *src, exint maxlen)
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)
const char * buffer() const
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:499
virtual void loadFromOpSubclass(const LoadParms &loadparms)
T & x(void)
Definition: UT_Vector4.h:368
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:286
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:374
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
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
GLenum src
Definition: glcorearb.h:1792
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const