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