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