HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_CopyTransform.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_CopyTransformEnums
22 {
23  enum class Pivot
24  {
25  ORIGIN = 0,
26  CENTROID
27  };
28  enum class Viewportlod
29  {
30  FULL = 0,
31  POINTS,
32  BOX,
33  CENTROID,
34  HIDDEN
35  };
36  enum class Xord
37  {
38  SRT = 0,
39  STR,
40  RST,
41  RTS,
42  TSR,
43  TRS
44  };
45  enum class Rord
46  {
47  XYZ = 0,
48  XZY,
49  YXZ,
50  YZX,
51  ZXY,
52  ZYX
53  };
54 }
55 
56 
58 {
59 public:
60  static int version() { return 1; }
61 
63  {
64  mySourceGroup = ""_sh;
65  myNcy = 2;
66  myPack = false;
67  myPivot = 1;
68  myViewportlod = 0;
69  myXord = 0;
70  myRord = 0;
71  myT = UT_Vector3D(0,0,0);
72  myR = UT_Vector3D(0,0,0);
73  myS = UT_Vector3D(1,1,1);
74  myShear = UT_Vector3D(0,0,0);
75  myScale = 1;
76  myP = UT_Vector3D(0,0,0);
77  myPr = UT_Vector3D(0,0,0);
78  myNewgroups = false;
79  myNewgroupprefix = "copyGroup"_sh;
80  myDocopyattrib = false;
81  myCopyattrib = "copynum"_sh;
82 
83  }
84 
85  explicit SOP_CopyTransformParms(const SOP_CopyTransformParms &) = default;
86 
88 
90  {
91  if (mySourceGroup != src.mySourceGroup) return false;
92  if (myNcy != src.myNcy) return false;
93  if (myPack != src.myPack) return false;
94  if (myPivot != src.myPivot) return false;
95  if (myViewportlod != src.myViewportlod) return false;
96  if (myXord != src.myXord) return false;
97  if (myRord != src.myRord) return false;
98  if (myT != src.myT) return false;
99  if (myR != src.myR) return false;
100  if (myS != src.myS) return false;
101  if (myShear != src.myShear) return false;
102  if (myScale != src.myScale) return false;
103  if (myP != src.myP) return false;
104  if (myPr != src.myPr) return false;
105  if (myNewgroups != src.myNewgroups) return false;
106  if (myNewgroupprefix != src.myNewgroupprefix) return false;
107  if (myDocopyattrib != src.myDocopyattrib) return false;
108  if (myCopyattrib != src.myCopyattrib) return false;
109 
110  return true;
111  }
116 
117 
118 
119  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
120  {
121  if (true)
122  OP_Utils::evalOpParm(mySourceGroup, node, "sourcegroup", time, 0);
123  else mySourceGroup = ""_sh;
124  if (true)
125  OP_Utils::evalOpParm(myNcy, node, "ncy", time, 0);
126  else myNcy = 2;
127  if (true)
128  OP_Utils::evalOpParm(myPack, node, "pack", time, 0);
129  else myPack = false;
130  if (true && ( (!(((getPack()==0)))) ) )
131  OP_Utils::evalOpParm(myPivot, node, "pivot", time, 0);
132  else myPivot = 1;
133  if (true && ( (!(((getPack()==0)))) ) )
134  OP_Utils::evalOpParm(myViewportlod, node, "viewportlod", time, 0);
135  else myViewportlod = 0;
136  if (true)
137  OP_Utils::evalOpParm(myXord, node, "xOrd", time, 0);
138  else myXord = 0;
139  if (true)
140  OP_Utils::evalOpParm(myRord, node, "rOrd", time, 0);
141  else myRord = 0;
142  if (true)
143  OP_Utils::evalOpParm(myT, node, "t", time, 0);
144  else myT = UT_Vector3D(0,0,0);
145  if (true)
146  OP_Utils::evalOpParm(myR, node, "r", time, 0);
147  else myR = UT_Vector3D(0,0,0);
148  if (true)
149  OP_Utils::evalOpParm(myS, node, "s", time, 0);
150  else myS = UT_Vector3D(1,1,1);
151  if (true)
152  OP_Utils::evalOpParm(myShear, node, "shear", time, 0);
153  else myShear = UT_Vector3D(0,0,0);
154  if (true)
155  OP_Utils::evalOpParm(myScale, node, "scale", time, 0);
156  else myScale = 1;
157  if (true)
158  OP_Utils::evalOpParm(myP, node, "p", time, 0);
159  else myP = UT_Vector3D(0,0,0);
160  if (true)
161  OP_Utils::evalOpParm(myPr, node, "pr", time, 0);
162  else myPr = UT_Vector3D(0,0,0);
163  if (true)
164  OP_Utils::evalOpParm(myNewgroups, node, "newgroups", time, 0);
165  else myNewgroups = false;
166  if (true && ( (!(((getNewgroups()==0)))) ) )
167  OP_Utils::evalOpParm(myNewgroupprefix, node, "newgroupprefix", time, 0);
168  else myNewgroupprefix = "copyGroup"_sh;
169  if (true)
170  OP_Utils::evalOpParm(myDocopyattrib, node, "docopyattrib", time, 0);
171  else myDocopyattrib = false;
172  if (true && ( (!(((getDocopyattrib()==0)))) ) )
173  OP_Utils::evalOpParm(myCopyattrib, node, "copyattrib", time, 0);
174  else myCopyattrib = "copynum"_sh;
175 
176  }
177 
178 
179  virtual void loadFromOpSubclass(const LoadParms &loadparms)
180  {
181  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
182  }
183 
184 
185  virtual void copyFrom(const SOP_NodeParms *src)
186  {
187  *this = *((const SOP_CopyTransformParms *)src);
188  }
189 
190  template <typename T>
191  void
192  doGetParmValue(exint idx, T &value) const
193  {
194  switch (idx)
195  {
196  case 0:
197  coerceValue(value, mySourceGroup);
198  break;
199  case 1:
200  coerceValue(value, myNcy);
201  break;
202  case 2:
203  coerceValue(value, myPack);
204  break;
205  case 3:
206  coerceValue(value, myPivot);
207  break;
208  case 4:
209  coerceValue(value, myViewportlod);
210  break;
211  case 5:
212  coerceValue(value, myXord);
213  break;
214  case 6:
215  coerceValue(value, myRord);
216  break;
217  case 7:
218  coerceValue(value, myT);
219  break;
220  case 8:
221  coerceValue(value, myR);
222  break;
223  case 9:
224  coerceValue(value, myS);
225  break;
226  case 10:
227  coerceValue(value, myShear);
228  break;
229  case 11:
230  coerceValue(value, myScale);
231  break;
232  case 12:
233  coerceValue(value, myP);
234  break;
235  case 13:
236  coerceValue(value, myPr);
237  break;
238  case 14:
239  coerceValue(value, myNewgroups);
240  break;
241  case 15:
242  coerceValue(value, myNewgroupprefix);
243  break;
244  case 16:
245  coerceValue(value, myDocopyattrib);
246  break;
247  case 17:
248  coerceValue(value, myCopyattrib);
249  break;
250 
251  }
252  }
253 
254  void getParmValue(exint idx, exint &value) const
255  { doGetParmValue(idx, value); }
256  void getParmValue(exint idx, fpreal &value) const
257  { doGetParmValue(idx, value); }
259  { doGetParmValue(idx, value); }
261  { doGetParmValue(idx, value); }
263  { doGetParmValue(idx, value); }
265  { doGetParmValue(idx, value); }
267  { doGetParmValue(idx, value); }
269  { doGetParmValue(idx, value); }
271  { doGetParmValue(idx, value); }
273  { doGetParmValue(idx, value); }
275  { doGetParmValue(idx, value); }
276 
277  template <typename T>
278  void
279  doSetParmValue(exint idx, const T &value)
280  {
281  switch (idx)
282  {
283  case 0:
284  coerceValue(mySourceGroup, value);
285  break;
286  case 1:
287  coerceValue(myNcy, value);
288  break;
289  case 2:
290  coerceValue(myPack, value);
291  break;
292  case 3:
293  coerceValue(myPivot, value);
294  break;
295  case 4:
296  coerceValue(myViewportlod, value);
297  break;
298  case 5:
299  coerceValue(myXord, value);
300  break;
301  case 6:
302  coerceValue(myRord, value);
303  break;
304  case 7:
305  coerceValue(myT, value);
306  break;
307  case 8:
308  coerceValue(myR, value);
309  break;
310  case 9:
311  coerceValue(myS, value);
312  break;
313  case 10:
314  coerceValue(myShear, value);
315  break;
316  case 11:
317  coerceValue(myScale, value);
318  break;
319  case 12:
320  coerceValue(myP, value);
321  break;
322  case 13:
323  coerceValue(myPr, value);
324  break;
325  case 14:
326  coerceValue(myNewgroups, value);
327  break;
328  case 15:
329  coerceValue(myNewgroupprefix, value);
330  break;
331  case 16:
332  coerceValue(myDocopyattrib, value);
333  break;
334  case 17:
335  coerceValue(myCopyattrib, value);
336  break;
337 
338  }
339  }
340 
341  void setParmValue(exint idx, const exint &value)
342  { doSetParmValue(idx, value); }
343  void setParmValue(exint idx, const fpreal &value)
344  { doSetParmValue(idx, value); }
345  void setParmValue(exint idx, const UT_Vector2D &value)
346  { doSetParmValue(idx, value); }
347  void setParmValue(exint idx, const UT_Vector3D &value)
348  { doSetParmValue(idx, value); }
349  void setParmValue(exint idx, const UT_Vector4D &value)
350  { doSetParmValue(idx, value); }
351  void setParmValue(exint idx, const UT_Matrix2D &value)
352  { doSetParmValue(idx, value); }
353  void setParmValue(exint idx, const UT_Matrix3D &value)
354  { doSetParmValue(idx, value); }
355  void setParmValue(exint idx, const UT_Matrix4D &value)
356  { doSetParmValue(idx, value); }
358  { doSetParmValue(idx, value); }
360  { doSetParmValue(idx, value); }
362  { doSetParmValue(idx, value); }
363 
364  virtual exint getNumParms() const
365  {
366  return 18;
367  }
368 
369  virtual const char *getParmName(exint fieldnum) const
370  {
371  switch (fieldnum)
372  {
373  case 0:
374  return "sourcegroup";
375  case 1:
376  return "ncy";
377  case 2:
378  return "pack";
379  case 3:
380  return "pivot";
381  case 4:
382  return "viewportlod";
383  case 5:
384  return "xOrd";
385  case 6:
386  return "rOrd";
387  case 7:
388  return "t";
389  case 8:
390  return "r";
391  case 9:
392  return "s";
393  case 10:
394  return "shear";
395  case 11:
396  return "scale";
397  case 12:
398  return "p";
399  case 13:
400  return "pr";
401  case 14:
402  return "newgroups";
403  case 15:
404  return "newgroupprefix";
405  case 16:
406  return "docopyattrib";
407  case 17:
408  return "copyattrib";
409 
410  }
411  return 0;
412  }
413 
414  virtual ParmType getParmType(exint fieldnum) const
415  {
416  switch (fieldnum)
417  {
418  case 0:
419  return PARM_STRING;
420  case 1:
421  return PARM_INTEGER;
422  case 2:
423  return PARM_INTEGER;
424  case 3:
425  return PARM_INTEGER;
426  case 4:
427  return PARM_INTEGER;
428  case 5:
429  return PARM_INTEGER;
430  case 6:
431  return PARM_INTEGER;
432  case 7:
433  return PARM_VECTOR3;
434  case 8:
435  return PARM_VECTOR3;
436  case 9:
437  return PARM_VECTOR3;
438  case 10:
439  return PARM_VECTOR3;
440  case 11:
441  return PARM_FLOAT;
442  case 12:
443  return PARM_VECTOR3;
444  case 13:
445  return PARM_VECTOR3;
446  case 14:
447  return PARM_INTEGER;
448  case 15:
449  return PARM_STRING;
450  case 16:
451  return PARM_INTEGER;
452  case 17:
453  return PARM_STRING;
454 
455  }
456  return PARM_UNSUPPORTED;
457  }
458 
459  // Boiler plate to load individual types.
460  static void loadData(UT_IStream &is, int64 &v)
461  { is.bread(&v, 1); }
462  static void loadData(UT_IStream &is, bool &v)
463  { int64 iv; is.bread(&iv, 1); v = iv; }
464  static void loadData(UT_IStream &is, fpreal64 &v)
465  { is.bread<fpreal64>(&v, 1); }
466  static void loadData(UT_IStream &is, UT_Vector2D &v)
467  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
468  static void loadData(UT_IStream &is, UT_Vector3D &v)
469  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
470  is.bread<fpreal64>(&v.z(), 1); }
471  static void loadData(UT_IStream &is, UT_Vector4D &v)
472  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
473  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
474  static void loadData(UT_IStream &is, UT_Matrix2D &v)
475  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
476  static void loadData(UT_IStream &is, UT_Matrix3D &v)
477  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
478  static void loadData(UT_IStream &is, UT_Matrix4D &v)
479  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
480  static void loadData(UT_IStream &is, UT_Vector2I &v)
481  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
482  static void loadData(UT_IStream &is, UT_Vector3I &v)
483  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
484  is.bread<int64>(&v.z(), 1); }
485  static void loadData(UT_IStream &is, UT_Vector4I &v)
486  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
487  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
489  { is.bread(v); }
491  { UT_StringHolder rampdata;
492  loadData(is, rampdata);
493  if (rampdata.isstring())
494  {
495  v.reset(new UT_Ramp());
496  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
497  v->load(istr);
498  }
499  else v.reset();
500  }
503  loadData(is, data);
504  if (data.isstring())
505  {
506  // Find the data type.
507  char *colon = UT_StringWrap(data).findChar(':');
508  if (colon)
509  {
510  int typelen = colon - data.buffer();
512  type.strncpy(data.buffer(), typelen);
513  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
514 
515  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
516  }
517  }
518  else v.reset();
519  }
520 
521  static void saveData(std::ostream &os, int64 v)
522  { UTwrite(os, &v); }
523  static void saveData(std::ostream &os, bool v)
524  { int64 iv = v; UTwrite(os, &iv); }
525  static void saveData(std::ostream &os, fpreal64 v)
526  { UTwrite<fpreal64>(os, &v); }
527  static void saveData(std::ostream &os, UT_Vector2D v)
528  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
529  static void saveData(std::ostream &os, UT_Vector3D v)
530  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
531  UTwrite<fpreal64>(os, &v.z()); }
532  static void saveData(std::ostream &os, UT_Vector4D v)
533  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
534  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
535  static void saveData(std::ostream &os, UT_Matrix2D v)
537  static void saveData(std::ostream &os, UT_Matrix3D v)
539  static void saveData(std::ostream &os, UT_Matrix4D v)
541  static void saveData(std::ostream &os, UT_StringHolder s)
542  { UT_StringWrap(s).saveBinary(os); }
543  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
544  { UT_StringHolder result;
545  UT_OStringStream ostr;
546  if (s) s->save(ostr);
547  result = ostr.str();
548  saveData(os, result);
549  }
550  static void saveData(std::ostream &os, PRM_DataItemHandle s)
551  { UT_StringHolder result;
552  UT_OStringStream ostr;
553  if (s)
554  {
555  ostr << s->getDataTypeToken();
556  ostr << ":";
557  s->saveBinary(ostr);
558  }
559  result = ostr.str();
560  saveData(os, result);
561  }
562 
563 
564  void save(std::ostream &os) const
565  {
566  int32 v = version();
567  UTwrite(os, &v);
568  saveData(os, mySourceGroup);
569  saveData(os, myNcy);
570  saveData(os, myPack);
571  saveData(os, myPivot);
572  saveData(os, myViewportlod);
573  saveData(os, myXord);
574  saveData(os, myRord);
575  saveData(os, myT);
576  saveData(os, myR);
577  saveData(os, myS);
578  saveData(os, myShear);
579  saveData(os, myScale);
580  saveData(os, myP);
581  saveData(os, myPr);
582  saveData(os, myNewgroups);
583  saveData(os, myNewgroupprefix);
584  saveData(os, myDocopyattrib);
585  saveData(os, myCopyattrib);
586 
587  }
588 
589  bool load(UT_IStream &is)
590  {
591  int32 v;
592  is.bread(&v, 1);
593  if (version() != v)
594  {
595  // Fail incompatible versions
596  return false;
597  }
598  loadData(is, mySourceGroup);
599  loadData(is, myNcy);
600  loadData(is, myPack);
601  loadData(is, myPivot);
602  loadData(is, myViewportlod);
603  loadData(is, myXord);
604  loadData(is, myRord);
605  loadData(is, myT);
606  loadData(is, myR);
607  loadData(is, myS);
608  loadData(is, myShear);
609  loadData(is, myScale);
610  loadData(is, myP);
611  loadData(is, myPr);
612  loadData(is, myNewgroups);
613  loadData(is, myNewgroupprefix);
614  loadData(is, myDocopyattrib);
615  loadData(is, myCopyattrib);
616 
617  return true;
618  }
619 
620  const UT_StringHolder & getSourceGroup() const { return mySourceGroup; }
621  void setSourceGroup(const UT_StringHolder & val) { mySourceGroup = val; }
623  {
624  SOP_Node *thissop = cookparms.getNode();
625  if (!thissop) return getSourceGroup();
626  UT_StringHolder result;
627  OP_Utils::evalOpParm(result, thissop, "sourcegroup", cookparms.getCookTime(), 0);
628  return result;
629  }
630  int64 getNcy() const { return myNcy; }
631  void setNcy(int64 val) { myNcy = val; }
632  int64 opNcy(const SOP_NodeVerb::CookParms &cookparms) const
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getNcy();
636  int64 result;
637  OP_Utils::evalOpParm(result, thissop, "ncy", cookparms.getCookTime(), 0);
638  return result;
639  }
640  bool getPack() const { return myPack; }
641  void setPack(bool val) { myPack = val; }
642  bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getPack();
646  bool result;
647  OP_Utils::evalOpParm(result, thissop, "pack", cookparms.getCookTime(), 0);
648  return result;
649  }
650  Pivot getPivot() const { return Pivot(myPivot); }
651  void setPivot(Pivot val) { myPivot = int64(val); }
652  Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getPivot();
656  int64 result;
657  OP_Utils::evalOpParm(result, thissop, "pivot", cookparms.getCookTime(), 0);
658  return Pivot(result);
659  }
660  Viewportlod getViewportlod() const { return Viewportlod(myViewportlod); }
661  void setViewportlod(Viewportlod val) { myViewportlod = int64(val); }
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getViewportlod();
666  int64 result;
667  OP_Utils::evalOpParm(result, thissop, "viewportlod", cookparms.getCookTime(), 0);
668  return Viewportlod(result);
669  }
670  Xord getXord() const { return Xord(myXord); }
671  void setXord(Xord val) { myXord = int64(val); }
672  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getXord();
676  int64 result;
677  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
678  return Xord(result);
679  }
680  Rord getRord() const { return Rord(myRord); }
681  void setRord(Rord val) { myRord = int64(val); }
682  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
683  {
684  SOP_Node *thissop = cookparms.getNode();
685  if (!thissop) return getRord();
686  int64 result;
687  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
688  return Rord(result);
689  }
690  UT_Vector3D getT() const { return myT; }
691  void setT(UT_Vector3D val) { myT = val; }
692  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
693  {
694  SOP_Node *thissop = cookparms.getNode();
695  if (!thissop) return getT();
696  UT_Vector3D result;
697  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
698  return result;
699  }
700  UT_Vector3D getR() const { return myR; }
701  void setR(UT_Vector3D val) { myR = val; }
702  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
703  {
704  SOP_Node *thissop = cookparms.getNode();
705  if (!thissop) return getR();
706  UT_Vector3D result;
707  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
708  return result;
709  }
710  UT_Vector3D getS() const { return myS; }
711  void setS(UT_Vector3D val) { myS = val; }
712  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
713  {
714  SOP_Node *thissop = cookparms.getNode();
715  if (!thissop) return getS();
716  UT_Vector3D result;
717  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
718  return result;
719  }
720  UT_Vector3D getShear() const { return myShear; }
721  void setShear(UT_Vector3D val) { myShear = val; }
723  {
724  SOP_Node *thissop = cookparms.getNode();
725  if (!thissop) return getShear();
726  UT_Vector3D result;
727  OP_Utils::evalOpParm(result, thissop, "shear", cookparms.getCookTime(), 0);
728  return result;
729  }
730  fpreal64 getScale() const { return myScale; }
731  void setScale(fpreal64 val) { myScale = val; }
732  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
733  {
734  SOP_Node *thissop = cookparms.getNode();
735  if (!thissop) return getScale();
736  fpreal64 result;
737  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
738  return result;
739  }
740  UT_Vector3D getP() const { return myP; }
741  void setP(UT_Vector3D val) { myP = val; }
742  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
743  {
744  SOP_Node *thissop = cookparms.getNode();
745  if (!thissop) return getP();
746  UT_Vector3D result;
747  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
748  return result;
749  }
750  UT_Vector3D getPr() const { return myPr; }
751  void setPr(UT_Vector3D val) { myPr = val; }
752  UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
753  {
754  SOP_Node *thissop = cookparms.getNode();
755  if (!thissop) return getPr();
756  UT_Vector3D result;
757  OP_Utils::evalOpParm(result, thissop, "pr", cookparms.getCookTime(), 0);
758  return result;
759  }
760  bool getNewgroups() const { return myNewgroups; }
761  void setNewgroups(bool val) { myNewgroups = val; }
762  bool opNewgroups(const SOP_NodeVerb::CookParms &cookparms) const
763  {
764  SOP_Node *thissop = cookparms.getNode();
765  if (!thissop) return getNewgroups();
766  bool result;
767  OP_Utils::evalOpParm(result, thissop, "newgroups", cookparms.getCookTime(), 0);
768  return result;
769  }
770  const UT_StringHolder & getNewgroupprefix() const { return myNewgroupprefix; }
771  void setNewgroupprefix(const UT_StringHolder & val) { myNewgroupprefix = val; }
773  {
774  SOP_Node *thissop = cookparms.getNode();
775  if (!thissop) return getNewgroupprefix();
776  UT_StringHolder result;
777  OP_Utils::evalOpParm(result, thissop, "newgroupprefix", cookparms.getCookTime(), 0);
778  return result;
779  }
780  bool getDocopyattrib() const { return myDocopyattrib; }
781  void setDocopyattrib(bool val) { myDocopyattrib = val; }
782  bool opDocopyattrib(const SOP_NodeVerb::CookParms &cookparms) const
783  {
784  SOP_Node *thissop = cookparms.getNode();
785  if (!thissop) return getDocopyattrib();
786  bool result;
787  OP_Utils::evalOpParm(result, thissop, "docopyattrib", cookparms.getCookTime(), 0);
788  return result;
789  }
790  const UT_StringHolder & getCopyattrib() const { return myCopyattrib; }
791  void setCopyattrib(const UT_StringHolder & val) { myCopyattrib = val; }
793  {
794  SOP_Node *thissop = cookparms.getNode();
795  if (!thissop) return getCopyattrib();
796  UT_StringHolder result;
797  OP_Utils::evalOpParm(result, thissop, "copyattrib", cookparms.getCookTime(), 0);
798  return result;
799  }
800 
801 private:
802  UT_StringHolder mySourceGroup;
803  int64 myNcy;
804  bool myPack;
805  int64 myPivot;
806  int64 myViewportlod;
807  int64 myXord;
808  int64 myRord;
809  UT_Vector3D myT;
810  UT_Vector3D myR;
811  UT_Vector3D myS;
812  UT_Vector3D myShear;
813  fpreal64 myScale;
814  UT_Vector3D myP;
815  UT_Vector3D myPr;
816  bool myNewgroups;
817  UT_StringHolder myNewgroupprefix;
818  bool myDocopyattrib;
819  UT_StringHolder myCopyattrib;
820 
821 };
void setPr(UT_Vector3D val)
int64 opNcy(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix3D &value)
void getParmValue(exint idx, UT_Matrix2D &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opSourceGroup(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(exint idx, T &value) const
virtual const char * getParmName(exint fieldnum) const
UT_Vector3D getShear() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
static void loadData(UT_IStream &is, UT_Vector4D &v)
T & z(void)
Definition: UT_Vector4.h:372
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, fpreal64 &v)
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector2I &v)
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
void setNewgroupprefix(const UT_StringHolder &val)
void getParmValue(exint idx, exint &value) const
Viewportlod getViewportlod() const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
T & x(void)
Definition: UT_Vector2.h:284
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setParmValue(exint idx, const UT_Vector4D &value)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setP(UT_Vector3D val)
UT_Vector3D opPr(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
bool opNewgroups(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opShear(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
void setS(UT_Vector3D val)
void getParmValue(exint idx, UT_Vector4D &value) const
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
long long int64
Definition: SYS_Types.h:106
void setCopyattrib(const UT_StringHolder &val)
bool operator==(const SOP_CopyTransformParms &src) const
void setParmValue(exint idx, const UT_StringHolder &value)
void doSetParmValue(exint idx, const T &value)
static void loadData(UT_IStream &is, bool &v)
void getParmValue(exint idx, UT_Vector3D &value) const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opNewgroupprefix(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, bool v)
int64 exint
Definition: SYS_Types.h:115
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_StringHolder & getNewgroupprefix() const
double fpreal64
Definition: SYS_Types.h:191
void setParmValue(exint idx, const UT_Matrix4D &value)
bool opDocopyattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
virtual exint getNumParms() const
void getParmValue(exint idx, UT_Vector2D &value) const
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix2D &value)
UT_Vector3T< fpreal64 > UT_Vector3D
GLboolean * data
Definition: glcorearb.h:130
void setViewportlod(Viewportlod val)
const UT_StringHolder & getCopyattrib() const
int int32
Definition: SYS_Types.h:34
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
T & y(void)
Definition: UT_Vector4.h:370
void save(std::ostream &os) const
void getParmValue(exint idx, UT_Matrix4D &value) const
virtual void copyFrom(const SOP_NodeParms *src)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opCopyattrib(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void loadData(UT_IStream &is, UT_Vector4I &v)
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:269
void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setT(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getSourceGroup() const
Viewportlod opViewportlod(const SOP_NodeVerb::CookParms &cookparms) const
virtual ParmType getParmType(exint fieldnum) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setSourceGroup(const UT_StringHolder &val)
void getParmValue(exint idx, fpreal &value) const
void getParmValue(exint idx, UT_Matrix3D &value) const
Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
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
#define SOP_API
Definition: SOP_API.h:10
const char * buffer() const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setParmValue(exint idx, const UT_Vector3D &value)
T & x(void)
Definition: UT_Vector4.h:368
void setShear(UT_Vector3D val)
T & y(void)
Definition: UT_Vector2.h:286
void setParmValue(exint idx, const UT_Vector2D &value)
void setParmValue(exint idx, const exint &value)
GLboolean r
Definition: glcorearb.h:1221
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
T & w(void)
Definition: UT_Vector4.h:374
void setParmValue(exint idx, const PRM_DataItemHandle &value)
bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
void setR(UT_Vector3D val)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setParmValue(exint idx, const fpreal &value)
SYS_FORCE_INLINE bool isstring() const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
GLenum src
Definition: glcorearb.h:1792