HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVProject.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_UVProjectEnums
22 {
23  enum class GroupType
24  {
25  VERTICES = 0,
26  POINTS
27  };
28  enum class ProjType
29  {
30  TEXTURE = 0,
31  POLAR,
32  CYLIN,
33  TORUS,
34  WRAP
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  enum class Inittype
55  {
56  XY = 0,
57  YZ,
58  ZX,
59  BEST
60  };
61 }
62 
63 
65 {
66 public:
67  static int version() { return 1; }
68 
70  {
71  myUVAttrib = "uv"_sh;
72  myGroup = ""_sh;
73  myGroupType = 0;
74  myProjType = 0;
75  myTorRad = 0.2;
76  myXord = 0;
77  myRord = 0;
78  myT = UT_Vector3D(0,0,0);
79  myR = UT_Vector3D(0,0,0);
80  myS = UT_Vector3D(1,1,1);
81  myP = UT_Vector3D(0,0,0);
82  myInittype = 3;
83  myURange = UT_Vector2D(0,1);
84  myVRange = UT_Vector2D(0,1);
85  myAngle = 0;
86  myFixSeams = false;
87  myFixPolar = false;
88  myPoleRad = 0.01;
89 
90  }
91 
92  explicit SOP_UVProjectParms(const SOP_UVProjectParms &) = default;
93 
94  virtual ~SOP_UVProjectParms() {}
95 
96  bool operator==(const SOP_UVProjectParms &src) const
97  {
98  if (myUVAttrib != src.myUVAttrib) return false;
99  if (myGroup != src.myGroup) return false;
100  if (myGroupType != src.myGroupType) return false;
101  if (myProjType != src.myProjType) return false;
102  if (myTorRad != src.myTorRad) return false;
103  if (myXord != src.myXord) return false;
104  if (myRord != src.myRord) return false;
105  if (myT != src.myT) return false;
106  if (myR != src.myR) return false;
107  if (myS != src.myS) return false;
108  if (myP != src.myP) return false;
109  if (myInittype != src.myInittype) return false;
110  if (myURange != src.myURange) return false;
111  if (myVRange != src.myVRange) return false;
112  if (myAngle != src.myAngle) return false;
113  if (myFixSeams != src.myFixSeams) return false;
114  if (myFixPolar != src.myFixPolar) return false;
115  if (myPoleRad != src.myPoleRad) return false;
116 
117  return true;
118  }
119  bool operator!=(const SOP_UVProjectParms &src) const
120  {
121  return !operator==(src);
122  }
128 
129 
130 
131  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
132  {
133  if (true)
134  OP_Utils::evalOpParm(myUVAttrib, node, "uvattrib", time, 0);
135  else myUVAttrib = "uv"_sh;
136  if (true)
137  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
138  else myGroup = ""_sh;
139  if (true)
140  OP_Utils::evalOpParm(myGroupType, node, "grouptype", time, 0);
141  else myGroupType = 0;
142  if (true)
143  OP_Utils::evalOpParm(myProjType, node, "projtype", time, 0);
144  else myProjType = 0;
145  if (true && ( (!(((int64(getProjType())!=3)))) ) )
146  OP_Utils::evalOpParm(myTorRad, node, "torrad", time, 0);
147  else myTorRad = 0.2;
148  if (true)
149  OP_Utils::evalOpParm(myXord, node, "xOrd", time, 0);
150  else myXord = 0;
151  if (true)
152  OP_Utils::evalOpParm(myRord, node, "rOrd", time, 0);
153  else myRord = 0;
154  if (true)
155  OP_Utils::evalOpParm(myT, node, "t", time, 0);
156  else myT = UT_Vector3D(0,0,0);
157  if (true)
158  OP_Utils::evalOpParm(myR, node, "r", time, 0);
159  else myR = UT_Vector3D(0,0,0);
160  if (true)
161  OP_Utils::evalOpParm(myS, node, "s", time, 0);
162  else myS = UT_Vector3D(1,1,1);
163  if (true)
164  OP_Utils::evalOpParm(myP, node, "p", time, 0);
165  else myP = UT_Vector3D(0,0,0);
166  if (true)
167  OP_Utils::evalOpParm(myInittype, node, "inittype", time, 0);
168  else myInittype = 3;
169  if (true)
170  OP_Utils::evalOpParm(myURange, node, "urange", time, 0);
171  else myURange = UT_Vector2D(0,1);
172  if (true)
173  OP_Utils::evalOpParm(myVRange, node, "vrange", time, 0);
174  else myVRange = UT_Vector2D(0,1);
175  if (true)
176  OP_Utils::evalOpParm(myAngle, node, "angle", time, 0);
177  else myAngle = 0;
178  if (true && ( (!(((int64(getProjType())==0))||((int64(getProjType())==4)))) ) )
179  OP_Utils::evalOpParm(myFixSeams, node, "fixseams", time, 0);
180  else myFixSeams = false;
181  if (true && ( (!(((int64(getProjType())==0))||((int64(getProjType())==3)))) ) )
182  OP_Utils::evalOpParm(myFixPolar, node, "fixpolar", time, 0);
183  else myFixPolar = false;
184  if (true && ( (!(((int64(getProjType())==0))||((int64(getProjType())==3))||((getFixPolar()==0)))) ) )
185  OP_Utils::evalOpParm(myPoleRad, node, "polerad", time, 0);
186  else myPoleRad = 0.01;
187 
188  }
189 
190 
191  virtual void loadFromOpSubclass(const LoadParms &loadparms)
192  {
193  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
194  }
195 
196 
197  virtual void copyFrom(const SOP_NodeParms *src)
198  {
199  *this = *((const SOP_UVProjectParms *)src);
200  }
201 
202  template <typename T>
203  void
204  doGetParmValue(exint idx, T &value) const
205  {
206  switch (idx)
207  {
208  case 0:
209  coerceValue(value, myUVAttrib);
210  break;
211  case 1:
212  coerceValue(value, myGroup);
213  break;
214  case 2:
215  coerceValue(value, myGroupType);
216  break;
217  case 3:
218  coerceValue(value, myProjType);
219  break;
220  case 4:
221  coerceValue(value, myTorRad);
222  break;
223  case 5:
224  coerceValue(value, myXord);
225  break;
226  case 6:
227  coerceValue(value, myRord);
228  break;
229  case 7:
230  coerceValue(value, myT);
231  break;
232  case 8:
233  coerceValue(value, myR);
234  break;
235  case 9:
236  coerceValue(value, myS);
237  break;
238  case 10:
239  coerceValue(value, myP);
240  break;
241  case 11:
242  coerceValue(value, myInittype);
243  break;
244  case 12:
245  coerceValue(value, myURange);
246  break;
247  case 13:
248  coerceValue(value, myVRange);
249  break;
250  case 14:
251  coerceValue(value, myAngle);
252  break;
253  case 15:
254  coerceValue(value, myFixSeams);
255  break;
256  case 16:
257  coerceValue(value, myFixPolar);
258  break;
259  case 17:
260  coerceValue(value, myPoleRad);
261  break;
262 
263  }
264  }
265 
266  void getParmValue(exint idx, exint &value) const
267  { doGetParmValue(idx, value); }
268  void getParmValue(exint idx, fpreal &value) const
269  { doGetParmValue(idx, value); }
271  { doGetParmValue(idx, value); }
273  { doGetParmValue(idx, value); }
275  { doGetParmValue(idx, value); }
277  { doGetParmValue(idx, value); }
279  { doGetParmValue(idx, value); }
281  { doGetParmValue(idx, value); }
283  { doGetParmValue(idx, value); }
285  { doGetParmValue(idx, value); }
287  { doGetParmValue(idx, value); }
288 
289  template <typename T>
290  void
291  doSetParmValue(exint idx, const T &value)
292  {
293  switch (idx)
294  {
295  case 0:
296  coerceValue(myUVAttrib, value);
297  break;
298  case 1:
299  coerceValue(myGroup, value);
300  break;
301  case 2:
302  coerceValue(myGroupType, value);
303  break;
304  case 3:
305  coerceValue(myProjType, value);
306  break;
307  case 4:
308  coerceValue(myTorRad, value);
309  break;
310  case 5:
311  coerceValue(myXord, value);
312  break;
313  case 6:
314  coerceValue(myRord, value);
315  break;
316  case 7:
317  coerceValue(myT, value);
318  break;
319  case 8:
320  coerceValue(myR, value);
321  break;
322  case 9:
323  coerceValue(myS, value);
324  break;
325  case 10:
326  coerceValue(myP, value);
327  break;
328  case 11:
329  coerceValue(myInittype, value);
330  break;
331  case 12:
332  coerceValue(myURange, value);
333  break;
334  case 13:
335  coerceValue(myVRange, value);
336  break;
337  case 14:
338  coerceValue(myAngle, value);
339  break;
340  case 15:
341  coerceValue(myFixSeams, value);
342  break;
343  case 16:
344  coerceValue(myFixPolar, value);
345  break;
346  case 17:
347  coerceValue(myPoleRad, value);
348  break;
349 
350  }
351  }
352 
353  void setParmValue(exint idx, const exint &value)
354  { doSetParmValue(idx, value); }
355  void setParmValue(exint idx, const fpreal &value)
356  { doSetParmValue(idx, value); }
357  void setParmValue(exint idx, const UT_Vector2D &value)
358  { doSetParmValue(idx, value); }
359  void setParmValue(exint idx, const UT_Vector3D &value)
360  { doSetParmValue(idx, value); }
361  void setParmValue(exint idx, const UT_Vector4D &value)
362  { doSetParmValue(idx, value); }
363  void setParmValue(exint idx, const UT_Matrix2D &value)
364  { doSetParmValue(idx, value); }
365  void setParmValue(exint idx, const UT_Matrix3D &value)
366  { doSetParmValue(idx, value); }
367  void setParmValue(exint idx, const UT_Matrix4D &value)
368  { doSetParmValue(idx, value); }
370  { doSetParmValue(idx, value); }
372  { doSetParmValue(idx, value); }
374  { doSetParmValue(idx, value); }
375 
376  virtual exint getNumParms() const
377  {
378  return 18;
379  }
380 
381  virtual const char *getParmName(exint fieldnum) const
382  {
383  switch (fieldnum)
384  {
385  case 0:
386  return "uvattrib";
387  case 1:
388  return "group";
389  case 2:
390  return "grouptype";
391  case 3:
392  return "projtype";
393  case 4:
394  return "torrad";
395  case 5:
396  return "xOrd";
397  case 6:
398  return "rOrd";
399  case 7:
400  return "t";
401  case 8:
402  return "r";
403  case 9:
404  return "s";
405  case 10:
406  return "p";
407  case 11:
408  return "inittype";
409  case 12:
410  return "urange";
411  case 13:
412  return "vrange";
413  case 14:
414  return "angle";
415  case 15:
416  return "fixseams";
417  case 16:
418  return "fixpolar";
419  case 17:
420  return "polerad";
421 
422  }
423  return 0;
424  }
425 
426  virtual ParmType getParmType(exint fieldnum) const
427  {
428  switch (fieldnum)
429  {
430  case 0:
431  return PARM_STRING;
432  case 1:
433  return PARM_STRING;
434  case 2:
435  return PARM_INTEGER;
436  case 3:
437  return PARM_INTEGER;
438  case 4:
439  return PARM_FLOAT;
440  case 5:
441  return PARM_INTEGER;
442  case 6:
443  return PARM_INTEGER;
444  case 7:
445  return PARM_VECTOR3;
446  case 8:
447  return PARM_VECTOR3;
448  case 9:
449  return PARM_VECTOR3;
450  case 10:
451  return PARM_VECTOR3;
452  case 11:
453  return PARM_INTEGER;
454  case 12:
455  return PARM_VECTOR2;
456  case 13:
457  return PARM_VECTOR2;
458  case 14:
459  return PARM_FLOAT;
460  case 15:
461  return PARM_INTEGER;
462  case 16:
463  return PARM_INTEGER;
464  case 17:
465  return PARM_FLOAT;
466 
467  }
468  return PARM_UNSUPPORTED;
469  }
470 
471  // Boiler plate to load individual types.
472  static void loadData(UT_IStream &is, int64 &v)
473  { is.bread(&v, 1); }
474  static void loadData(UT_IStream &is, bool &v)
475  { int64 iv; is.bread(&iv, 1); v = iv; }
476  static void loadData(UT_IStream &is, fpreal64 &v)
477  { is.bread<fpreal64>(&v, 1); }
478  static void loadData(UT_IStream &is, UT_Vector2D &v)
479  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
480  static void loadData(UT_IStream &is, UT_Vector3D &v)
481  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
482  is.bread<fpreal64>(&v.z(), 1); }
483  static void loadData(UT_IStream &is, UT_Vector4D &v)
484  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
485  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
486  static void loadData(UT_IStream &is, UT_Matrix2D &v)
487  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
488  static void loadData(UT_IStream &is, UT_Matrix3D &v)
489  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
490  static void loadData(UT_IStream &is, UT_Matrix4D &v)
491  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
492  static void loadData(UT_IStream &is, UT_Vector2I &v)
493  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
494  static void loadData(UT_IStream &is, UT_Vector3I &v)
495  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
496  is.bread<int64>(&v.z(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector4I &v)
498  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
499  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
501  { is.bread(v); }
503  { UT_StringHolder rampdata;
504  loadData(is, rampdata);
505  if (rampdata.isstring())
506  {
507  v.reset(new UT_Ramp());
508  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
509  v->load(istr);
510  }
511  else v.reset();
512  }
515  loadData(is, data);
516  if (data.isstring())
517  {
518  // Find the data type.
519  char *colon = UT_StringWrap(data).findChar(':');
520  if (colon)
521  {
522  int typelen = colon - data.buffer();
524  type.strncpy(data.buffer(), typelen);
525  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
526 
527  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
528  }
529  }
530  else v.reset();
531  }
532 
533  static void saveData(std::ostream &os, int64 v)
534  { UTwrite(os, &v); }
535  static void saveData(std::ostream &os, bool v)
536  { int64 iv = v; UTwrite(os, &iv); }
537  static void saveData(std::ostream &os, fpreal64 v)
538  { UTwrite<fpreal64>(os, &v); }
539  static void saveData(std::ostream &os, UT_Vector2D v)
540  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
541  static void saveData(std::ostream &os, UT_Vector3D v)
542  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
543  UTwrite<fpreal64>(os, &v.z()); }
544  static void saveData(std::ostream &os, UT_Vector4D v)
545  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
546  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
547  static void saveData(std::ostream &os, UT_Matrix2D v)
549  static void saveData(std::ostream &os, UT_Matrix3D v)
551  static void saveData(std::ostream &os, UT_Matrix4D v)
553  static void saveData(std::ostream &os, UT_StringHolder s)
554  { UT_StringWrap(s).saveBinary(os); }
555  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
556  { UT_StringHolder result;
557  UT_OStringStream ostr;
558  if (s) s->save(ostr);
559  result = ostr.str();
560  saveData(os, result);
561  }
562  static void saveData(std::ostream &os, PRM_DataItemHandle s)
563  { UT_StringHolder result;
564  UT_OStringStream ostr;
565  if (s)
566  {
567  ostr << s->getDataTypeToken();
568  ostr << ":";
569  s->saveBinary(ostr);
570  }
571  result = ostr.str();
572  saveData(os, result);
573  }
574 
575 
576  void save(std::ostream &os) const
577  {
578  int32 v = version();
579  UTwrite(os, &v);
580  saveData(os, myUVAttrib);
581  saveData(os, myGroup);
582  saveData(os, myGroupType);
583  saveData(os, myProjType);
584  saveData(os, myTorRad);
585  saveData(os, myXord);
586  saveData(os, myRord);
587  saveData(os, myT);
588  saveData(os, myR);
589  saveData(os, myS);
590  saveData(os, myP);
591  saveData(os, myInittype);
592  saveData(os, myURange);
593  saveData(os, myVRange);
594  saveData(os, myAngle);
595  saveData(os, myFixSeams);
596  saveData(os, myFixPolar);
597  saveData(os, myPoleRad);
598 
599  }
600 
601  bool load(UT_IStream &is)
602  {
603  int32 v;
604  is.bread(&v, 1);
605  if (version() != v)
606  {
607  // Fail incompatible versions
608  return false;
609  }
610  loadData(is, myUVAttrib);
611  loadData(is, myGroup);
612  loadData(is, myGroupType);
613  loadData(is, myProjType);
614  loadData(is, myTorRad);
615  loadData(is, myXord);
616  loadData(is, myRord);
617  loadData(is, myT);
618  loadData(is, myR);
619  loadData(is, myS);
620  loadData(is, myP);
621  loadData(is, myInittype);
622  loadData(is, myURange);
623  loadData(is, myVRange);
624  loadData(is, myAngle);
625  loadData(is, myFixSeams);
626  loadData(is, myFixPolar);
627  loadData(is, myPoleRad);
628 
629  return true;
630  }
631 
632  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
633  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
635  {
636  SOP_Node *thissop = cookparms.getNode();
637  if (!thissop) return getUVAttrib();
638  UT_StringHolder result;
639  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
640  return result;
641  }
642  const UT_StringHolder & getGroup() const { return myGroup; }
643  void setGroup(const UT_StringHolder & val) { myGroup = val; }
645  {
646  SOP_Node *thissop = cookparms.getNode();
647  if (!thissop) return getGroup();
648  UT_StringHolder result;
649  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
650  return result;
651  }
652  GroupType getGroupType() const { return GroupType(myGroupType); }
653  void setGroupType(GroupType val) { myGroupType = int64(val); }
655  {
656  SOP_Node *thissop = cookparms.getNode();
657  if (!thissop) return getGroupType();
658  int64 result;
659  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
660  return GroupType(result);
661  }
662  ProjType getProjType() const { return ProjType(myProjType); }
663  void setProjType(ProjType val) { myProjType = int64(val); }
665  {
666  SOP_Node *thissop = cookparms.getNode();
667  if (!thissop) return getProjType();
668  int64 result;
669  OP_Utils::evalOpParm(result, thissop, "projtype", cookparms.getCookTime(), 0);
670  return ProjType(result);
671  }
672  fpreal64 getTorRad() const { return myTorRad; }
673  void setTorRad(fpreal64 val) { myTorRad = val; }
674  fpreal64 opTorRad(const SOP_NodeVerb::CookParms &cookparms) const
675  {
676  SOP_Node *thissop = cookparms.getNode();
677  if (!thissop) return getTorRad();
678  fpreal64 result;
679  OP_Utils::evalOpParm(result, thissop, "torrad", cookparms.getCookTime(), 0);
680  return result;
681  }
682  Xord getXord() const { return Xord(myXord); }
683  void setXord(Xord val) { myXord = int64(val); }
684  Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
685  {
686  SOP_Node *thissop = cookparms.getNode();
687  if (!thissop) return getXord();
688  int64 result;
689  OP_Utils::evalOpParm(result, thissop, "xOrd", cookparms.getCookTime(), 0);
690  return Xord(result);
691  }
692  Rord getRord() const { return Rord(myRord); }
693  void setRord(Rord val) { myRord = int64(val); }
694  Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
695  {
696  SOP_Node *thissop = cookparms.getNode();
697  if (!thissop) return getRord();
698  int64 result;
699  OP_Utils::evalOpParm(result, thissop, "rOrd", cookparms.getCookTime(), 0);
700  return Rord(result);
701  }
702  UT_Vector3D getT() const { return myT; }
703  void setT(UT_Vector3D val) { myT = val; }
704  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
705  {
706  SOP_Node *thissop = cookparms.getNode();
707  if (!thissop) return getT();
708  UT_Vector3D result;
709  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
710  return result;
711  }
712  UT_Vector3D getR() const { return myR; }
713  void setR(UT_Vector3D val) { myR = val; }
714  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
715  {
716  SOP_Node *thissop = cookparms.getNode();
717  if (!thissop) return getR();
718  UT_Vector3D result;
719  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
720  return result;
721  }
722  UT_Vector3D getS() const { return myS; }
723  void setS(UT_Vector3D val) { myS = val; }
724  UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
725  {
726  SOP_Node *thissop = cookparms.getNode();
727  if (!thissop) return getS();
728  UT_Vector3D result;
729  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
730  return result;
731  }
732  UT_Vector3D getP() const { return myP; }
733  void setP(UT_Vector3D val) { myP = val; }
734  UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
735  {
736  SOP_Node *thissop = cookparms.getNode();
737  if (!thissop) return getP();
738  UT_Vector3D result;
739  OP_Utils::evalOpParm(result, thissop, "p", cookparms.getCookTime(), 0);
740  return result;
741  }
742  Inittype getInittype() const { return Inittype(myInittype); }
743  void setInittype(Inittype val) { myInittype = int64(val); }
745  {
746  SOP_Node *thissop = cookparms.getNode();
747  if (!thissop) return getInittype();
748  int64 result;
749  OP_Utils::evalOpParm(result, thissop, "inittype", cookparms.getCookTime(), 0);
750  return Inittype(result);
751  }
752  UT_Vector2D getURange() const { return myURange; }
753  void setURange(UT_Vector2D val) { myURange = val; }
755  {
756  SOP_Node *thissop = cookparms.getNode();
757  if (!thissop) return getURange();
758  UT_Vector2D result;
759  OP_Utils::evalOpParm(result, thissop, "urange", cookparms.getCookTime(), 0);
760  return result;
761  }
762  UT_Vector2D getVRange() const { return myVRange; }
763  void setVRange(UT_Vector2D val) { myVRange = val; }
765  {
766  SOP_Node *thissop = cookparms.getNode();
767  if (!thissop) return getVRange();
768  UT_Vector2D result;
769  OP_Utils::evalOpParm(result, thissop, "vrange", cookparms.getCookTime(), 0);
770  return result;
771  }
772  fpreal64 getAngle() const { return myAngle; }
773  void setAngle(fpreal64 val) { myAngle = val; }
774  fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return getAngle();
778  fpreal64 result;
779  OP_Utils::evalOpParm(result, thissop, "angle", cookparms.getCookTime(), 0);
780  return result;
781  }
782  bool getFixSeams() const { return myFixSeams; }
783  void setFixSeams(bool val) { myFixSeams = val; }
784  bool opFixSeams(const SOP_NodeVerb::CookParms &cookparms) const
785  {
786  SOP_Node *thissop = cookparms.getNode();
787  if (!thissop) return getFixSeams();
788  bool result;
789  OP_Utils::evalOpParm(result, thissop, "fixseams", cookparms.getCookTime(), 0);
790  return result;
791  }
792  bool getFixPolar() const { return myFixPolar; }
793  void setFixPolar(bool val) { myFixPolar = val; }
794  bool opFixPolar(const SOP_NodeVerb::CookParms &cookparms) const
795  {
796  SOP_Node *thissop = cookparms.getNode();
797  if (!thissop) return getFixPolar();
798  bool result;
799  OP_Utils::evalOpParm(result, thissop, "fixpolar", cookparms.getCookTime(), 0);
800  return result;
801  }
802  fpreal64 getPoleRad() const { return myPoleRad; }
803  void setPoleRad(fpreal64 val) { myPoleRad = val; }
805  {
806  SOP_Node *thissop = cookparms.getNode();
807  if (!thissop) return getPoleRad();
808  fpreal64 result;
809  OP_Utils::evalOpParm(result, thissop, "polerad", cookparms.getCookTime(), 0);
810  return result;
811  }
812 
813 private:
814  UT_StringHolder myUVAttrib;
815  UT_StringHolder myGroup;
816  int64 myGroupType;
817  int64 myProjType;
818  fpreal64 myTorRad;
819  int64 myXord;
820  int64 myRord;
821  UT_Vector3D myT;
822  UT_Vector3D myR;
823  UT_Vector3D myS;
824  UT_Vector3D myP;
825  int64 myInittype;
826  UT_Vector2D myURange;
827  UT_Vector2D myVRange;
828  fpreal64 myAngle;
829  bool myFixSeams;
830  bool myFixPolar;
831  fpreal64 myPoleRad;
832 
833 };
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void setParmValue(exint idx, const UT_Vector3D &value)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, int64 &v)
void setProjType(ProjType val)
fpreal64 getTorRad() const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getParmValue(exint idx, UT_Matrix2D &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
fpreal64 getAngle() const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
void setUVAttrib(const UT_StringHolder &val)
T & z(void)
Definition: UT_Vector4.h:379
static void saveData(std::ostream &os, UT_Vector3D v)
void setGroupType(GroupType val)
void setParmValue(exint idx, const UT_Matrix4D &value)
exint bread(int32 *buffer, exint asize=1)
virtual exint getNumParms() const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2D opVRange(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glcorearb.h:836
UT_Vector2T< fpreal64 > UT_Vector2D
fpreal64 opPoleRad(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)
UT_Vector3D getP() const
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
void setP(UT_Vector3D val)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_Vector2D &value) const
void getParmValue(exint idx, UT_Matrix3D &value) const
void setGroup(const UT_StringHolder &val)
An output stream object that owns its own string buffer storage.
void setParmValue(exint idx, const fpreal &value)
UT_Vector2D getURange() const
UT_Vector3D getS() const
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:498
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool load(UT_IStream &is)
const UT_StringHolder & getUVAttrib() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setFixSeams(bool val)
void setT(UT_Vector3D val)
void getParmValue(exint idx, exint &value) const
bool opFixSeams(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
UT_Vector3D getT() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
fpreal64 getPoleRad() const
void setParmValue(exint idx, const exint &value)
Inittype opInittype(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix4D &value) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
GroupType getGroupType() 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 loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setURange(UT_Vector2D val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
int64 exint
Definition: SYS_Types.h:116
static void saveData(std::ostream &os, fpreal64 v)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
virtual const char * getParmName(exint fieldnum) const
UT_Vector3D opS(const SOP_NodeVerb::CookParms &cookparms) const
Inittype getInittype() const
virtual ParmType getParmType(exint fieldnum) const
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_UVProjectParms &src) const
void save(std::ostream &os) const
UT_Vector3T< fpreal64 > UT_Vector3D
UT_Vector2D opURange(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean * data
Definition: glcorearb.h:130
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
fpreal64 opTorRad(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void getParmValue(exint idx, UT_Vector4D &value) const
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector4I &v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
UT_Vector3D opP(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
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
Xord opXord(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector4D &value)
void getParmValue(exint idx, fpreal &value) const
bool opFixPolar(const SOP_NodeVerb::CookParms &cookparms) const
void setS(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_UVProjectParms &src) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setParmValue(exint idx, const UT_Vector2D &value)
UT_Vector3D getR() const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
UT_Vector2D getVRange() const
#define SOP_API
Definition: SOP_API.h:10
static void saveData(std::ostream &os, UT_Vector2D v)
void setPoleRad(fpreal64 val)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
T & x(void)
Definition: UT_Vector4.h:375
void getParmValue(exint idx, UT_Vector3D &value) const
void doGetParmValue(exint idx, T &value) const
T & y(void)
Definition: UT_Vector2.h:287
void setFixPolar(bool val)
ProjType getProjType() const
void setAngle(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
GLboolean r
Definition: glcorearb.h:1221
void setTorRad(fpreal64 val)
void setInittype(Inittype val)
void setParmValue(exint idx, const UT_Matrix3D &value)
static void saveData(std::ostream &os, UT_Matrix4D v)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
T & w(void)
Definition: UT_Vector4.h:381
static void loadData(UT_IStream &is, fpreal64 &v)
void setR(UT_Vector3D val)
ProjType opProjType(const SOP_NodeVerb::CookParms &cookparms) const
void setVRange(UT_Vector2D val)
static void saveData(std::ostream &os, UT_StringHolder s)
Rord opRord(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void getParmValue(exint idx, UT_StringHolder &value) const
SYS_FORCE_INLINE bool isstring() const
void setParmValue(exint idx, const UT_Matrix2D &value)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setParmValue(exint idx, const UT_StringHolder &value)
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(exint idx, const T &value)
GLenum src
Definition: glcorearb.h:1792