HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Transform.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_TransformEnums
22 {
23  enum class Grouptype
24  {
25  GUESS = 0,
26  BREAKPOINTS,
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 Prexform_xord
50  {
51  SRT = 0,
52  STR,
53  RST,
54  RTS,
55  TSR,
56  TRS
57  };
58  enum class Prexform_rord
59  {
60  XYZ = 0,
61  XZY,
62  YXZ,
63  YZX,
64  ZXY,
65  ZYX
66  };
67  enum class Outputmerge
68  {
69  REPLACE = 0,
70  PRE,
71  POST
72  };
73 }
74 
75 
77 {
78 public:
79  static int version() { return 1; }
80 
82  {
83  myGroup = ""_sh;
84  myGrouptype = 0;
85  myXord = 0;
86  myRord = 0;
87  myT = UT_Vector3D(0,0,0);
88  myR = UT_Vector3D(0,0,0);
89  myS = UT_Vector3D(1,1,1);
90  myShear = UT_Vector3D(0,0,0);
91  myScale = 1;
92  myP = UT_Vector3D(0,0,0);
93  myPr = UT_Vector3D(0,0,0);
94  myPrexform_xord = 0;
95  myPrexform_rord = 0;
96  myPrexform_t = UT_Vector3D(0,0,0);
97  myPrexform_r = UT_Vector3D(0,0,0);
98  myPrexform_s = UT_Vector3D(1,1,1);
99  myPrexform_shear = UT_Vector3D(0,0,0);
100  myAttribs = "*"_sh;
101  myUpdatenmls = false;
102  myUpdateaffectednmls = true;
103  myVlength = true;
104  myInvertxform = false;
105  myAddattrib = false;
106  myOutputattrib = "xform"_sh;
107  myOutputmerge = 2;
108 
109  }
110 
111  explicit SOP_TransformParms(const SOP_TransformParms &) = default;
112 
113  virtual ~SOP_TransformParms() {}
114 
115  bool operator==(const SOP_TransformParms &src) const
116  {
117  if (myGroup != src.myGroup) return false;
118  if (myGrouptype != src.myGrouptype) return false;
119  if (myXord != src.myXord) return false;
120  if (myRord != src.myRord) return false;
121  if (myT != src.myT) return false;
122  if (myR != src.myR) return false;
123  if (myS != src.myS) return false;
124  if (myShear != src.myShear) return false;
125  if (myScale != src.myScale) return false;
126  if (myP != src.myP) return false;
127  if (myPr != src.myPr) return false;
128  if (myPrexform_xord != src.myPrexform_xord) return false;
129  if (myPrexform_rord != src.myPrexform_rord) return false;
130  if (myPrexform_t != src.myPrexform_t) return false;
131  if (myPrexform_r != src.myPrexform_r) return false;
132  if (myPrexform_s != src.myPrexform_s) return false;
133  if (myPrexform_shear != src.myPrexform_shear) return false;
134  if (myAttribs != src.myAttribs) return false;
135  if (myUpdatenmls != src.myUpdatenmls) return false;
136  if (myUpdateaffectednmls != src.myUpdateaffectednmls) return false;
137  if (myVlength != src.myVlength) return false;
138  if (myInvertxform != src.myInvertxform) return false;
139  if (myAddattrib != src.myAddattrib) return false;
140  if (myOutputattrib != src.myOutputattrib) return false;
141  if (myOutputmerge != src.myOutputmerge) return false;
142 
143  return true;
144  }
145  bool operator!=(const SOP_TransformParms &src) const
146  {
147  return !operator==(src);
148  }
155 
156 
157 
158  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
159  {
160  if (true)
161  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
162  else myGroup = ""_sh;
163  if (true)
164  OP_Utils::evalOpParm(myGrouptype, node, "grouptype", time, 0);
165  else myGrouptype = 0;
166  if (true)
167  OP_Utils::evalOpParm(myXord, node, "xOrd", time, 0);
168  else myXord = 0;
169  if (true)
170  OP_Utils::evalOpParm(myRord, node, "rOrd", time, 0);
171  else myRord = 0;
172  if (true)
173  OP_Utils::evalOpParm(myT, node, "t", time, 0);
174  else myT = UT_Vector3D(0,0,0);
175  if (true)
176  OP_Utils::evalOpParm(myR, node, "r", time, 0);
177  else myR = UT_Vector3D(0,0,0);
178  if (true)
179  OP_Utils::evalOpParm(myS, node, "s", time, 0);
180  else myS = UT_Vector3D(1,1,1);
181  if (true)
182  OP_Utils::evalOpParm(myShear, node, "shear", time, 0);
183  else myShear = UT_Vector3D(0,0,0);
184  if (true)
185  OP_Utils::evalOpParm(myScale, node, "scale", time, 0);
186  else myScale = 1;
187  if (true)
188  OP_Utils::evalOpParm(myP, node, "p", time, 0);
189  else myP = UT_Vector3D(0,0,0);
190  if (true)
191  OP_Utils::evalOpParm(myPr, node, "pr", time, 0);
192  else myPr = UT_Vector3D(0,0,0);
193  if (true)
194  OP_Utils::evalOpParm(myPrexform_xord, node, "prexform_xOrd", time, 0);
195  else myPrexform_xord = 0;
196  if (true)
197  OP_Utils::evalOpParm(myPrexform_rord, node, "prexform_rOrd", time, 0);
198  else myPrexform_rord = 0;
199  if (true)
200  OP_Utils::evalOpParm(myPrexform_t, node, "prexform_t", time, 0);
201  else myPrexform_t = UT_Vector3D(0,0,0);
202  if (true)
203  OP_Utils::evalOpParm(myPrexform_r, node, "prexform_r", time, 0);
204  else myPrexform_r = UT_Vector3D(0,0,0);
205  if (true)
206  OP_Utils::evalOpParm(myPrexform_s, node, "prexform_s", time, 0);
207  else myPrexform_s = UT_Vector3D(1,1,1);
208  if (true)
209  OP_Utils::evalOpParm(myPrexform_shear, node, "prexform_shear", time, 0);
210  else myPrexform_shear = UT_Vector3D(0,0,0);
211  if (true)
212  OP_Utils::evalOpParm(myAttribs, node, "attribs", time, 0);
213  else myAttribs = "*"_sh;
214  if (true)
215  OP_Utils::evalOpParm(myUpdatenmls, node, "updatenmls", time, 0);
216  else myUpdatenmls = false;
217  if (true && ( (!(((getUpdatenmls()==1)))) ) )
218  OP_Utils::evalOpParm(myUpdateaffectednmls, node, "updateaffectednmls", time, 0);
219  else myUpdateaffectednmls = true;
220  if (true && ( (!(((getUpdatenmls()==1)))) ) )
221  OP_Utils::evalOpParm(myVlength, node, "vlength", time, 0);
222  else myVlength = true;
223  if (true)
224  OP_Utils::evalOpParm(myInvertxform, node, "invertxform", time, 0);
225  else myInvertxform = false;
226  if (true)
227  OP_Utils::evalOpParm(myAddattrib, node, "addattrib", time, 0);
228  else myAddattrib = false;
229  if (true && ( (!(((getAddattrib()==0)))) ) )
230  OP_Utils::evalOpParm(myOutputattrib, node, "outputattrib", time, 0);
231  else myOutputattrib = "xform"_sh;
232  if (true && ( (!(((getAddattrib()==0)))) ) )
233  OP_Utils::evalOpParm(myOutputmerge, node, "outputmerge", time, 0);
234  else myOutputmerge = 2;
235 
236  }
237 
238 
239  virtual void loadFromOpSubclass(const LoadParms &loadparms)
240  {
241  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
242  }
243 
244 
245  virtual void copyFrom(const SOP_NodeParms *src)
246  {
247  *this = *((const SOP_TransformParms *)src);
248  }
249 
250  template <typename T>
251  void
252  doGetParmValue(exint idx, T &value) const
253  {
254  switch (idx)
255  {
256  case 0:
257  coerceValue(value, myGroup);
258  break;
259  case 1:
260  coerceValue(value, myGrouptype);
261  break;
262  case 2:
263  coerceValue(value, myXord);
264  break;
265  case 3:
266  coerceValue(value, myRord);
267  break;
268  case 4:
269  coerceValue(value, myT);
270  break;
271  case 5:
272  coerceValue(value, myR);
273  break;
274  case 6:
275  coerceValue(value, myS);
276  break;
277  case 7:
278  coerceValue(value, myShear);
279  break;
280  case 8:
281  coerceValue(value, myScale);
282  break;
283  case 9:
284  coerceValue(value, myP);
285  break;
286  case 10:
287  coerceValue(value, myPr);
288  break;
289  case 11:
290  coerceValue(value, myPrexform_xord);
291  break;
292  case 12:
293  coerceValue(value, myPrexform_rord);
294  break;
295  case 13:
296  coerceValue(value, myPrexform_t);
297  break;
298  case 14:
299  coerceValue(value, myPrexform_r);
300  break;
301  case 15:
302  coerceValue(value, myPrexform_s);
303  break;
304  case 16:
305  coerceValue(value, myPrexform_shear);
306  break;
307  case 17:
308  coerceValue(value, myAttribs);
309  break;
310  case 18:
311  coerceValue(value, myUpdatenmls);
312  break;
313  case 19:
314  coerceValue(value, myUpdateaffectednmls);
315  break;
316  case 20:
317  coerceValue(value, myVlength);
318  break;
319  case 21:
320  coerceValue(value, myInvertxform);
321  break;
322  case 22:
323  coerceValue(value, myAddattrib);
324  break;
325  case 23:
326  coerceValue(value, myOutputattrib);
327  break;
328  case 24:
329  coerceValue(value, myOutputmerge);
330  break;
331 
332  }
333  }
334 
335  void getParmValue(exint idx, exint &value) const
336  { doGetParmValue(idx, value); }
337  void getParmValue(exint idx, fpreal &value) const
338  { doGetParmValue(idx, value); }
340  { doGetParmValue(idx, value); }
342  { doGetParmValue(idx, value); }
344  { doGetParmValue(idx, value); }
346  { doGetParmValue(idx, value); }
348  { doGetParmValue(idx, value); }
350  { doGetParmValue(idx, value); }
352  { doGetParmValue(idx, value); }
354  { doGetParmValue(idx, value); }
356  { doGetParmValue(idx, value); }
357 
358  template <typename T>
359  void
360  doSetParmValue(exint idx, const T &value)
361  {
362  switch (idx)
363  {
364  case 0:
365  coerceValue(myGroup, value);
366  break;
367  case 1:
368  coerceValue(myGrouptype, value);
369  break;
370  case 2:
371  coerceValue(myXord, value);
372  break;
373  case 3:
374  coerceValue(myRord, value);
375  break;
376  case 4:
377  coerceValue(myT, value);
378  break;
379  case 5:
380  coerceValue(myR, value);
381  break;
382  case 6:
383  coerceValue(myS, value);
384  break;
385  case 7:
386  coerceValue(myShear, value);
387  break;
388  case 8:
389  coerceValue(myScale, value);
390  break;
391  case 9:
392  coerceValue(myP, value);
393  break;
394  case 10:
395  coerceValue(myPr, value);
396  break;
397  case 11:
398  coerceValue(myPrexform_xord, value);
399  break;
400  case 12:
401  coerceValue(myPrexform_rord, value);
402  break;
403  case 13:
404  coerceValue(myPrexform_t, value);
405  break;
406  case 14:
407  coerceValue(myPrexform_r, value);
408  break;
409  case 15:
410  coerceValue(myPrexform_s, value);
411  break;
412  case 16:
413  coerceValue(myPrexform_shear, value);
414  break;
415  case 17:
416  coerceValue(myAttribs, value);
417  break;
418  case 18:
419  coerceValue(myUpdatenmls, value);
420  break;
421  case 19:
422  coerceValue(myUpdateaffectednmls, value);
423  break;
424  case 20:
425  coerceValue(myVlength, value);
426  break;
427  case 21:
428  coerceValue(myInvertxform, value);
429  break;
430  case 22:
431  coerceValue(myAddattrib, value);
432  break;
433  case 23:
434  coerceValue(myOutputattrib, value);
435  break;
436  case 24:
437  coerceValue(myOutputmerge, value);
438  break;
439 
440  }
441  }
442 
443  void setParmValue(exint idx, const exint &value)
444  { doSetParmValue(idx, value); }
445  void setParmValue(exint idx, const fpreal &value)
446  { doSetParmValue(idx, value); }
447  void setParmValue(exint idx, const UT_Vector2D &value)
448  { doSetParmValue(idx, value); }
449  void setParmValue(exint idx, const UT_Vector3D &value)
450  { doSetParmValue(idx, value); }
451  void setParmValue(exint idx, const UT_Vector4D &value)
452  { doSetParmValue(idx, value); }
453  void setParmValue(exint idx, const UT_Matrix2D &value)
454  { doSetParmValue(idx, value); }
455  void setParmValue(exint idx, const UT_Matrix3D &value)
456  { doSetParmValue(idx, value); }
457  void setParmValue(exint idx, const UT_Matrix4D &value)
458  { doSetParmValue(idx, value); }
460  { doSetParmValue(idx, value); }
462  { doSetParmValue(idx, value); }
464  { doSetParmValue(idx, value); }
465 
466  virtual exint getNumParms() const
467  {
468  return 25;
469  }
470 
471  virtual const char *getParmName(exint fieldnum) const
472  {
473  switch (fieldnum)
474  {
475  case 0:
476  return "group";
477  case 1:
478  return "grouptype";
479  case 2:
480  return "xOrd";
481  case 3:
482  return "rOrd";
483  case 4:
484  return "t";
485  case 5:
486  return "r";
487  case 6:
488  return "s";
489  case 7:
490  return "shear";
491  case 8:
492  return "scale";
493  case 9:
494  return "p";
495  case 10:
496  return "pr";
497  case 11:
498  return "prexform_xOrd";
499  case 12:
500  return "prexform_rOrd";
501  case 13:
502  return "prexform_t";
503  case 14:
504  return "prexform_r";
505  case 15:
506  return "prexform_s";
507  case 16:
508  return "prexform_shear";
509  case 17:
510  return "attribs";
511  case 18:
512  return "updatenmls";
513  case 19:
514  return "updateaffectednmls";
515  case 20:
516  return "vlength";
517  case 21:
518  return "invertxform";
519  case 22:
520  return "addattrib";
521  case 23:
522  return "outputattrib";
523  case 24:
524  return "outputmerge";
525 
526  }
527  return 0;
528  }
529 
530  virtual ParmType getParmType(exint fieldnum) const
531  {
532  switch (fieldnum)
533  {
534  case 0:
535  return PARM_STRING;
536  case 1:
537  return PARM_INTEGER;
538  case 2:
539  return PARM_INTEGER;
540  case 3:
541  return PARM_INTEGER;
542  case 4:
543  return PARM_VECTOR3;
544  case 5:
545  return PARM_VECTOR3;
546  case 6:
547  return PARM_VECTOR3;
548  case 7:
549  return PARM_VECTOR3;
550  case 8:
551  return PARM_FLOAT;
552  case 9:
553  return PARM_VECTOR3;
554  case 10:
555  return PARM_VECTOR3;
556  case 11:
557  return PARM_INTEGER;
558  case 12:
559  return PARM_INTEGER;
560  case 13:
561  return PARM_VECTOR3;
562  case 14:
563  return PARM_VECTOR3;
564  case 15:
565  return PARM_VECTOR3;
566  case 16:
567  return PARM_VECTOR3;
568  case 17:
569  return PARM_STRING;
570  case 18:
571  return PARM_INTEGER;
572  case 19:
573  return PARM_INTEGER;
574  case 20:
575  return PARM_INTEGER;
576  case 21:
577  return PARM_INTEGER;
578  case 22:
579  return PARM_INTEGER;
580  case 23:
581  return PARM_STRING;
582  case 24:
583  return PARM_INTEGER;
584 
585  }
586  return PARM_UNSUPPORTED;
587  }
588 
589  // Boiler plate to load individual types.
590  static void loadData(UT_IStream &is, int64 &v)
591  { is.bread(&v, 1); }
592  static void loadData(UT_IStream &is, bool &v)
593  { int64 iv; is.bread(&iv, 1); v = iv; }
594  static void loadData(UT_IStream &is, fpreal64 &v)
595  { is.bread<fpreal64>(&v, 1); }
596  static void loadData(UT_IStream &is, UT_Vector2D &v)
597  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
598  static void loadData(UT_IStream &is, UT_Vector3D &v)
599  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
600  is.bread<fpreal64>(&v.z(), 1); }
601  static void loadData(UT_IStream &is, UT_Vector4D &v)
602  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
603  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
604  static void loadData(UT_IStream &is, UT_Matrix2D &v)
605  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
606  static void loadData(UT_IStream &is, UT_Matrix3D &v)
607  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
608  static void loadData(UT_IStream &is, UT_Matrix4D &v)
609  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
610  static void loadData(UT_IStream &is, UT_Vector2I &v)
611  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
612  static void loadData(UT_IStream &is, UT_Vector3I &v)
613  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
614  is.bread<int64>(&v.z(), 1); }
615  static void loadData(UT_IStream &is, UT_Vector4I &v)
616  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
617  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
619  { is.bread(v); }
621  { UT_StringHolder rampdata;
622  loadData(is, rampdata);
623  if (rampdata.isstring())
624  {
625  v.reset(new UT_Ramp());
626  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
627  v->load(istr);
628  }
629  else v.reset();
630  }
633  loadData(is, data);
634  if (data.isstring())
635  {
636  // Find the data type.
637  char *colon = UT_StringWrap(data).findChar(':');
638  if (colon)
639  {
640  int typelen = colon - data.buffer();
642  type.strncpy(data.buffer(), typelen);
643  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
644 
645  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
646  }
647  }
648  else v.reset();
649  }
650 
651  static void saveData(std::ostream &os, int64 v)
652  { UTwrite(os, &v); }
653  static void saveData(std::ostream &os, bool v)
654  { int64 iv = v; UTwrite(os, &iv); }
655  static void saveData(std::ostream &os, fpreal64 v)
656  { UTwrite<fpreal64>(os, &v); }
657  static void saveData(std::ostream &os, UT_Vector2D v)
658  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
659  static void saveData(std::ostream &os, UT_Vector3D v)
660  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
661  UTwrite<fpreal64>(os, &v.z()); }
662  static void saveData(std::ostream &os, UT_Vector4D v)
663  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
664  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
665  static void saveData(std::ostream &os, UT_Matrix2D v)
667  static void saveData(std::ostream &os, UT_Matrix3D v)
669  static void saveData(std::ostream &os, UT_Matrix4D v)
671  static void saveData(std::ostream &os, UT_StringHolder s)
672  { UT_StringWrap(s).saveBinary(os); }
673  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
674  { UT_StringHolder result;
675  UT_OStringStream ostr;
676  if (s) s->save(ostr);
677  result = ostr.str();
678  saveData(os, result);
679  }
680  static void saveData(std::ostream &os, PRM_DataItemHandle s)
681  { UT_StringHolder result;
682  UT_OStringStream ostr;
683  if (s)
684  {
685  ostr << s->getDataTypeToken();
686  ostr << ":";
687  s->saveBinary(ostr);
688  }
689  result = ostr.str();
690  saveData(os, result);
691  }
692 
693 
694  void save(std::ostream &os) const
695  {
696  int32 v = version();
697  UTwrite(os, &v);
698  saveData(os, myGroup);
699  saveData(os, myGrouptype);
700  saveData(os, myXord);
701  saveData(os, myRord);
702  saveData(os, myT);
703  saveData(os, myR);
704  saveData(os, myS);
705  saveData(os, myShear);
706  saveData(os, myScale);
707  saveData(os, myP);
708  saveData(os, myPr);
709  saveData(os, myPrexform_xord);
710  saveData(os, myPrexform_rord);
711  saveData(os, myPrexform_t);
712  saveData(os, myPrexform_r);
713  saveData(os, myPrexform_s);
714  saveData(os, myPrexform_shear);
715  saveData(os, myAttribs);
716  saveData(os, myUpdatenmls);
717  saveData(os, myUpdateaffectednmls);
718  saveData(os, myVlength);
719  saveData(os, myInvertxform);
720  saveData(os, myAddattrib);
721  saveData(os, myOutputattrib);
722  saveData(os, myOutputmerge);
723 
724  }
725 
726  bool load(UT_IStream &is)
727  {
728  int32 v;
729  is.bread(&v, 1);
730  if (version() != v)
731  {
732  // Fail incompatible versions
733  return false;
734  }
735  loadData(is, myGroup);
736  loadData(is, myGrouptype);
737  loadData(is, myXord);
738  loadData(is, myRord);
739  loadData(is, myT);
740  loadData(is, myR);
741  loadData(is, myS);
742  loadData(is, myShear);
743  loadData(is, myScale);
744  loadData(is, myP);
745  loadData(is, myPr);
746  loadData(is, myPrexform_xord);
747  loadData(is, myPrexform_rord);
748  loadData(is, myPrexform_t);
749  loadData(is, myPrexform_r);
750  loadData(is, myPrexform_s);
751  loadData(is, myPrexform_shear);
752  loadData(is, myAttribs);
753  loadData(is, myUpdatenmls);
754  loadData(is, myUpdateaffectednmls);
755  loadData(is, myVlength);
756  loadData(is, myInvertxform);
757  loadData(is, myAddattrib);
758  loadData(is, myOutputattrib);
759  loadData(is, myOutputmerge);
760 
761  return true;
762  }
763 
764  const UT_StringHolder & getGroup() const { return myGroup; }
765  void setGroup(const UT_StringHolder & val) { myGroup = val; }
767  {
768  SOP_Node *thissop = cookparms.getNode();
769  if (!thissop) return getGroup();
770  UT_StringHolder result;
771  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
772  return result;
773  }
774  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
775  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
777  {
778  SOP_Node *thissop = cookparms.getNode();
779  if (!thissop) return getGrouptype();
780  int64 result;
781  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
782  return Grouptype(result);
783  }
784  Xord getXord() const { return Xord(myXord); }
785  void setXord(Xord val) { myXord = int64(val); }
786  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
787  {
788  SOP_Node *thissop = cookparms.getNode();
789  if (!thissop) return getXord();
790  int64 result;
791  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
792  return Xord(result);
793  }
794  Rord getRord() const { return Rord(myRord); }
795  void setRord(Rord val) { myRord = int64(val); }
796  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
797  {
798  SOP_Node *thissop = cookparms.getNode();
799  if (!thissop) return getRord();
800  int64 result;
801  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
802  return Rord(result);
803  }
804  UT_Vector3D getT() const { return myT; }
805  void setT(UT_Vector3D val) { myT = val; }
806  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
807  {
808  SOP_Node *thissop = cookparms.getNode();
809  if (!thissop) return getT();
810  UT_Vector3D result;
811  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
812  return result;
813  }
814  UT_Vector3D getR() const { return myR; }
815  void setR(UT_Vector3D val) { myR = val; }
816  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
817  {
818  SOP_Node *thissop = cookparms.getNode();
819  if (!thissop) return getR();
820  UT_Vector3D result;
821  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
822  return result;
823  }
824  UT_Vector3D getS() const { return myS; }
825  void setS(UT_Vector3D val) { myS = val; }
826  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
827  {
828  SOP_Node *thissop = cookparms.getNode();
829  if (!thissop) return getS();
830  UT_Vector3D result;
831  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
832  return result;
833  }
834  UT_Vector3D getShear() const { return myShear; }
835  void setShear(UT_Vector3D val) { myShear = val; }
837  {
838  SOP_Node *thissop = cookparms.getNode();
839  if (!thissop) return getShear();
840  UT_Vector3D result;
841  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
842  return result;
843  }
844  fpreal64 getScale() const { return myScale; }
845  void setScale(fpreal64 val) { myScale = val; }
846  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
847  {
848  SOP_Node *thissop = cookparms.getNode();
849  if (!thissop) return getScale();
850  fpreal64 result;
851  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
852  return result;
853  }
854  UT_Vector3D getP() const { return myP; }
855  void setP(UT_Vector3D val) { myP = val; }
856  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
857  {
858  SOP_Node *thissop = cookparms.getNode();
859  if (!thissop) return getP();
860  UT_Vector3D result;
861  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
862  return result;
863  }
864  UT_Vector3D getPr() const { return myPr; }
865  void setPr(UT_Vector3D val) { myPr = val; }
866  UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
867  {
868  SOP_Node *thissop = cookparms.getNode();
869  if (!thissop) return getPr();
870  UT_Vector3D result;
871  OP_Utils::evalOpParm(result, thissop, "pr", cookparms.getCookTime(), 0);
872  return result;
873  }
874  Prexform_xord getPrexform_xord() const { return Prexform_xord(myPrexform_xord); }
875  void setPrexform_xord(Prexform_xord val) { myPrexform_xord = int64(val); }
877  {
878  SOP_Node *thissop = cookparms.getNode();
879  if (!thissop) return getPrexform_xord();
880  int64 result;
881  OP_Utils::evalOpParm(result, thissop, "prexform_xOrd", cookparms.getCookTime(), 0);
882  return Prexform_xord(result);
883  }
884  Prexform_rord getPrexform_rord() const { return Prexform_rord(myPrexform_rord); }
885  void setPrexform_rord(Prexform_rord val) { myPrexform_rord = int64(val); }
887  {
888  SOP_Node *thissop = cookparms.getNode();
889  if (!thissop) return getPrexform_rord();
890  int64 result;
891  OP_Utils::evalOpParm(result, thissop, "prexform_rOrd", cookparms.getCookTime(), 0);
892  return Prexform_rord(result);
893  }
894  UT_Vector3D getPrexform_t() const { return myPrexform_t; }
895  void setPrexform_t(UT_Vector3D val) { myPrexform_t = val; }
897  {
898  SOP_Node *thissop = cookparms.getNode();
899  if (!thissop) return getPrexform_t();
900  UT_Vector3D result;
901  OP_Utils::evalOpParm(result, thissop, "prexform_t", cookparms.getCookTime(), 0);
902  return result;
903  }
904  UT_Vector3D getPrexform_r() const { return myPrexform_r; }
905  void setPrexform_r(UT_Vector3D val) { myPrexform_r = val; }
907  {
908  SOP_Node *thissop = cookparms.getNode();
909  if (!thissop) return getPrexform_r();
910  UT_Vector3D result;
911  OP_Utils::evalOpParm(result, thissop, "prexform_r", cookparms.getCookTime(), 0);
912  return result;
913  }
914  UT_Vector3D getPrexform_s() const { return myPrexform_s; }
915  void setPrexform_s(UT_Vector3D val) { myPrexform_s = val; }
917  {
918  SOP_Node *thissop = cookparms.getNode();
919  if (!thissop) return getPrexform_s();
920  UT_Vector3D result;
921  OP_Utils::evalOpParm(result, thissop, "prexform_s", cookparms.getCookTime(), 0);
922  return result;
923  }
924  UT_Vector3D getPrexform_shear() const { return myPrexform_shear; }
925  void setPrexform_shear(UT_Vector3D val) { myPrexform_shear = val; }
927  {
928  SOP_Node *thissop = cookparms.getNode();
929  if (!thissop) return getPrexform_shear();
930  UT_Vector3D result;
931  OP_Utils::evalOpParm(result, thissop, "prexform_shear", cookparms.getCookTime(), 0);
932  return result;
933  }
934  const UT_StringHolder & getAttribs() const { return myAttribs; }
935  void setAttribs(const UT_StringHolder & val) { myAttribs = val; }
937  {
938  SOP_Node *thissop = cookparms.getNode();
939  if (!thissop) return getAttribs();
940  UT_StringHolder result;
941  OP_Utils::evalOpParm(result, thissop, "attribs", cookparms.getCookTime(), 0);
942  return result;
943  }
944  bool getUpdatenmls() const { return myUpdatenmls; }
945  void setUpdatenmls(bool val) { myUpdatenmls = val; }
946  bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
947  {
948  SOP_Node *thissop = cookparms.getNode();
949  if (!thissop) return getUpdatenmls();
950  bool result;
951  OP_Utils::evalOpParm(result, thissop, "updatenmls", cookparms.getCookTime(), 0);
952  return result;
953  }
954  bool getUpdateaffectednmls() const { return myUpdateaffectednmls; }
955  void setUpdateaffectednmls(bool val) { myUpdateaffectednmls = val; }
956  bool opUpdateaffectednmls(const SOP_NodeVerb::CookParms &cookparms) const
957  {
958  SOP_Node *thissop = cookparms.getNode();
959  if (!thissop) return getUpdateaffectednmls();
960  bool result;
961  OP_Utils::evalOpParm(result, thissop, "updateaffectednmls", cookparms.getCookTime(), 0);
962  return result;
963  }
964  bool getVlength() const { return myVlength; }
965  void setVlength(bool val) { myVlength = val; }
966  bool opVlength(const SOP_NodeVerb::CookParms &cookparms) const
967  {
968  SOP_Node *thissop = cookparms.getNode();
969  if (!thissop) return getVlength();
970  bool result;
971  OP_Utils::evalOpParm(result, thissop, "vlength", cookparms.getCookTime(), 0);
972  return result;
973  }
974  bool getInvertxform() const { return myInvertxform; }
975  void setInvertxform(bool val) { myInvertxform = val; }
976  bool opInvertxform(const SOP_NodeVerb::CookParms &cookparms) const
977  {
978  SOP_Node *thissop = cookparms.getNode();
979  if (!thissop) return getInvertxform();
980  bool result;
981  OP_Utils::evalOpParm(result, thissop, "invertxform", cookparms.getCookTime(), 0);
982  return result;
983  }
984  bool getAddattrib() const { return myAddattrib; }
985  void setAddattrib(bool val) { myAddattrib = val; }
986  bool opAddattrib(const SOP_NodeVerb::CookParms &cookparms) const
987  {
988  SOP_Node *thissop = cookparms.getNode();
989  if (!thissop) return getAddattrib();
990  bool result;
991  OP_Utils::evalOpParm(result, thissop, "addattrib", cookparms.getCookTime(), 0);
992  return result;
993  }
994  const UT_StringHolder & getOutputattrib() const { return myOutputattrib; }
995  void setOutputattrib(const UT_StringHolder & val) { myOutputattrib = val; }
997  {
998  SOP_Node *thissop = cookparms.getNode();
999  if (!thissop) return getOutputattrib();
1000  UT_StringHolder result;
1001  OP_Utils::evalOpParm(result, thissop, "outputattrib", cookparms.getCookTime(), 0);
1002  return result;
1003  }
1004  Outputmerge getOutputmerge() const { return Outputmerge(myOutputmerge); }
1005  void setOutputmerge(Outputmerge val) { myOutputmerge = int64(val); }
1007  {
1008  SOP_Node *thissop = cookparms.getNode();
1009  if (!thissop) return getOutputmerge();
1010  int64 result;
1011  OP_Utils::evalOpParm(result, thissop, "outputmerge", cookparms.getCookTime(), 0);
1012  return Outputmerge(result);
1013  }
1014 
1015 private:
1016  UT_StringHolder myGroup;
1017  int64 myGrouptype;
1018  int64 myXord;
1019  int64 myRord;
1020  UT_Vector3D myT;
1021  UT_Vector3D myR;
1022  UT_Vector3D myS;
1023  UT_Vector3D myShear;
1024  fpreal64 myScale;
1025  UT_Vector3D myP;
1026  UT_Vector3D myPr;
1027  int64 myPrexform_xord;
1028  int64 myPrexform_rord;
1029  UT_Vector3D myPrexform_t;
1030  UT_Vector3D myPrexform_r;
1031  UT_Vector3D myPrexform_s;
1032  UT_Vector3D myPrexform_shear;
1033  UT_StringHolder myAttribs;
1034  bool myUpdatenmls;
1035  bool myUpdateaffectednmls;
1036  bool myVlength;
1037  bool myInvertxform;
1038  bool myAddattrib;
1039  UT_StringHolder myOutputattrib;
1040  int64 myOutputmerge;
1041 
1042 };
static void saveData(std::ostream &os, bool v)
bool getInvertxform() const
UT_Vector3D getShear() const
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opPrexform_r(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setOutputmerge(Outputmerge val)
void setParmValue(exint idx, const UT_Matrix4D &value)
void setParmValue(exint idx, const exint &value)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
const UT_StringHolder & getOutputattrib() const
T & z(void)
Definition: UT_Vector4.h:379
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, fpreal &value) const
void setInvertxform(bool val)
Grouptype getGrouptype() const
virtual const char * getParmName(exint fieldnum) const
Prexform_rord opPrexform_rord(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void setPr(UT_Vector3D val)
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
bool getUpdatenmls() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setOutputattrib(const UT_StringHolder &val)
bool getUpdateaffectednmls() const
static void loadData(UT_IStream &is, fpreal64 &v)
void getParmValue(exint idx, exint &value) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void setParmValue(exint idx, const UT_Vector3D &value)
void setPrexform_s(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getParmValue(exint idx, UT_Vector4D &value) const
Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setUpdateaffectednmls(bool val)
bool operator!=(const SOP_TransformParms &src) const
void setPrexform_t(UT_Vector3D val)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void getParmValue(exint idx, UT_Matrix3D &value) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
UT_Vector3D getPr() const
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
bool opVlength(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void setAddattrib(bool val)
void setPrexform_rord(Prexform_rord val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool opAddattrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getAttribs() const
void setAttribs(const UT_StringHolder &val)
static void loadData(UT_IStream &is, int64 &v)
bool opUpdateaffectednmls(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(exint idx, T &value) const
UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
void setR(UT_Vector3D val)
UT_Vector3D opPrexform_t(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
void setPrexform_xord(Prexform_xord val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setS(UT_Vector3D val)
long long int64
Definition: SYS_Types.h:107
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setP(UT_Vector3D val)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
UT_Vector3D opPrexform_s(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opShear(const SOP_NodeVerb::CookParms &cookparms) const
bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
virtual exint getNumParms() const
static void saveData(std::ostream &os, UT_Vector2D v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
UT_Vector3D getS() const
void setUpdatenmls(bool val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
int64 exint
Definition: SYS_Types.h:116
void setParmValue(exint idx, const UT_Vector4D &value)
static void loadData(UT_IStream &is, UT_StringHolder &v)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
void setParmValue(exint idx, const fpreal &value)
double fpreal64
Definition: SYS_Types.h:192
const UT_StringHolder & getGroup() const
void setScale(fpreal64 val)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setPrexform_shear(UT_Vector3D val)
bool opInvertxform(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getPrexform_s() const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setParmValue(exint idx, const UT_StringHolder &value)
UT_Vector3T< fpreal64 > UT_Vector3D
GLboolean * data
Definition: glcorearb.h:130
void getParmValue(exint idx, UT_Vector3D &value) const
void getParmValue(exint idx, UT_Matrix4D &value) const
static void saveData(std::ostream &os, UT_Matrix2D v)
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
bool getAddattrib() const
void setGroup(const UT_StringHolder &val)
bool operator==(const SOP_TransformParms &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
Prexform_xord opPrexform_xord(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_Vector3D getR() const
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix2D &v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void loadData(UT_IStream &is, bool &v)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
void setGrouptype(Grouptype val)
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
void getParmValue(exint idx, UT_Vector2D &value) const
void setVlength(bool val)
UT_StringHolder opOutputattrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)
UT_Vector3D getPrexform_shear() const
UT_Vector3D getP() const
void doSetParmValue(exint idx, const T &value)
void setParmValue(exint idx, const UT_Matrix2D &value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
UT_Vector3D getPrexform_r() const
void save(std::ostream &os) const
void setShear(UT_Vector3D val)
GLuint GLfloat * val
Definition: glcorearb.h:1607
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:665
void setParmValue(exint idx, const UT_Matrix3D &value)
#define SOP_API
Definition: SOP_API.h:10
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getParmValue(exint idx, UT_Matrix2D &value) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
T & x(void)
Definition: UT_Vector4.h:375
UT_StringHolder opAttribs(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
T & y(void)
Definition: UT_Vector2.h:287
Outputmerge opOutputmerge(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getScale() const
UT_Vector3D opPrexform_shear(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1221
void setParmValue(exint idx, const UT_Vector2D &value)
T & w(void)
Definition: UT_Vector4.h:381
void setT(UT_Vector3D val)
static void saveData(std::ostream &os, UT_Vector4D v)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void loadData(UT_IStream &is, UT_Vector2D &v)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
UT_Vector3D getPrexform_t() const
bool load(UT_IStream &is)
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
void setPrexform_r(UT_Vector3D val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
Outputmerge getOutputmerge() const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_StringHolder s)
virtual ParmType getParmType(exint fieldnum) const
Prexform_xord getPrexform_xord() const
UT_Vector3D getT() const
GLenum src
Definition: glcorearb.h:1792
Prexform_rord getPrexform_rord() const