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