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