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