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