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