HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 }
68 
69 
71 {
72 public:
73  static int version() { return 1; }
74 
76  {
77  myGroup = ""_sh;
78  myGrouptype = 0;
79  myXord = 0;
80  myRord = 0;
81  myT = UT_Vector3D(0,0,0);
82  myR = UT_Vector3D(0,0,0);
83  myS = UT_Vector3D(1,1,1);
84  myShear = UT_Vector3D(0,0,0);
85  myScale = 1;
86  myP = UT_Vector3D(0,0,0);
87  myPr = UT_Vector3D(0,0,0);
88  myPrexform_xord = 0;
89  myPrexform_rord = 0;
90  myPrexform_t = UT_Vector3D(0,0,0);
91  myPrexform_r = UT_Vector3D(0,0,0);
92  myPrexform_s = UT_Vector3D(1,1,1);
93  myPrexform_shear = UT_Vector3D(0,0,0);
94  myAttribs = "*"_sh;
95  myUpdatenmls = false;
96  myUpdateaffectednmls = true;
97  myVlength = true;
98  myInvertxform = false;
99 
100  }
101 
102  explicit SOP_TransformParms(const SOP_TransformParms &) = default;
103 
104  virtual ~SOP_TransformParms() {}
105 
106  bool operator==(const SOP_TransformParms &src) const
107  {
108  if (myGroup != src.myGroup) return false;
109  if (myGrouptype != src.myGrouptype) 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 (myScale != src.myScale) return false;
117  if (myP != src.myP) return false;
118  if (myPr != src.myPr) return false;
119  if (myPrexform_xord != src.myPrexform_xord) return false;
120  if (myPrexform_rord != src.myPrexform_rord) return false;
121  if (myPrexform_t != src.myPrexform_t) return false;
122  if (myPrexform_r != src.myPrexform_r) return false;
123  if (myPrexform_s != src.myPrexform_s) return false;
124  if (myPrexform_shear != src.myPrexform_shear) return false;
125  if (myAttribs != src.myAttribs) return false;
126  if (myUpdatenmls != src.myUpdatenmls) return false;
127  if (myUpdateaffectednmls != src.myUpdateaffectednmls) return false;
128  if (myVlength != src.myVlength) return false;
129  if (myInvertxform != src.myInvertxform) return false;
130 
131  return true;
132  }
138 
139 
140 
141  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
142  {
143  if (true)
144  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
145  else myGroup = ""_sh;
146  if (true)
147  OP_Utils::evalOpParm(myGrouptype, node, "grouptype", time, 0);
148  else myGrouptype = 0;
149  if (true)
150  OP_Utils::evalOpParm(myXord, node, "xOrd", time, 0);
151  else myXord = 0;
152  if (true)
153  OP_Utils::evalOpParm(myRord, node, "rOrd", time, 0);
154  else myRord = 0;
155  if (true)
156  OP_Utils::evalOpParm(myT, node, "t", time, 0);
157  else myT = UT_Vector3D(0,0,0);
158  if (true)
159  OP_Utils::evalOpParm(myR, node, "r", time, 0);
160  else myR = UT_Vector3D(0,0,0);
161  if (true)
162  OP_Utils::evalOpParm(myS, node, "s", time, 0);
163  else myS = UT_Vector3D(1,1,1);
164  if (true)
165  OP_Utils::evalOpParm(myShear, node, "shear", time, 0);
166  else myShear = UT_Vector3D(0,0,0);
167  if (true)
168  OP_Utils::evalOpParm(myScale, node, "scale", time, 0);
169  else myScale = 1;
170  if (true)
171  OP_Utils::evalOpParm(myP, node, "p", time, 0);
172  else myP = UT_Vector3D(0,0,0);
173  if (true)
174  OP_Utils::evalOpParm(myPr, node, "pr", time, 0);
175  else myPr = UT_Vector3D(0,0,0);
176  if (true)
177  OP_Utils::evalOpParm(myPrexform_xord, node, "prexform_xOrd", time, 0);
178  else myPrexform_xord = 0;
179  if (true)
180  OP_Utils::evalOpParm(myPrexform_rord, node, "prexform_rOrd", time, 0);
181  else myPrexform_rord = 0;
182  if (true)
183  OP_Utils::evalOpParm(myPrexform_t, node, "prexform_t", time, 0);
184  else myPrexform_t = UT_Vector3D(0,0,0);
185  if (true)
186  OP_Utils::evalOpParm(myPrexform_r, node, "prexform_r", time, 0);
187  else myPrexform_r = UT_Vector3D(0,0,0);
188  if (true)
189  OP_Utils::evalOpParm(myPrexform_s, node, "prexform_s", time, 0);
190  else myPrexform_s = UT_Vector3D(1,1,1);
191  if (true)
192  OP_Utils::evalOpParm(myPrexform_shear, node, "prexform_shear", time, 0);
193  else myPrexform_shear = UT_Vector3D(0,0,0);
194  if (true)
195  OP_Utils::evalOpParm(myAttribs, node, "attribs", time, 0);
196  else myAttribs = "*"_sh;
197  if (true)
198  OP_Utils::evalOpParm(myUpdatenmls, node, "updatenmls", time, 0);
199  else myUpdatenmls = false;
200  if (true && ( (!(((getUpdatenmls()==1)))) ) )
201  OP_Utils::evalOpParm(myUpdateaffectednmls, node, "updateaffectednmls", time, 0);
202  else myUpdateaffectednmls = true;
203  if (true && ( (!(((getUpdatenmls()==1)))) ) )
204  OP_Utils::evalOpParm(myVlength, node, "vlength", time, 0);
205  else myVlength = true;
206  if (true)
207  OP_Utils::evalOpParm(myInvertxform, node, "invertxform", time, 0);
208  else myInvertxform = false;
209 
210  }
211 
212 
213  virtual void loadFromOpSubclass(const LoadParms &loadparms)
214  {
215  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
216  }
217 
218 
219  virtual void copyFrom(const SOP_NodeParms *src)
220  {
221  *this = *((const SOP_TransformParms *)src);
222  }
223 
224  template <typename T>
225  void
226  doGetParmValue(exint idx, T &value) const
227  {
228  switch (idx)
229  {
230  case 0:
231  coerceValue(value, myGroup);
232  break;
233  case 1:
234  coerceValue(value, myGrouptype);
235  break;
236  case 2:
237  coerceValue(value, myXord);
238  break;
239  case 3:
240  coerceValue(value, myRord);
241  break;
242  case 4:
243  coerceValue(value, myT);
244  break;
245  case 5:
246  coerceValue(value, myR);
247  break;
248  case 6:
249  coerceValue(value, myS);
250  break;
251  case 7:
252  coerceValue(value, myShear);
253  break;
254  case 8:
255  coerceValue(value, myScale);
256  break;
257  case 9:
258  coerceValue(value, myP);
259  break;
260  case 10:
261  coerceValue(value, myPr);
262  break;
263  case 11:
264  coerceValue(value, myPrexform_xord);
265  break;
266  case 12:
267  coerceValue(value, myPrexform_rord);
268  break;
269  case 13:
270  coerceValue(value, myPrexform_t);
271  break;
272  case 14:
273  coerceValue(value, myPrexform_r);
274  break;
275  case 15:
276  coerceValue(value, myPrexform_s);
277  break;
278  case 16:
279  coerceValue(value, myPrexform_shear);
280  break;
281  case 17:
282  coerceValue(value, myAttribs);
283  break;
284  case 18:
285  coerceValue(value, myUpdatenmls);
286  break;
287  case 19:
288  coerceValue(value, myUpdateaffectednmls);
289  break;
290  case 20:
291  coerceValue(value, myVlength);
292  break;
293  case 21:
294  coerceValue(value, myInvertxform);
295  break;
296 
297  }
298  }
299 
300  void getParmValue(exint idx, exint &value) const
301  { doGetParmValue(idx, value); }
302  void getParmValue(exint idx, fpreal &value) const
303  { doGetParmValue(idx, value); }
305  { doGetParmValue(idx, value); }
307  { doGetParmValue(idx, value); }
309  { doGetParmValue(idx, value); }
311  { doGetParmValue(idx, value); }
313  { doGetParmValue(idx, value); }
315  { doGetParmValue(idx, value); }
317  { doGetParmValue(idx, value); }
319  { doGetParmValue(idx, value); }
321  { doGetParmValue(idx, value); }
322 
323  template <typename T>
324  void
325  doSetParmValue(exint idx, const T &value)
326  {
327  switch (idx)
328  {
329  case 0:
330  coerceValue(myGroup, value);
331  break;
332  case 1:
333  coerceValue(myGrouptype, value);
334  break;
335  case 2:
336  coerceValue(myXord, value);
337  break;
338  case 3:
339  coerceValue(myRord, value);
340  break;
341  case 4:
342  coerceValue(myT, value);
343  break;
344  case 5:
345  coerceValue(myR, value);
346  break;
347  case 6:
348  coerceValue(myS, value);
349  break;
350  case 7:
351  coerceValue(myShear, value);
352  break;
353  case 8:
354  coerceValue(myScale, value);
355  break;
356  case 9:
357  coerceValue(myP, value);
358  break;
359  case 10:
360  coerceValue(myPr, value);
361  break;
362  case 11:
363  coerceValue(myPrexform_xord, value);
364  break;
365  case 12:
366  coerceValue(myPrexform_rord, value);
367  break;
368  case 13:
369  coerceValue(myPrexform_t, value);
370  break;
371  case 14:
372  coerceValue(myPrexform_r, value);
373  break;
374  case 15:
375  coerceValue(myPrexform_s, value);
376  break;
377  case 16:
378  coerceValue(myPrexform_shear, value);
379  break;
380  case 17:
381  coerceValue(myAttribs, value);
382  break;
383  case 18:
384  coerceValue(myUpdatenmls, value);
385  break;
386  case 19:
387  coerceValue(myUpdateaffectednmls, value);
388  break;
389  case 20:
390  coerceValue(myVlength, value);
391  break;
392  case 21:
393  coerceValue(myInvertxform, value);
394  break;
395 
396  }
397  }
398 
399  void setParmValue(exint idx, const exint &value)
400  { doSetParmValue(idx, value); }
401  void setParmValue(exint idx, const fpreal &value)
402  { doSetParmValue(idx, value); }
403  void setParmValue(exint idx, const UT_Vector2D &value)
404  { doSetParmValue(idx, value); }
405  void setParmValue(exint idx, const UT_Vector3D &value)
406  { doSetParmValue(idx, value); }
407  void setParmValue(exint idx, const UT_Vector4D &value)
408  { doSetParmValue(idx, value); }
409  void setParmValue(exint idx, const UT_Matrix2D &value)
410  { doSetParmValue(idx, value); }
411  void setParmValue(exint idx, const UT_Matrix3D &value)
412  { doSetParmValue(idx, value); }
413  void setParmValue(exint idx, const UT_Matrix4D &value)
414  { doSetParmValue(idx, value); }
416  { doSetParmValue(idx, value); }
418  { doSetParmValue(idx, value); }
420  { doSetParmValue(idx, value); }
421 
422  virtual exint getNumParms() const
423  {
424  return 22;
425  }
426 
427  virtual const char *getParmName(exint fieldnum) const
428  {
429  switch (fieldnum)
430  {
431  case 0:
432  return "group";
433  case 1:
434  return "grouptype";
435  case 2:
436  return "xOrd";
437  case 3:
438  return "rOrd";
439  case 4:
440  return "t";
441  case 5:
442  return "r";
443  case 6:
444  return "s";
445  case 7:
446  return "shear";
447  case 8:
448  return "scale";
449  case 9:
450  return "p";
451  case 10:
452  return "pr";
453  case 11:
454  return "prexform_xOrd";
455  case 12:
456  return "prexform_rOrd";
457  case 13:
458  return "prexform_t";
459  case 14:
460  return "prexform_r";
461  case 15:
462  return "prexform_s";
463  case 16:
464  return "prexform_shear";
465  case 17:
466  return "attribs";
467  case 18:
468  return "updatenmls";
469  case 19:
470  return "updateaffectednmls";
471  case 20:
472  return "vlength";
473  case 21:
474  return "invertxform";
475 
476  }
477  return 0;
478  }
479 
480  virtual ParmType getParmType(exint fieldnum) const
481  {
482  switch (fieldnum)
483  {
484  case 0:
485  return PARM_STRING;
486  case 1:
487  return PARM_INTEGER;
488  case 2:
489  return PARM_INTEGER;
490  case 3:
491  return PARM_INTEGER;
492  case 4:
493  return PARM_VECTOR3;
494  case 5:
495  return PARM_VECTOR3;
496  case 6:
497  return PARM_VECTOR3;
498  case 7:
499  return PARM_VECTOR3;
500  case 8:
501  return PARM_FLOAT;
502  case 9:
503  return PARM_VECTOR3;
504  case 10:
505  return PARM_VECTOR3;
506  case 11:
507  return PARM_INTEGER;
508  case 12:
509  return PARM_INTEGER;
510  case 13:
511  return PARM_VECTOR3;
512  case 14:
513  return PARM_VECTOR3;
514  case 15:
515  return PARM_VECTOR3;
516  case 16:
517  return PARM_VECTOR3;
518  case 17:
519  return PARM_STRING;
520  case 18:
521  return PARM_INTEGER;
522  case 19:
523  return PARM_INTEGER;
524  case 20:
525  return PARM_INTEGER;
526  case 21:
527  return PARM_INTEGER;
528 
529  }
530  return PARM_UNSUPPORTED;
531  }
532 
533  // Boiler plate to load individual types.
534  static void loadData(UT_IStream &is, int64 &v)
535  { is.bread(&v, 1); }
536  static void loadData(UT_IStream &is, bool &v)
537  { int64 iv; is.bread(&iv, 1); v = iv; }
538  static void loadData(UT_IStream &is, fpreal64 &v)
539  { is.bread<fpreal64>(&v, 1); }
540  static void loadData(UT_IStream &is, UT_Vector2D &v)
541  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
542  static void loadData(UT_IStream &is, UT_Vector3D &v)
543  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
544  is.bread<fpreal64>(&v.z(), 1); }
545  static void loadData(UT_IStream &is, UT_Vector4D &v)
546  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
547  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
548  static void loadData(UT_IStream &is, UT_Matrix2D &v)
549  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
550  static void loadData(UT_IStream &is, UT_Matrix3D &v)
551  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
552  static void loadData(UT_IStream &is, UT_Matrix4D &v)
553  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
554  static void loadData(UT_IStream &is, UT_Vector2I &v)
555  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
556  static void loadData(UT_IStream &is, UT_Vector3I &v)
557  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
558  is.bread<int64>(&v.z(), 1); }
559  static void loadData(UT_IStream &is, UT_Vector4I &v)
560  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
561  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
563  { is.bread(v); }
565  { UT_StringHolder rampdata;
566  loadData(is, rampdata);
567  if (rampdata.isstring())
568  {
569  v.reset(new UT_Ramp());
570  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
571  v->load(istr);
572  }
573  else v.reset();
574  }
577  loadData(is, data);
578  if (data.isstring())
579  {
580  // Find the data type.
581  char *colon = UT_StringWrap(data).findChar(':');
582  if (colon)
583  {
584  int typelen = colon - data.buffer();
586  type.strncpy(data.buffer(), typelen);
587  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
588 
589  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
590  }
591  }
592  else v.reset();
593  }
594 
595  static void saveData(std::ostream &os, int64 v)
596  { UTwrite(os, &v); }
597  static void saveData(std::ostream &os, bool v)
598  { int64 iv = v; UTwrite(os, &iv); }
599  static void saveData(std::ostream &os, fpreal64 v)
600  { UTwrite<fpreal64>(os, &v); }
601  static void saveData(std::ostream &os, UT_Vector2D v)
602  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
603  static void saveData(std::ostream &os, UT_Vector3D v)
604  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
605  UTwrite<fpreal64>(os, &v.z()); }
606  static void saveData(std::ostream &os, UT_Vector4D v)
607  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
608  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
609  static void saveData(std::ostream &os, UT_Matrix2D v)
611  static void saveData(std::ostream &os, UT_Matrix3D v)
613  static void saveData(std::ostream &os, UT_Matrix4D v)
615  static void saveData(std::ostream &os, UT_StringHolder s)
616  { UT_StringWrap(s).saveBinary(os); }
617  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
618  { UT_StringHolder result;
619  UT_OStringStream ostr;
620  if (s) s->save(ostr);
621  result = ostr.str();
622  saveData(os, result);
623  }
624  static void saveData(std::ostream &os, PRM_DataItemHandle s)
625  { UT_StringHolder result;
626  UT_OStringStream ostr;
627  if (s)
628  {
629  ostr << s->getDataTypeToken();
630  ostr << ":";
631  s->saveBinary(ostr);
632  }
633  result = ostr.str();
634  saveData(os, result);
635  }
636 
637 
638  void save(std::ostream &os) const
639  {
640  int32 v = version();
641  UTwrite(os, &v);
642  saveData(os, myGroup);
643  saveData(os, myGrouptype);
644  saveData(os, myXord);
645  saveData(os, myRord);
646  saveData(os, myT);
647  saveData(os, myR);
648  saveData(os, myS);
649  saveData(os, myShear);
650  saveData(os, myScale);
651  saveData(os, myP);
652  saveData(os, myPr);
653  saveData(os, myPrexform_xord);
654  saveData(os, myPrexform_rord);
655  saveData(os, myPrexform_t);
656  saveData(os, myPrexform_r);
657  saveData(os, myPrexform_s);
658  saveData(os, myPrexform_shear);
659  saveData(os, myAttribs);
660  saveData(os, myUpdatenmls);
661  saveData(os, myUpdateaffectednmls);
662  saveData(os, myVlength);
663  saveData(os, myInvertxform);
664 
665  }
666 
667  bool load(UT_IStream &is)
668  {
669  int32 v;
670  is.bread(&v, 1);
671  if (version() != v)
672  {
673  // Fail incompatible versions
674  return false;
675  }
676  loadData(is, myGroup);
677  loadData(is, myGrouptype);
678  loadData(is, myXord);
679  loadData(is, myRord);
680  loadData(is, myT);
681  loadData(is, myR);
682  loadData(is, myS);
683  loadData(is, myShear);
684  loadData(is, myScale);
685  loadData(is, myP);
686  loadData(is, myPr);
687  loadData(is, myPrexform_xord);
688  loadData(is, myPrexform_rord);
689  loadData(is, myPrexform_t);
690  loadData(is, myPrexform_r);
691  loadData(is, myPrexform_s);
692  loadData(is, myPrexform_shear);
693  loadData(is, myAttribs);
694  loadData(is, myUpdatenmls);
695  loadData(is, myUpdateaffectednmls);
696  loadData(is, myVlength);
697  loadData(is, myInvertxform);
698 
699  return true;
700  }
701 
702  const UT_StringHolder & getGroup() const { return myGroup; }
703  void setGroup(const UT_StringHolder & val) { myGroup = val; }
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getGroup();
708  UT_StringHolder result;
709  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
710  return result;
711  }
712  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
713  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getGrouptype();
718  int64 result;
719  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
720  return Grouptype(result);
721  }
722  Xord getXord() const { return Xord(myXord); }
723  void setXord(Xord val) { myXord = int64(val); }
724  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getXord();
728  int64 result;
729  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
730  return Xord(result);
731  }
732  Rord getRord() const { return Rord(myRord); }
733  void setRord(Rord val) { myRord = int64(val); }
734  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getRord();
738  int64 result;
739  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
740  return Rord(result);
741  }
742  UT_Vector3D getT() const { return myT; }
743  void setT(UT_Vector3D val) { myT = val; }
744  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getT();
748  UT_Vector3D result;
749  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
750  return result;
751  }
752  UT_Vector3D getR() const { return myR; }
753  void setR(UT_Vector3D val) { myR = val; }
754  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getR();
758  UT_Vector3D result;
759  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
760  return result;
761  }
762  UT_Vector3D getS() const { return myS; }
763  void setS(UT_Vector3D val) { myS = val; }
764  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getS();
768  UT_Vector3D result;
769  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
770  return result;
771  }
772  UT_Vector3D getShear() const { return myShear; }
773  void setShear(UT_Vector3D val) { myShear = val; }
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getShear();
778  UT_Vector3D result;
779  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
780  return result;
781  }
782  fpreal64 getScale() const { return myScale; }
783  void setScale(fpreal64 val) { myScale = val; }
784  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getScale();
788  fpreal64 result;
789  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
790  return result;
791  }
792  UT_Vector3D getP() const { return myP; }
793  void setP(UT_Vector3D val) { myP = val; }
794  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getP();
798  UT_Vector3D result;
799  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
800  return result;
801  }
802  UT_Vector3D getPr() const { return myPr; }
803  void setPr(UT_Vector3D val) { myPr = val; }
804  UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getPr();
808  UT_Vector3D result;
809  OP_Utils::evalOpParm(result, thissop, "pr", cookparms.getCookTime(), 0);
810  return result;
811  }
812  Prexform_xord getPrexform_xord() const { return Prexform_xord(myPrexform_xord); }
813  void setPrexform_xord(Prexform_xord val) { myPrexform_xord = int64(val); }
815  {
816  SOP_Node *thissop = cookparms.getNode();
817  if (!thissop) return getPrexform_xord();
818  int64 result;
819  OP_Utils::evalOpParm(result, thissop, "prexform_xOrd", cookparms.getCookTime(), 0);
820  return Prexform_xord(result);
821  }
822  Prexform_rord getPrexform_rord() const { return Prexform_rord(myPrexform_rord); }
823  void setPrexform_rord(Prexform_rord val) { myPrexform_rord = int64(val); }
825  {
826  SOP_Node *thissop = cookparms.getNode();
827  if (!thissop) return getPrexform_rord();
828  int64 result;
829  OP_Utils::evalOpParm(result, thissop, "prexform_rOrd", cookparms.getCookTime(), 0);
830  return Prexform_rord(result);
831  }
832  UT_Vector3D getPrexform_t() const { return myPrexform_t; }
833  void setPrexform_t(UT_Vector3D val) { myPrexform_t = val; }
835  {
836  SOP_Node *thissop = cookparms.getNode();
837  if (!thissop) return getPrexform_t();
838  UT_Vector3D result;
839  OP_Utils::evalOpParm(result, thissop, "prexform_t", cookparms.getCookTime(), 0);
840  return result;
841  }
842  UT_Vector3D getPrexform_r() const { return myPrexform_r; }
843  void setPrexform_r(UT_Vector3D val) { myPrexform_r = val; }
845  {
846  SOP_Node *thissop = cookparms.getNode();
847  if (!thissop) return getPrexform_r();
848  UT_Vector3D result;
849  OP_Utils::evalOpParm(result, thissop, "prexform_r", cookparms.getCookTime(), 0);
850  return result;
851  }
852  UT_Vector3D getPrexform_s() const { return myPrexform_s; }
853  void setPrexform_s(UT_Vector3D val) { myPrexform_s = val; }
855  {
856  SOP_Node *thissop = cookparms.getNode();
857  if (!thissop) return getPrexform_s();
858  UT_Vector3D result;
859  OP_Utils::evalOpParm(result, thissop, "prexform_s", cookparms.getCookTime(), 0);
860  return result;
861  }
862  UT_Vector3D getPrexform_shear() const { return myPrexform_shear; }
863  void setPrexform_shear(UT_Vector3D val) { myPrexform_shear = val; }
865  {
866  SOP_Node *thissop = cookparms.getNode();
867  if (!thissop) return getPrexform_shear();
868  UT_Vector3D result;
869  OP_Utils::evalOpParm(result, thissop, "prexform_shear", cookparms.getCookTime(), 0);
870  return result;
871  }
872  const UT_StringHolder & getAttribs() const { return myAttribs; }
873  void setAttribs(const UT_StringHolder & val) { myAttribs = val; }
875  {
876  SOP_Node *thissop = cookparms.getNode();
877  if (!thissop) return getAttribs();
878  UT_StringHolder result;
879  OP_Utils::evalOpParm(result, thissop, "attribs", cookparms.getCookTime(), 0);
880  return result;
881  }
882  bool getUpdatenmls() const { return myUpdatenmls; }
883  void setUpdatenmls(bool val) { myUpdatenmls = val; }
884  bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
885  {
886  SOP_Node *thissop = cookparms.getNode();
887  if (!thissop) return getUpdatenmls();
888  bool result;
889  OP_Utils::evalOpParm(result, thissop, "updatenmls", cookparms.getCookTime(), 0);
890  return result;
891  }
892  bool getUpdateaffectednmls() const { return myUpdateaffectednmls; }
893  void setUpdateaffectednmls(bool val) { myUpdateaffectednmls = val; }
894  bool opUpdateaffectednmls(const SOP_NodeVerb::CookParms &cookparms) const
895  {
896  SOP_Node *thissop = cookparms.getNode();
897  if (!thissop) return getUpdateaffectednmls();
898  bool result;
899  OP_Utils::evalOpParm(result, thissop, "updateaffectednmls", cookparms.getCookTime(), 0);
900  return result;
901  }
902  bool getVlength() const { return myVlength; }
903  void setVlength(bool val) { myVlength = val; }
904  bool opVlength(const SOP_NodeVerb::CookParms &cookparms) const
905  {
906  SOP_Node *thissop = cookparms.getNode();
907  if (!thissop) return getVlength();
908  bool result;
909  OP_Utils::evalOpParm(result, thissop, "vlength", cookparms.getCookTime(), 0);
910  return result;
911  }
912  bool getInvertxform() const { return myInvertxform; }
913  void setInvertxform(bool val) { myInvertxform = val; }
914  bool opInvertxform(const SOP_NodeVerb::CookParms &cookparms) const
915  {
916  SOP_Node *thissop = cookparms.getNode();
917  if (!thissop) return getInvertxform();
918  bool result;
919  OP_Utils::evalOpParm(result, thissop, "invertxform", cookparms.getCookTime(), 0);
920  return result;
921  }
922 
923 private:
924  UT_StringHolder myGroup;
925  int64 myGrouptype;
926  int64 myXord;
927  int64 myRord;
928  UT_Vector3D myT;
929  UT_Vector3D myR;
930  UT_Vector3D myS;
931  UT_Vector3D myShear;
932  fpreal64 myScale;
933  UT_Vector3D myP;
934  UT_Vector3D myPr;
935  int64 myPrexform_xord;
936  int64 myPrexform_rord;
937  UT_Vector3D myPrexform_t;
938  UT_Vector3D myPrexform_r;
939  UT_Vector3D myPrexform_s;
940  UT_Vector3D myPrexform_shear;
941  UT_StringHolder myAttribs;
942  bool myUpdatenmls;
943  bool myUpdateaffectednmls;
944  bool myVlength;
945  bool myInvertxform;
946 
947 };
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 setParmValue(exint idx, const UT_Matrix4D &value)
void setParmValue(exint idx, const exint &value)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
T & z(void)
Definition: UT_Vector4.h:372
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)
void setPr(UT_Vector3D val)
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
bool getUpdatenmls() const
static void saveData(std::ostream &os, UT_Vector3D v)
bool getUpdateaffectednmls() const
static void loadData(UT_IStream &is, fpreal64 &v)
void getParmValue(exint idx, exint &value) const
T & x(void)
Definition: UT_Vector2.h:284
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)
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:581
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 setPrexform_rord(Prexform_rord val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
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:585
void setPrexform_xord(Prexform_xord val)
void setS(UT_Vector3D val)
long long int64
Definition: SYS_Types.h:100
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
int64 exint
Definition: SYS_Types.h:109
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:185
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:28
T & y(void)
Definition: UT_Vector4.h:370
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
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:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:263
void strncpy(const char *src, exint maxlen)
void getParmValue(exint idx, UT_Vector2D &value) const
void setVlength(bool val)
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 3x3's rows.
Definition: Mat.h:628
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)
const char * buffer() const
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:499
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
T & x(void)
Definition: UT_Vector4.h:368
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:286
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:374
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
SYS_FORCE_INLINE bool isstring() const
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