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