HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_PointGenerate.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 
23 {
24 public:
25  static int version() { return 1; }
26 
28  {
29  myGroup = ""_sh;
30  myKeep = false;
31  myPtsperpt = false;
32  myNpts = 5000;
33  myNptsperpt = 10;
34  myDoattrib = false;
35  myAttrib = ""_sh;
36  mySeed = 0;
37  myDogroup = false;
38  myGgroup = "generated"_sh;
39  myDopointnum = false;
40  mySpointnum = "pointnum"_sh;
41  myDopointidx = false;
42  mySpointidx = "pointidx"_sh;
43  myDocopyattribs = false;
44  myAttribstocopy = "*"_sh;
45 
46  }
47 
48  explicit SOP_PointGenerateParms(const SOP_PointGenerateParms &) = default;
49 
51 
53  {
54  if (myGroup != src.myGroup) return false;
55  if (myKeep != src.myKeep) return false;
56  if (myPtsperpt != src.myPtsperpt) return false;
57  if (myNpts != src.myNpts) return false;
58  if (myNptsperpt != src.myNptsperpt) return false;
59  if (myDoattrib != src.myDoattrib) return false;
60  if (myAttrib != src.myAttrib) return false;
61  if (mySeed != src.mySeed) return false;
62  if (myDogroup != src.myDogroup) return false;
63  if (myGgroup != src.myGgroup) return false;
64  if (myDopointnum != src.myDopointnum) return false;
65  if (mySpointnum != src.mySpointnum) return false;
66  if (myDopointidx != src.myDopointidx) return false;
67  if (mySpointidx != src.mySpointidx) return false;
68  if (myDocopyattribs != src.myDocopyattribs) return false;
69  if (myAttribstocopy != src.myAttribstocopy) return false;
70 
71  return true;
72  }
73 
74 
75 
76  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
77  {
78  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
79  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
80  else myGroup = ""_sh;
81  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
82  OP_Utils::evalOpParm(myKeep, node, "keep", time, 0);
83  else myKeep = false;
84  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
85  OP_Utils::evalOpParm(myPtsperpt, node, "ptsperpt", time, 0);
86  else myPtsperpt = false;
87  if (true && ( (!((((node->getInput(0)!=0)==1)&&(getPtsperpt()==1)))) ) )
88  OP_Utils::evalOpParm(myNpts, node, "npts", time, 0);
89  else myNpts = 5000;
90  if (true && ( (!((((node->getInput(0)!=0)==0))||((getPtsperpt()==0)))) ) )
91  OP_Utils::evalOpParm(myNptsperpt, node, "nptsperpt", time, 0);
92  else myNptsperpt = 10;
93  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
94  OP_Utils::evalOpParm(myDoattrib, node, "doattrib", time, 0);
95  else myDoattrib = false;
96  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDoattrib()==0)))) ) )
97  OP_Utils::evalOpParm(myAttrib, node, "attrib", time, 0);
98  else myAttrib = ""_sh;
99  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
100  OP_Utils::evalOpParm(mySeed, node, "seed", time, 0);
101  else mySeed = 0;
102  if (true)
103  OP_Utils::evalOpParm(myDogroup, node, "dogroup", time, 0);
104  else myDogroup = false;
105  if (true && ( (!(((getDogroup()==0)))) ) )
106  OP_Utils::evalOpParm(myGgroup, node, "ggroup", time, 0);
107  else myGgroup = "generated"_sh;
108  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
109  OP_Utils::evalOpParm(myDopointnum, node, "dopointnum", time, 0);
110  else myDopointnum = false;
111  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDopointnum()==0)))) ) )
112  OP_Utils::evalOpParm(mySpointnum, node, "spointnum", time, 0);
113  else mySpointnum = "pointnum"_sh;
114  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
115  OP_Utils::evalOpParm(myDopointidx, node, "dopointidx", time, 0);
116  else myDopointidx = false;
117  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDopointidx()==0)))) ) )
118  OP_Utils::evalOpParm(mySpointidx, node, "spointidx", time, 0);
119  else mySpointidx = "pointidx"_sh;
120  if (true && ( (!((((node->getInput(0)!=0)==0)))) ) )
121  OP_Utils::evalOpParm(myDocopyattribs, node, "docopyattribs", time, 0);
122  else myDocopyattribs = false;
123  if (true && ( (!((((node->getInput(0)!=0)==0))||((getDocopyattribs()==0)))) ) )
124  OP_Utils::evalOpParm(myAttribstocopy, node, "attribstocopy", time, 0);
125  else myAttribstocopy = "*"_sh;
126 
127  }
128 
129 
130  virtual void loadFromOpSubclass(const LoadParms &loadparms)
131  {
132  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
133  }
134 
135 
136  virtual void copyFrom(const SOP_NodeParms *src)
137  {
138  *this = *((const SOP_PointGenerateParms *)src);
139  }
140 
141  template <typename T>
142  void
143  doGetParmValue(exint idx, T &value) const
144  {
145  switch (idx)
146  {
147  case 0:
148  coerceValue(value, myGroup);
149  break;
150  case 1:
151  coerceValue(value, myKeep);
152  break;
153  case 2:
154  coerceValue(value, myPtsperpt);
155  break;
156  case 3:
157  coerceValue(value, myNpts);
158  break;
159  case 4:
160  coerceValue(value, myNptsperpt);
161  break;
162  case 5:
163  coerceValue(value, myDoattrib);
164  break;
165  case 6:
166  coerceValue(value, myAttrib);
167  break;
168  case 7:
169  coerceValue(value, mySeed);
170  break;
171  case 8:
172  coerceValue(value, myDogroup);
173  break;
174  case 9:
175  coerceValue(value, myGgroup);
176  break;
177  case 10:
178  coerceValue(value, myDopointnum);
179  break;
180  case 11:
181  coerceValue(value, mySpointnum);
182  break;
183  case 12:
184  coerceValue(value, myDopointidx);
185  break;
186  case 13:
187  coerceValue(value, mySpointidx);
188  break;
189  case 14:
190  coerceValue(value, myDocopyattribs);
191  break;
192  case 15:
193  coerceValue(value, myAttribstocopy);
194  break;
195 
196  }
197  }
198 
199  void getParmValue(exint idx, exint &value) const
200  { doGetParmValue(idx, value); }
201  void getParmValue(exint idx, fpreal &value) const
202  { doGetParmValue(idx, value); }
204  { doGetParmValue(idx, value); }
206  { doGetParmValue(idx, value); }
208  { doGetParmValue(idx, value); }
210  { doGetParmValue(idx, value); }
212  { doGetParmValue(idx, value); }
214  { doGetParmValue(idx, value); }
216  { doGetParmValue(idx, value); }
218  { doGetParmValue(idx, value); }
220  { doGetParmValue(idx, value); }
221 
222  template <typename T>
223  void
224  doSetParmValue(exint idx, const T &value)
225  {
226  switch (idx)
227  {
228  case 0:
229  coerceValue(myGroup, value);
230  break;
231  case 1:
232  coerceValue(myKeep, value);
233  break;
234  case 2:
235  coerceValue(myPtsperpt, value);
236  break;
237  case 3:
238  coerceValue(myNpts, value);
239  break;
240  case 4:
241  coerceValue(myNptsperpt, value);
242  break;
243  case 5:
244  coerceValue(myDoattrib, value);
245  break;
246  case 6:
247  coerceValue(myAttrib, value);
248  break;
249  case 7:
250  coerceValue(mySeed, value);
251  break;
252  case 8:
253  coerceValue(myDogroup, value);
254  break;
255  case 9:
256  coerceValue(myGgroup, value);
257  break;
258  case 10:
259  coerceValue(myDopointnum, value);
260  break;
261  case 11:
262  coerceValue(mySpointnum, value);
263  break;
264  case 12:
265  coerceValue(myDopointidx, value);
266  break;
267  case 13:
268  coerceValue(mySpointidx, value);
269  break;
270  case 14:
271  coerceValue(myDocopyattribs, value);
272  break;
273  case 15:
274  coerceValue(myAttribstocopy, value);
275  break;
276 
277  }
278  }
279 
280  void setParmValue(exint idx, const exint &value)
281  { doSetParmValue(idx, value); }
282  void setParmValue(exint idx, const fpreal &value)
283  { doSetParmValue(idx, value); }
284  void setParmValue(exint idx, const UT_Vector2D &value)
285  { doSetParmValue(idx, value); }
286  void setParmValue(exint idx, const UT_Vector3D &value)
287  { doSetParmValue(idx, value); }
288  void setParmValue(exint idx, const UT_Vector4D &value)
289  { doSetParmValue(idx, value); }
290  void setParmValue(exint idx, const UT_Matrix2D &value)
291  { doSetParmValue(idx, value); }
292  void setParmValue(exint idx, const UT_Matrix3D &value)
293  { doSetParmValue(idx, value); }
294  void setParmValue(exint idx, const UT_Matrix4D &value)
295  { doSetParmValue(idx, value); }
297  { doSetParmValue(idx, value); }
299  { doSetParmValue(idx, value); }
301  { doSetParmValue(idx, value); }
302 
303  virtual exint getNumParms() const
304  {
305  return 16;
306  }
307 
308  virtual const char *getParmName(exint fieldnum) const
309  {
310  switch (fieldnum)
311  {
312  case 0:
313  return "group";
314  case 1:
315  return "keep";
316  case 2:
317  return "ptsperpt";
318  case 3:
319  return "npts";
320  case 4:
321  return "nptsperpt";
322  case 5:
323  return "doattrib";
324  case 6:
325  return "attrib";
326  case 7:
327  return "seed";
328  case 8:
329  return "dogroup";
330  case 9:
331  return "ggroup";
332  case 10:
333  return "dopointnum";
334  case 11:
335  return "spointnum";
336  case 12:
337  return "dopointidx";
338  case 13:
339  return "spointidx";
340  case 14:
341  return "docopyattribs";
342  case 15:
343  return "attribstocopy";
344 
345  }
346  return 0;
347  }
348 
349  virtual ParmType getParmType(exint fieldnum) const
350  {
351  switch (fieldnum)
352  {
353  case 0:
354  return PARM_STRING;
355  case 1:
356  return PARM_INTEGER;
357  case 2:
358  return PARM_INTEGER;
359  case 3:
360  return PARM_INTEGER;
361  case 4:
362  return PARM_FLOAT;
363  case 5:
364  return PARM_INTEGER;
365  case 6:
366  return PARM_STRING;
367  case 7:
368  return PARM_FLOAT;
369  case 8:
370  return PARM_INTEGER;
371  case 9:
372  return PARM_STRING;
373  case 10:
374  return PARM_INTEGER;
375  case 11:
376  return PARM_STRING;
377  case 12:
378  return PARM_INTEGER;
379  case 13:
380  return PARM_STRING;
381  case 14:
382  return PARM_INTEGER;
383  case 15:
384  return PARM_STRING;
385 
386  }
387  return PARM_UNSUPPORTED;
388  }
389 
390  // Boiler plate to load individual types.
391  static void loadData(UT_IStream &is, int64 &v)
392  { is.bread(&v, 1); }
393  static void loadData(UT_IStream &is, bool &v)
394  { int64 iv; is.bread(&iv, 1); v = iv; }
395  static void loadData(UT_IStream &is, fpreal64 &v)
396  { is.bread<fpreal64>(&v, 1); }
397  static void loadData(UT_IStream &is, UT_Vector2D &v)
398  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
399  static void loadData(UT_IStream &is, UT_Vector3D &v)
400  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
401  is.bread<fpreal64>(&v.z(), 1); }
402  static void loadData(UT_IStream &is, UT_Vector4D &v)
403  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
404  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
405  static void loadData(UT_IStream &is, UT_Matrix2D &v)
406  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
407  static void loadData(UT_IStream &is, UT_Matrix3D &v)
408  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
409  static void loadData(UT_IStream &is, UT_Matrix4D &v)
410  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
411  static void loadData(UT_IStream &is, UT_Vector2I &v)
412  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
413  static void loadData(UT_IStream &is, UT_Vector3I &v)
414  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
415  is.bread<int64>(&v.z(), 1); }
416  static void loadData(UT_IStream &is, UT_Vector4I &v)
417  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
418  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
420  { is.bread(v); }
422  { UT_StringHolder rampdata;
423  loadData(is, rampdata);
424  if (rampdata.isstring())
425  {
426  v.reset(new UT_Ramp());
427  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
428  v->load(istr);
429  }
430  else v.reset();
431  }
434  loadData(is, data);
435  if (data.isstring())
436  {
437  // Find the data type.
438  char *colon = UT_StringWrap(data).findChar(':');
439  if (colon)
440  {
441  int typelen = colon - data.buffer();
443  type.strncpy(data.buffer(), typelen);
444  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
445 
446  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
447  }
448  }
449  else v.reset();
450  }
451 
452  static void saveData(std::ostream &os, int64 v)
453  { UTwrite(os, &v); }
454  static void saveData(std::ostream &os, bool v)
455  { int64 iv = v; UTwrite(os, &iv); }
456  static void saveData(std::ostream &os, fpreal64 v)
457  { UTwrite<fpreal64>(os, &v); }
458  static void saveData(std::ostream &os, UT_Vector2D v)
459  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
460  static void saveData(std::ostream &os, UT_Vector3D v)
461  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
462  UTwrite<fpreal64>(os, &v.z()); }
463  static void saveData(std::ostream &os, UT_Vector4D v)
464  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
465  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
466  static void saveData(std::ostream &os, UT_Matrix2D v)
468  static void saveData(std::ostream &os, UT_Matrix3D v)
470  static void saveData(std::ostream &os, UT_Matrix4D v)
472  static void saveData(std::ostream &os, UT_StringHolder s)
473  { UT_StringWrap(s).saveBinary(os); }
474  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
475  { UT_StringHolder result;
476  UT_OStringStream ostr;
477  if (s) s->save(ostr);
478  result = ostr.str();
479  saveData(os, result);
480  }
481  static void saveData(std::ostream &os, PRM_DataItemHandle s)
482  { UT_StringHolder result;
483  UT_OStringStream ostr;
484  if (s)
485  {
486  ostr << s->getDataTypeToken();
487  ostr << ":";
488  s->saveBinary(ostr);
489  }
490  result = ostr.str();
491  saveData(os, result);
492  }
493 
494 
495  void save(std::ostream &os) const
496  {
497  int32 v = version();
498  UTwrite(os, &v);
499  saveData(os, myGroup);
500  saveData(os, myKeep);
501  saveData(os, myPtsperpt);
502  saveData(os, myNpts);
503  saveData(os, myNptsperpt);
504  saveData(os, myDoattrib);
505  saveData(os, myAttrib);
506  saveData(os, mySeed);
507  saveData(os, myDogroup);
508  saveData(os, myGgroup);
509  saveData(os, myDopointnum);
510  saveData(os, mySpointnum);
511  saveData(os, myDopointidx);
512  saveData(os, mySpointidx);
513  saveData(os, myDocopyattribs);
514  saveData(os, myAttribstocopy);
515 
516  }
517 
518  bool load(UT_IStream &is)
519  {
520  int32 v;
521  is.bread(&v, 1);
522  if (version() != v)
523  {
524  // Fail incompatible versions
525  return false;
526  }
527  loadData(is, myGroup);
528  loadData(is, myKeep);
529  loadData(is, myPtsperpt);
530  loadData(is, myNpts);
531  loadData(is, myNptsperpt);
532  loadData(is, myDoattrib);
533  loadData(is, myAttrib);
534  loadData(is, mySeed);
535  loadData(is, myDogroup);
536  loadData(is, myGgroup);
537  loadData(is, myDopointnum);
538  loadData(is, mySpointnum);
539  loadData(is, myDopointidx);
540  loadData(is, mySpointidx);
541  loadData(is, myDocopyattribs);
542  loadData(is, myAttribstocopy);
543 
544  return true;
545  }
546 
547  const UT_StringHolder & getGroup() const { return myGroup; }
548  void setGroup(const UT_StringHolder & val) { myGroup = val; }
550  {
551  SOP_Node *thissop = cookparms.getNode();
552  if (!thissop) return getGroup();
553  UT_StringHolder result;
554  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
555  return result;
556  }
557  bool getKeep() const { return myKeep; }
558  void setKeep(bool val) { myKeep = val; }
559  bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
560  {
561  SOP_Node *thissop = cookparms.getNode();
562  if (!thissop) return getKeep();
563  bool result;
564  OP_Utils::evalOpParm(result, thissop, "keep", cookparms.getCookTime(), 0);
565  return result;
566  }
567  bool getPtsperpt() const { return myPtsperpt; }
568  void setPtsperpt(bool val) { myPtsperpt = val; }
569  bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
570  {
571  SOP_Node *thissop = cookparms.getNode();
572  if (!thissop) return getPtsperpt();
573  bool result;
574  OP_Utils::evalOpParm(result, thissop, "ptsperpt", cookparms.getCookTime(), 0);
575  return result;
576  }
577  int64 getNpts() const { return myNpts; }
578  void setNpts(int64 val) { myNpts = val; }
579  int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
580  {
581  SOP_Node *thissop = cookparms.getNode();
582  if (!thissop) return getNpts();
583  int64 result;
584  OP_Utils::evalOpParm(result, thissop, "npts", cookparms.getCookTime(), 0);
585  return result;
586  }
587  fpreal64 getNptsperpt() const { return myNptsperpt; }
588  void setNptsperpt(fpreal64 val) { myNptsperpt = val; }
590  {
591  SOP_Node *thissop = cookparms.getNode();
592  if (!thissop) return getNptsperpt();
593  fpreal64 result;
594  OP_Utils::evalOpParm(result, thissop, "nptsperpt", cookparms.getCookTime(), 0);
595  return result;
596  }
597  bool getDoattrib() const { return myDoattrib; }
598  void setDoattrib(bool val) { myDoattrib = val; }
599  bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
600  {
601  SOP_Node *thissop = cookparms.getNode();
602  if (!thissop) return getDoattrib();
603  bool result;
604  OP_Utils::evalOpParm(result, thissop, "doattrib", cookparms.getCookTime(), 0);
605  return result;
606  }
607  const UT_StringHolder & getAttrib() const { return myAttrib; }
608  void setAttrib(const UT_StringHolder & val) { myAttrib = val; }
610  {
611  SOP_Node *thissop = cookparms.getNode();
612  if (!thissop) return getAttrib();
613  UT_StringHolder result;
614  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
615  return result;
616  }
617  fpreal64 getSeed() const { return mySeed; }
618  void setSeed(fpreal64 val) { mySeed = val; }
619  fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
620  {
621  SOP_Node *thissop = cookparms.getNode();
622  if (!thissop) return getSeed();
623  fpreal64 result;
624  OP_Utils::evalOpParm(result, thissop, "seed", cookparms.getCookTime(), 0);
625  return result;
626  }
627  bool getDogroup() const { return myDogroup; }
628  void setDogroup(bool val) { myDogroup = val; }
629  bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
630  {
631  SOP_Node *thissop = cookparms.getNode();
632  if (!thissop) return getDogroup();
633  bool result;
634  OP_Utils::evalOpParm(result, thissop, "dogroup", cookparms.getCookTime(), 0);
635  return result;
636  }
637  const UT_StringHolder & getGgroup() const { return myGgroup; }
638  void setGgroup(const UT_StringHolder & val) { myGgroup = val; }
640  {
641  SOP_Node *thissop = cookparms.getNode();
642  if (!thissop) return getGgroup();
643  UT_StringHolder result;
644  OP_Utils::evalOpParm(result, thissop, "ggroup", cookparms.getCookTime(), 0);
645  return result;
646  }
647  bool getDopointnum() const { return myDopointnum; }
648  void setDopointnum(bool val) { myDopointnum = val; }
649  bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
650  {
651  SOP_Node *thissop = cookparms.getNode();
652  if (!thissop) return getDopointnum();
653  bool result;
654  OP_Utils::evalOpParm(result, thissop, "dopointnum", cookparms.getCookTime(), 0);
655  return result;
656  }
657  const UT_StringHolder & getSpointnum() const { return mySpointnum; }
658  void setSpointnum(const UT_StringHolder & val) { mySpointnum = val; }
660  {
661  SOP_Node *thissop = cookparms.getNode();
662  if (!thissop) return getSpointnum();
663  UT_StringHolder result;
664  OP_Utils::evalOpParm(result, thissop, "spointnum", cookparms.getCookTime(), 0);
665  return result;
666  }
667  bool getDopointidx() const { return myDopointidx; }
668  void setDopointidx(bool val) { myDopointidx = val; }
669  bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
670  {
671  SOP_Node *thissop = cookparms.getNode();
672  if (!thissop) return getDopointidx();
673  bool result;
674  OP_Utils::evalOpParm(result, thissop, "dopointidx", cookparms.getCookTime(), 0);
675  return result;
676  }
677  const UT_StringHolder & getSpointidx() const { return mySpointidx; }
678  void setSpointidx(const UT_StringHolder & val) { mySpointidx = val; }
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getSpointidx();
683  UT_StringHolder result;
684  OP_Utils::evalOpParm(result, thissop, "spointidx", cookparms.getCookTime(), 0);
685  return result;
686  }
687  bool getDocopyattribs() const { return myDocopyattribs; }
688  void setDocopyattribs(bool val) { myDocopyattribs = val; }
689  bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getDocopyattribs();
693  bool result;
694  OP_Utils::evalOpParm(result, thissop, "docopyattribs", cookparms.getCookTime(), 0);
695  return result;
696  }
697  const UT_StringHolder & getAttribstocopy() const { return myAttribstocopy; }
698  void setAttribstocopy(const UT_StringHolder & val) { myAttribstocopy = val; }
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getAttribstocopy();
703  UT_StringHolder result;
704  OP_Utils::evalOpParm(result, thissop, "attribstocopy", cookparms.getCookTime(), 0);
705  return result;
706  }
707 
708 private:
709  UT_StringHolder myGroup;
710  bool myKeep;
711  bool myPtsperpt;
712  int64 myNpts;
713  fpreal64 myNptsperpt;
714  bool myDoattrib;
715  UT_StringHolder myAttrib;
716  fpreal64 mySeed;
717  bool myDogroup;
718  UT_StringHolder myGgroup;
719  bool myDopointnum;
720  UT_StringHolder mySpointnum;
721  bool myDopointidx;
722  UT_StringHolder mySpointidx;
723  bool myDocopyattribs;
724  UT_StringHolder myAttribstocopy;
725 
726 };
static void saveData(std::ostream &os, UT_Vector4D v)
void doSetParmValue(exint idx, const T &value)
virtual void copyFrom(const SOP_NodeParms *src)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
static void loadData(UT_IStream &is, UT_Vector3I &v)
T & z(void)
Definition: UT_Vector4.h:372
virtual exint getNumParms() const
bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSpointidx(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setParmValue(exint idx, const UT_Vector4D &value)
static void saveData(std::ostream &os, UT_Vector3D v)
exint bread(int32 *buffer, exint asize=1)
void getParmValue(exint idx, UT_Vector3D &value) const
bool operator==(const SOP_PointGenerateParms &src) const
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opGgroup(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
static void saveData(std::ostream &os, UT_Matrix2D v)
bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
T & x(void)
Definition: UT_Vector2.h:284
An output stream object that owns its own string buffer storage.
void getParmValue(exint idx, fpreal &value) const
void setParmValue(exint idx, const UT_Matrix3D &value)
static void saveData(std::ostream &os, int64 v)
const UT_StringHolder & getGroup() const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void getParmValue(exint idx, UT_Vector4D &value) const
virtual const char * getParmName(exint fieldnum) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
const UT_StringHolder & getAttrib() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void doGetParmValue(exint idx, T &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
long long int64
Definition: SYS_Types.h:106
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setAttrib(const UT_StringHolder &val)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
void setParmValue(exint idx, const PRM_DataItemHandle &value)
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getGgroup() const
int64 exint
Definition: SYS_Types.h:115
void setParmValue(exint idx, const UT_Matrix4D &value)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:191
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
virtual ParmType getParmType(exint fieldnum) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void getParmValue(exint idx, UT_Vector2D &value) const
OP_Node * getInput(unsigned idx, bool mark_used=false) const
Returns the node connected to a particular input (may be null).
fpreal64 opNptsperpt(const SOP_NodeVerb::CookParms &cookparms) const
bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, exint &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
GLboolean * data
Definition: glcorearb.h:130
int int32
Definition: SYS_Types.h:34
T & y(void)
Definition: UT_Vector4.h:370
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const exint &value)
void setParmValue(exint idx, const UT_Matrix2D &value)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const UT_StringHolder & getAttribstocopy() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opSpointnum(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setGgroup(const UT_StringHolder &val)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:269
void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void setParmValue(exint idx, const fpreal &value)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
const UT_StringHolder & getSpointidx() const
void getParmValue(exint idx, UT_Matrix4D &value) const
const UT_StringHolder & getSpointnum() const
void getParmValue(exint idx, UT_Matrix3D &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setParmValue(exint idx, const UT_StringHolder &value)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
void setSpointnum(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Matrix2D &value) const
const char * buffer() const
int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
void setSpointidx(const UT_StringHolder &val)
T & x(void)
Definition: UT_Vector4.h:368
static void loadData(UT_IStream &is, UT_Matrix2D &v)
T & y(void)
Definition: UT_Vector2.h:286
static void saveData(std::ostream &os, UT_Matrix3D v)
GLboolean r
Definition: glcorearb.h:1221
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setAttribstocopy(const UT_StringHolder &val)
T & w(void)
Definition: UT_Vector4.h:374
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribstocopy(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE bool isstring() const
void setParmValue(exint idx, const UT_Vector3D &value)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix4D v)
GLenum src
Definition: glcorearb.h:1792