HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Torus.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_TorusEnums
22 {
23  enum class Type
24  {
25  POLY = 0,
26  MESH,
27  NURBS,
28  BEZIER,
29  POLYSOUP
30  };
31  enum class Surftype
32  {
33  ROWS = 0,
34  COLS,
35  ROWCOL,
36  TRIANGLES,
37  QUADS,
38  ALTTRIANGLES,
39  REVTRIANGLES
40  };
41  enum class Orient
42  {
43  X = 0,
44  Y,
45  Z
46  };
47 }
48 
49 
51 {
52 public:
53  static int version() { return 1; }
54 
56  {
57  myType = 0;
58  mySurftype = 4;
59  myOrient = 1;
60  myRad = UT_Vector2D(1,0.5);
61  myT = UT_Vector3D(0,0,0);
62  myR = UT_Vector3D(0,0,0);
63  myScale = 1;
64  myImperfect = true;
65  myOrderu = 4;
66  myOrderv = 4;
67  myCloseu = true;
68  myClosev = true;
69  myCapu = false;
70  myCapv = false;
71  myRows = 12;
72  myCols = 24;
73  myAngleu = UT_Vector2D(0,360);
74  myAnglev = UT_Vector2D(0,360);
75 
76  }
77 
78  explicit SOP_TorusParms(const SOP_TorusParms &) = default;
79 
80  virtual ~SOP_TorusParms() {}
81 
82  bool operator==(const SOP_TorusParms &src) const
83  {
84  if (myType != src.myType) return false;
85  if (mySurftype != src.mySurftype) return false;
86  if (myOrient != src.myOrient) return false;
87  if (myRad != src.myRad) return false;
88  if (myT != src.myT) return false;
89  if (myR != src.myR) return false;
90  if (myScale != src.myScale) return false;
91  if (myImperfect != src.myImperfect) return false;
92  if (myOrderu != src.myOrderu) return false;
93  if (myOrderv != src.myOrderv) return false;
94  if (myCloseu != src.myCloseu) return false;
95  if (myClosev != src.myClosev) return false;
96  if (myCapu != src.myCapu) return false;
97  if (myCapv != src.myCapv) return false;
98  if (myRows != src.myRows) return false;
99  if (myCols != src.myCols) return false;
100  if (myAngleu != src.myAngleu) return false;
101  if (myAnglev != src.myAnglev) return false;
102 
103  return true;
104  }
105  bool operator!=(const SOP_TorusParms &src) const
106  {
107  return !operator==(src);
108  }
112 
113 
114 
115  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
116  {
117  if (true)
118  OP_Utils::evalOpParm(myType, node, "type", time, 0);
119  else myType = 0;
120  if (true)
121  OP_Utils::evalOpParm(mySurftype, node, "surftype", time, 0);
122  else mySurftype = 4;
123  if (true)
124  OP_Utils::evalOpParm(myOrient, node, "orient", time, 0);
125  else myOrient = 1;
126  if (true)
127  OP_Utils::evalOpParm(myRad, node, "rad", time, 0);
128  else myRad = UT_Vector2D(1,0.5);
129  if (true)
130  OP_Utils::evalOpParm(myT, node, "t", time, 0);
131  else myT = UT_Vector3D(0,0,0);
132  if (true)
133  OP_Utils::evalOpParm(myR, node, "r", time, 0);
134  else myR = UT_Vector3D(0,0,0);
135  if (true)
136  OP_Utils::evalOpParm(myScale, node, "scale", time, 0);
137  else myScale = 1;
138  if (true && ( (!(((int64(getType())!=3)&&(int64(getType())!=2)))) ) )
139  OP_Utils::evalOpParm(myImperfect, node, "imperfect", time, 0);
140  else myImperfect = true;
141  if (true && ( (!(((int64(getType())!=3)&&(int64(getType())!=2)))) ) )
142  OP_Utils::evalOpParm(myOrderu, node, "orderu", time, 0);
143  else myOrderu = 4;
144  if (true && ( (!(((int64(getType())!=3)&&(int64(getType())!=2)))) ) )
145  OP_Utils::evalOpParm(myOrderv, node, "orderv", time, 0);
146  else myOrderv = 4;
147  if (true && ( (!(((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
148  OP_Utils::evalOpParm(myCloseu, node, "closeu", time, 0);
149  else myCloseu = true;
150  if (true && ( (!(((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
151  OP_Utils::evalOpParm(myClosev, node, "closev", time, 0);
152  else myClosev = true;
153  if (true)
154  OP_Utils::evalOpParm(myCapu, node, "capu", time, 0);
155  else myCapu = false;
156  if (true)
157  OP_Utils::evalOpParm(myCapv, node, "capv", time, 0);
158  else myCapv = false;
159  if (true && ( (!(((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
160  OP_Utils::evalOpParm(myRows, node, "rows", time, 0);
161  else myRows = 12;
162  if (true && ( (!(((int64(getType())==2)&&(getImperfect()==0))||((int64(getType())==3)&&(getImperfect()==0)))) ) )
163  OP_Utils::evalOpParm(myCols, node, "cols", time, 0);
164  else myCols = 24;
165  if (true && ( (!(((getCloseu()==1)))) ) )
166  OP_Utils::evalOpParm(myAngleu, node, "angleu", time, 0);
167  else myAngleu = UT_Vector2D(0,360);
168  if (true && ( (!(((getClosev()==1)))) ) )
169  OP_Utils::evalOpParm(myAnglev, node, "anglev", time, 0);
170  else myAnglev = UT_Vector2D(0,360);
171 
172  }
173 
174 
175  virtual void loadFromOpSubclass(const LoadParms &loadparms)
176  {
177  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
178  }
179 
180 
181  virtual void copyFrom(const SOP_NodeParms *src)
182  {
183  *this = *((const SOP_TorusParms *)src);
184  }
185 
186  template <typename T>
187  void
188  doGetParmValue(exint idx, T &value) const
189  {
190  switch (idx)
191  {
192  case 0:
193  coerceValue(value, myType);
194  break;
195  case 1:
196  coerceValue(value, mySurftype);
197  break;
198  case 2:
199  coerceValue(value, myOrient);
200  break;
201  case 3:
202  coerceValue(value, myRad);
203  break;
204  case 4:
205  coerceValue(value, myT);
206  break;
207  case 5:
208  coerceValue(value, myR);
209  break;
210  case 6:
211  coerceValue(value, myScale);
212  break;
213  case 7:
214  coerceValue(value, myImperfect);
215  break;
216  case 8:
217  coerceValue(value, myOrderu);
218  break;
219  case 9:
220  coerceValue(value, myOrderv);
221  break;
222  case 10:
223  coerceValue(value, myCloseu);
224  break;
225  case 11:
226  coerceValue(value, myClosev);
227  break;
228  case 12:
229  coerceValue(value, myCapu);
230  break;
231  case 13:
232  coerceValue(value, myCapv);
233  break;
234  case 14:
235  coerceValue(value, myRows);
236  break;
237  case 15:
238  coerceValue(value, myCols);
239  break;
240  case 16:
241  coerceValue(value, myAngleu);
242  break;
243  case 17:
244  coerceValue(value, myAnglev);
245  break;
246 
247  }
248  }
249 
250  void getParmValue(exint idx, exint &value) const
251  { doGetParmValue(idx, value); }
252  void getParmValue(exint idx, fpreal &value) const
253  { doGetParmValue(idx, value); }
255  { doGetParmValue(idx, value); }
257  { doGetParmValue(idx, value); }
259  { doGetParmValue(idx, value); }
261  { doGetParmValue(idx, value); }
263  { doGetParmValue(idx, value); }
265  { doGetParmValue(idx, value); }
267  { doGetParmValue(idx, value); }
269  { doGetParmValue(idx, value); }
271  { doGetParmValue(idx, value); }
272 
273  template <typename T>
274  void
275  doSetParmValue(exint idx, const T &value)
276  {
277  switch (idx)
278  {
279  case 0:
280  coerceValue(myType, value);
281  break;
282  case 1:
283  coerceValue(mySurftype, value);
284  break;
285  case 2:
286  coerceValue(myOrient, value);
287  break;
288  case 3:
289  coerceValue(myRad, value);
290  break;
291  case 4:
292  coerceValue(myT, value);
293  break;
294  case 5:
295  coerceValue(myR, value);
296  break;
297  case 6:
298  coerceValue(myScale, value);
299  break;
300  case 7:
301  coerceValue(myImperfect, value);
302  break;
303  case 8:
304  coerceValue(myOrderu, value);
305  break;
306  case 9:
307  coerceValue(myOrderv, value);
308  break;
309  case 10:
310  coerceValue(myCloseu, value);
311  break;
312  case 11:
313  coerceValue(myClosev, value);
314  break;
315  case 12:
316  coerceValue(myCapu, value);
317  break;
318  case 13:
319  coerceValue(myCapv, value);
320  break;
321  case 14:
322  coerceValue(myRows, value);
323  break;
324  case 15:
325  coerceValue(myCols, value);
326  break;
327  case 16:
328  coerceValue(myAngleu, value);
329  break;
330  case 17:
331  coerceValue(myAnglev, value);
332  break;
333 
334  }
335  }
336 
337  void setParmValue(exint idx, const exint &value)
338  { doSetParmValue(idx, value); }
339  void setParmValue(exint idx, const fpreal &value)
340  { doSetParmValue(idx, value); }
341  void setParmValue(exint idx, const UT_Vector2D &value)
342  { doSetParmValue(idx, value); }
343  void setParmValue(exint idx, const UT_Vector3D &value)
344  { doSetParmValue(idx, value); }
345  void setParmValue(exint idx, const UT_Vector4D &value)
346  { doSetParmValue(idx, value); }
347  void setParmValue(exint idx, const UT_Matrix2D &value)
348  { doSetParmValue(idx, value); }
349  void setParmValue(exint idx, const UT_Matrix3D &value)
350  { doSetParmValue(idx, value); }
351  void setParmValue(exint idx, const UT_Matrix4D &value)
352  { doSetParmValue(idx, value); }
354  { doSetParmValue(idx, value); }
356  { doSetParmValue(idx, value); }
358  { doSetParmValue(idx, value); }
359 
360  virtual exint getNumParms() const
361  {
362  return 18;
363  }
364 
365  virtual const char *getParmName(exint fieldnum) const
366  {
367  switch (fieldnum)
368  {
369  case 0:
370  return "type";
371  case 1:
372  return "surftype";
373  case 2:
374  return "orient";
375  case 3:
376  return "rad";
377  case 4:
378  return "t";
379  case 5:
380  return "r";
381  case 6:
382  return "scale";
383  case 7:
384  return "imperfect";
385  case 8:
386  return "orderu";
387  case 9:
388  return "orderv";
389  case 10:
390  return "closeu";
391  case 11:
392  return "closev";
393  case 12:
394  return "capu";
395  case 13:
396  return "capv";
397  case 14:
398  return "rows";
399  case 15:
400  return "cols";
401  case 16:
402  return "angleu";
403  case 17:
404  return "anglev";
405 
406  }
407  return 0;
408  }
409 
410  virtual ParmType getParmType(exint fieldnum) const
411  {
412  switch (fieldnum)
413  {
414  case 0:
415  return PARM_INTEGER;
416  case 1:
417  return PARM_INTEGER;
418  case 2:
419  return PARM_INTEGER;
420  case 3:
421  return PARM_VECTOR2;
422  case 4:
423  return PARM_VECTOR3;
424  case 5:
425  return PARM_VECTOR3;
426  case 6:
427  return PARM_FLOAT;
428  case 7:
429  return PARM_INTEGER;
430  case 8:
431  return PARM_INTEGER;
432  case 9:
433  return PARM_INTEGER;
434  case 10:
435  return PARM_INTEGER;
436  case 11:
437  return PARM_INTEGER;
438  case 12:
439  return PARM_INTEGER;
440  case 13:
441  return PARM_INTEGER;
442  case 14:
443  return PARM_INTEGER;
444  case 15:
445  return PARM_INTEGER;
446  case 16:
447  return PARM_VECTOR2;
448  case 17:
449  return PARM_VECTOR2;
450 
451  }
452  return PARM_UNSUPPORTED;
453  }
454 
455  // Boiler plate to load individual types.
456  static void loadData(UT_IStream &is, int64 &v)
457  { is.bread(&v, 1); }
458  static void loadData(UT_IStream &is, bool &v)
459  { int64 iv; is.bread(&iv, 1); v = iv; }
460  static void loadData(UT_IStream &is, fpreal64 &v)
461  { is.bread<fpreal64>(&v, 1); }
462  static void loadData(UT_IStream &is, UT_Vector2D &v)
463  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
464  static void loadData(UT_IStream &is, UT_Vector3D &v)
465  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
466  is.bread<fpreal64>(&v.z(), 1); }
467  static void loadData(UT_IStream &is, UT_Vector4D &v)
468  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
469  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
470  static void loadData(UT_IStream &is, UT_Matrix2D &v)
471  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
472  static void loadData(UT_IStream &is, UT_Matrix3D &v)
473  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
474  static void loadData(UT_IStream &is, UT_Matrix4D &v)
475  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
476  static void loadData(UT_IStream &is, UT_Vector2I &v)
477  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
478  static void loadData(UT_IStream &is, UT_Vector3I &v)
479  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
480  is.bread<int64>(&v.z(), 1); }
481  static void loadData(UT_IStream &is, UT_Vector4I &v)
482  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
483  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
485  { is.bread(v); }
487  { UT_StringHolder rampdata;
488  loadData(is, rampdata);
489  if (rampdata.isstring())
490  {
491  v.reset(new UT_Ramp());
492  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
493  v->load(istr);
494  }
495  else v.reset();
496  }
499  loadData(is, data);
500  if (data.isstring())
501  {
502  // Find the data type.
503  char *colon = UT_StringWrap(data).findChar(':');
504  if (colon)
505  {
506  int typelen = colon - data.buffer();
508  type.strncpy(data.buffer(), typelen);
509  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
510 
511  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
512  }
513  }
514  else v.reset();
515  }
516 
517  static void saveData(std::ostream &os, int64 v)
518  { UTwrite(os, &v); }
519  static void saveData(std::ostream &os, bool v)
520  { int64 iv = v; UTwrite(os, &iv); }
521  static void saveData(std::ostream &os, fpreal64 v)
522  { UTwrite<fpreal64>(os, &v); }
523  static void saveData(std::ostream &os, UT_Vector2D v)
524  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
525  static void saveData(std::ostream &os, UT_Vector3D v)
526  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
527  UTwrite<fpreal64>(os, &v.z()); }
528  static void saveData(std::ostream &os, UT_Vector4D v)
529  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
530  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
531  static void saveData(std::ostream &os, UT_Matrix2D v)
533  static void saveData(std::ostream &os, UT_Matrix3D v)
535  static void saveData(std::ostream &os, UT_Matrix4D v)
537  static void saveData(std::ostream &os, UT_StringHolder s)
538  { UT_StringWrap(s).saveBinary(os); }
539  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
540  { UT_StringHolder result;
541  UT_OStringStream ostr;
542  if (s) s->save(ostr);
543  result = ostr.str();
544  saveData(os, result);
545  }
546  static void saveData(std::ostream &os, PRM_DataItemHandle s)
547  { UT_StringHolder result;
548  UT_OStringStream ostr;
549  if (s)
550  {
551  ostr << s->getDataTypeToken();
552  ostr << ":";
553  s->saveBinary(ostr);
554  }
555  result = ostr.str();
556  saveData(os, result);
557  }
558 
559 
560  void save(std::ostream &os) const
561  {
562  int32 v = version();
563  UTwrite(os, &v);
564  saveData(os, myType);
565  saveData(os, mySurftype);
566  saveData(os, myOrient);
567  saveData(os, myRad);
568  saveData(os, myT);
569  saveData(os, myR);
570  saveData(os, myScale);
571  saveData(os, myImperfect);
572  saveData(os, myOrderu);
573  saveData(os, myOrderv);
574  saveData(os, myCloseu);
575  saveData(os, myClosev);
576  saveData(os, myCapu);
577  saveData(os, myCapv);
578  saveData(os, myRows);
579  saveData(os, myCols);
580  saveData(os, myAngleu);
581  saveData(os, myAnglev);
582 
583  }
584 
585  bool load(UT_IStream &is)
586  {
587  int32 v;
588  is.bread(&v, 1);
589  if (version() != v)
590  {
591  // Fail incompatible versions
592  return false;
593  }
594  loadData(is, myType);
595  loadData(is, mySurftype);
596  loadData(is, myOrient);
597  loadData(is, myRad);
598  loadData(is, myT);
599  loadData(is, myR);
600  loadData(is, myScale);
601  loadData(is, myImperfect);
602  loadData(is, myOrderu);
603  loadData(is, myOrderv);
604  loadData(is, myCloseu);
605  loadData(is, myClosev);
606  loadData(is, myCapu);
607  loadData(is, myCapv);
608  loadData(is, myRows);
609  loadData(is, myCols);
610  loadData(is, myAngleu);
611  loadData(is, myAnglev);
612 
613  return true;
614  }
615 
616  Type getType() const { return Type(myType); }
617  void setType(Type val) { myType = int64(val); }
618  Type opType(const SOP_NodeVerb::CookParms &cookparms) const
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getType();
622  int64 result;
623  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
624  return Type(result);
625  }
626  Surftype getSurftype() const { return Surftype(mySurftype); }
627  void setSurftype(Surftype val) { mySurftype = int64(val); }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getSurftype();
632  int64 result;
633  OP_Utils::evalOpParm(result, thissop, "surftype", cookparms.getCookTime(), 0);
634  return Surftype(result);
635  }
636  Orient getOrient() const { return Orient(myOrient); }
637  void setOrient(Orient val) { myOrient = int64(val); }
638  Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getOrient();
642  int64 result;
643  OP_Utils::evalOpParm(result, thissop, "orient", cookparms.getCookTime(), 0);
644  return Orient(result);
645  }
646  UT_Vector2D getRad() const { return myRad; }
647  void setRad(UT_Vector2D val) { myRad = val; }
648  UT_Vector2D opRad(const SOP_NodeVerb::CookParms &cookparms) const
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getRad();
652  UT_Vector2D result;
653  OP_Utils::evalOpParm(result, thissop, "rad", cookparms.getCookTime(), 0);
654  return result;
655  }
656  UT_Vector3D getT() const { return myT; }
657  void setT(UT_Vector3D val) { myT = val; }
658  UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getT();
662  UT_Vector3D result;
663  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
664  return result;
665  }
666  UT_Vector3D getR() const { return myR; }
667  void setR(UT_Vector3D val) { myR = val; }
668  UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getR();
672  UT_Vector3D result;
673  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
674  return result;
675  }
676  fpreal64 getScale() const { return myScale; }
677  void setScale(fpreal64 val) { myScale = val; }
678  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getScale();
682  fpreal64 result;
683  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
684  return result;
685  }
686  bool getImperfect() const { return myImperfect; }
687  void setImperfect(bool val) { myImperfect = val; }
688  bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getImperfect();
692  bool result;
693  OP_Utils::evalOpParm(result, thissop, "imperfect", cookparms.getCookTime(), 0);
694  return result;
695  }
696  int64 getOrderu() const { return myOrderu; }
697  void setOrderu(int64 val) { myOrderu = val; }
698  int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getOrderu();
702  int64 result;
703  OP_Utils::evalOpParm(result, thissop, "orderu", cookparms.getCookTime(), 0);
704  return result;
705  }
706  int64 getOrderv() const { return myOrderv; }
707  void setOrderv(int64 val) { myOrderv = val; }
708  int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getOrderv();
712  int64 result;
713  OP_Utils::evalOpParm(result, thissop, "orderv", cookparms.getCookTime(), 0);
714  return result;
715  }
716  bool getCloseu() const { return myCloseu; }
717  void setCloseu(bool val) { myCloseu = val; }
718  bool opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getCloseu();
722  bool result;
723  OP_Utils::evalOpParm(result, thissop, "closeu", cookparms.getCookTime(), 0);
724  return result;
725  }
726  bool getClosev() const { return myClosev; }
727  void setClosev(bool val) { myClosev = val; }
728  bool opClosev(const SOP_NodeVerb::CookParms &cookparms) const
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getClosev();
732  bool result;
733  OP_Utils::evalOpParm(result, thissop, "closev", cookparms.getCookTime(), 0);
734  return result;
735  }
736  bool getCapu() const { return myCapu; }
737  void setCapu(bool val) { myCapu = val; }
738  bool opCapu(const SOP_NodeVerb::CookParms &cookparms) const
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getCapu();
742  bool result;
743  OP_Utils::evalOpParm(result, thissop, "capu", cookparms.getCookTime(), 0);
744  return result;
745  }
746  bool getCapv() const { return myCapv; }
747  void setCapv(bool val) { myCapv = val; }
748  bool opCapv(const SOP_NodeVerb::CookParms &cookparms) const
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getCapv();
752  bool result;
753  OP_Utils::evalOpParm(result, thissop, "capv", cookparms.getCookTime(), 0);
754  return result;
755  }
756  int64 getRows() const { return myRows; }
757  void setRows(int64 val) { myRows = val; }
758  int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getRows();
762  int64 result;
763  OP_Utils::evalOpParm(result, thissop, "rows", cookparms.getCookTime(), 0);
764  return result;
765  }
766  int64 getCols() const { return myCols; }
767  void setCols(int64 val) { myCols = val; }
768  int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getCols();
772  int64 result;
773  OP_Utils::evalOpParm(result, thissop, "cols", cookparms.getCookTime(), 0);
774  return result;
775  }
776  UT_Vector2D getAngleu() const { return myAngleu; }
777  void setAngleu(UT_Vector2D val) { myAngleu = val; }
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getAngleu();
782  UT_Vector2D result;
783  OP_Utils::evalOpParm(result, thissop, "angleu", cookparms.getCookTime(), 0);
784  return result;
785  }
786  UT_Vector2D getAnglev() const { return myAnglev; }
787  void setAnglev(UT_Vector2D val) { myAnglev = val; }
789  {
790  SOP_Node *thissop = cookparms.getNode();
791  if (!thissop) return getAnglev();
792  UT_Vector2D result;
793  OP_Utils::evalOpParm(result, thissop, "anglev", cookparms.getCookTime(), 0);
794  return result;
795  }
796 
797 private:
798  int64 myType;
799  int64 mySurftype;
800  int64 myOrient;
801  UT_Vector2D myRad;
802  UT_Vector3D myT;
803  UT_Vector3D myR;
804  fpreal64 myScale;
805  bool myImperfect;
806  int64 myOrderu;
807  int64 myOrderv;
808  bool myCloseu;
809  bool myClosev;
810  bool myCapu;
811  bool myCapv;
812  int64 myRows;
813  int64 myCols;
814  UT_Vector2D myAngleu;
815  UT_Vector2D myAnglev;
816 
817 };
void getParmValue(exint idx, exint &value) const
static int version()
static void saveData(std::ostream &os, UT_Vector2D v)
void setParmValue(exint idx, const UT_Vector3D &value)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const SOP_TorusParms &src) const
void doGetParmValue(exint idx, T &value) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void getParmValue(exint idx, UT_Matrix3D &value) const
void setT(UT_Vector3D val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_Vector2D opAnglev(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
bool getClosev() const
T & z(void)
Definition: UT_Vector4.h:379
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setCols(int64 val)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void setSurftype(Surftype val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal getTime() const
Definition: OP_Context.h:60
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_StringHolder &value)
const GLdouble * v
Definition: glcorearb.h:836
UT_Vector2T< fpreal64 > UT_Vector2D
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
void setClosev(bool val)
void setParmValue(exint idx, const UT_Vector4D &value)
bool getCapu() const
virtual const char * getParmName(exint fieldnum) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
virtual ~SOP_TorusParms()
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void setAngleu(UT_Vector2D val)
An output stream object that owns its own string buffer storage.
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
int64 getCols() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
static void saveData(std::ostream &os, bool v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setParmValue(exint idx, const UT_Vector2D &value)
void getParmValue(exint idx, fpreal &value) const
void setParmValue(exint idx, const UT_Matrix3D &value)
void getParmValue(exint idx, UT_Vector4D &value) const
bool operator!=(const SOP_TorusParms &src) const
bool opImperfect(const SOP_NodeVerb::CookParms &cookparms) const
bool getCloseu() const
static void saveData(std::ostream &os, UT_Vector4D v)
bool opClosev(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
void getParmValue(exint idx, UT_Matrix4D &value) const
UT_Vector2D getAnglev() const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
static void saveData(std::ostream &os, UT_Matrix2D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
Type getType() const
long long int64
Definition: SYS_Types.h:107
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Vector3D getT() const
void setOrderv(int64 val)
UT_Vector2D getRad() const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setScale(fpreal64 val)
int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void setCapv(bool val)
bool load(UT_IStream &is)
exint length() const
UT_Vector2D opRad(const SOP_NodeVerb::CookParms &cookparms) 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_Matrix4D &v)
int64 getOrderv() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
UT_Vector2D opAngleu(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getR() const
int64 exint
Definition: SYS_Types.h:116
bool getImperfect() const
void setCapu(bool val)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
static void saveData(std::ostream &os, int64 v)
void setAnglev(UT_Vector2D val)
static void saveData(std::ostream &os, UT_Matrix3D v)
void setParmValue(exint idx, const UT_Matrix4D &value)
static void loadData(UT_IStream &is, bool &v)
UT_Vector3T< fpreal64 > UT_Vector3D
void setOrient(Orient val)
void setR(UT_Vector3D val)
GLboolean * data
Definition: glcorearb.h:130
fpreal64 getScale() const
int int32
Definition: SYS_Types.h:35
static void saveData(std::ostream &os, UT_Vector3D v)
T & y(void)
Definition: UT_Vector4.h:377
void setRows(int64 val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setImperfect(bool val)
UT_Vector2D getAngleu() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
int64 getRows() const
void setParmValue(exint idx, const fpreal &value)
virtual ParmType getParmType(exint fieldnum) const
void getParmValue(exint idx, UT_StringHolder &value) const
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
static void loadData(UT_IStream &is, UT_Vector3I &v)
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector3D &value) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setCloseu(bool val)
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doSetParmValue(exint idx, const T &value)
GLuint GLfloat * val
Definition: glcorearb.h:1607
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:665
void getParmValue(exint idx, UT_Vector2D &value) const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, int64 &v)
void setParmValue(exint idx, const exint &value)
virtual void copyFrom(const SOP_NodeParms *src)
bool opCapv(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
bool opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
T & x(void)
Definition: UT_Vector4.h:375
Surftype getSurftype() const
T & y(void)
Definition: UT_Vector2.h:287
bool getCapv() const
GLboolean r
Definition: glcorearb.h:1221
void setOrderu(int64 val)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void setType(Type val)
T & w(void)
Definition: UT_Vector4.h:381
bool opCapu(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix2D &value)
virtual exint getNumParms() const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void save(std::ostream &os) const
void setRad(UT_Vector2D val)
static void loadData(UT_IStream &is, fpreal64 &v)
int64 getOrderu() const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1792
Orient getOrient() const