HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_Scatter-2.0.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_Scatter_2_0Enums
22 {
23  enum class GenerateBy
24  {
25  BYDENSITY = 0,
28  };
29 }
30 
31 
33 {
34 public:
35  static int version() { return 1; }
36 
38  {
39  myGroup = ""_sh;
40  myGenerateBy = 0;
41  myUseDensityAttrib = false;
42  myDensityAttrib = "density"_sh;
43  myUseAreaAttrib = false;
44  myAreaAttrib = "area"_sh;
45  myForceTotal = false;
46  myNpts = 1000;
47  myUseDensityTexture = false;
48  myDensityTexture = "default.pic"_sh;
49  myCountPerPrimAttrib = "count"_sh;
50  myUseEmergencyLimit = false;
51  myEmergencyLimit = 1e+06;
52  mySeed = 0;
53  myOverridePrimSeed = false;
54  myPrimSeedAttrib = "primid"_sh;
55  myRandomizeOrder = false;
56  myRelaxPoints = false;
57  myRelaxIterations = 10;
58  myUsePrimNumAttrib = false;
59  myPrimNumAttrib = "sourceprim"_sh;
60  myUsePrimUVWAttrib = false;
61  myPrimUVWAttrib = "sourceprimuv"_sh;
62  myUseOutputDensityAttrib = false;
63  myOutputDensityAttrib = "density"_sh;
64  myUseOutputRadiusAttrib = false;
65  myOutputRadiusAttrib = "pscale"_sh;
66  myRadiusInTextureSpace = false;
67  myPointAttribs = "*"_sh;
68  myVertAttribs = ""_sh;
69  myPrimAttribs = ""_sh;
70  myDetailAttribs = ""_sh;
71  myDensityScale = 10;
72  myScaleRadiiBy = 1;
73  myUseMaxRadius = false;
74  myMaxRadius = 10;
75 
76  }
77 
78  explicit SOP_Scatter_2_0Parms(const SOP_Scatter_2_0Parms &) = default;
79 
80  virtual ~SOP_Scatter_2_0Parms() {}
81 
82  bool operator==(const SOP_Scatter_2_0Parms &src) const
83  {
84  if (myGroup != src.myGroup) return false;
85  if (myGenerateBy != src.myGenerateBy) return false;
86  if (myUseDensityAttrib != src.myUseDensityAttrib) return false;
87  if (myDensityAttrib != src.myDensityAttrib) return false;
88  if (myUseAreaAttrib != src.myUseAreaAttrib) return false;
89  if (myAreaAttrib != src.myAreaAttrib) return false;
90  if (myForceTotal != src.myForceTotal) return false;
91  if (myNpts != src.myNpts) return false;
92  if (myUseDensityTexture != src.myUseDensityTexture) return false;
93  if (myDensityTexture != src.myDensityTexture) return false;
94  if (myCountPerPrimAttrib != src.myCountPerPrimAttrib) return false;
95  if (myUseEmergencyLimit != src.myUseEmergencyLimit) return false;
96  if (myEmergencyLimit != src.myEmergencyLimit) return false;
97  if (mySeed != src.mySeed) return false;
98  if (myOverridePrimSeed != src.myOverridePrimSeed) return false;
99  if (myPrimSeedAttrib != src.myPrimSeedAttrib) return false;
100  if (myRandomizeOrder != src.myRandomizeOrder) return false;
101  if (myRelaxPoints != src.myRelaxPoints) return false;
102  if (myRelaxIterations != src.myRelaxIterations) return false;
103  if (myUsePrimNumAttrib != src.myUsePrimNumAttrib) return false;
104  if (myPrimNumAttrib != src.myPrimNumAttrib) return false;
105  if (myUsePrimUVWAttrib != src.myUsePrimUVWAttrib) return false;
106  if (myPrimUVWAttrib != src.myPrimUVWAttrib) return false;
107  if (myUseOutputDensityAttrib != src.myUseOutputDensityAttrib) return false;
108  if (myOutputDensityAttrib != src.myOutputDensityAttrib) return false;
109  if (myUseOutputRadiusAttrib != src.myUseOutputRadiusAttrib) return false;
110  if (myOutputRadiusAttrib != src.myOutputRadiusAttrib) return false;
111  if (myRadiusInTextureSpace != src.myRadiusInTextureSpace) return false;
112  if (myPointAttribs != src.myPointAttribs) return false;
113  if (myVertAttribs != src.myVertAttribs) return false;
114  if (myPrimAttribs != src.myPrimAttribs) return false;
115  if (myDetailAttribs != src.myDetailAttribs) return false;
116  if (myDensityScale != src.myDensityScale) return false;
117  if (myScaleRadiiBy != src.myScaleRadiiBy) return false;
118  if (myUseMaxRadius != src.myUseMaxRadius) return false;
119  if (myMaxRadius != src.myMaxRadius) return false;
120 
121  return true;
122  }
124 
125 
126 
127  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
128  {
129  if (true)
130  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
131  else myGroup = ""_sh;
132  if (true)
133  OP_Utils::evalOpParm(myGenerateBy, node, "generateby", time, 0);
134  else myGenerateBy = 0;
135  if (true && ( (!(((int64(getGenerateBy())!=0)))) ) )
136  OP_Utils::evalOpParm(myUseDensityAttrib, node, "usedensityattrib", time, 0);
137  else myUseDensityAttrib = false;
138  if (true && ( (!(((int64(getGenerateBy())!=0))||((getUseDensityAttrib()==0)))) ) )
139  OP_Utils::evalOpParm(myDensityAttrib, node, "densityattrib", time, 0);
140  else myDensityAttrib = "density"_sh;
141  if (true && ( (!(((int64(getGenerateBy())!=0)))) ) )
142  OP_Utils::evalOpParm(myUseAreaAttrib, node, "useareaattrib", time, 0);
143  else myUseAreaAttrib = false;
144  if (true && ( (!(((int64(getGenerateBy())!=0))||((getUseAreaAttrib()==0)))) ) )
145  OP_Utils::evalOpParm(myAreaAttrib, node, "areaattrib", time, 0);
146  else myAreaAttrib = "area"_sh;
147  if (true && ( (!(((int64(getGenerateBy())!=0)))) ) )
148  OP_Utils::evalOpParm(myForceTotal, node, "forcetotal", time, 0);
149  else myForceTotal = false;
150  if (true && ( (!(((int64(getGenerateBy())!=0))||((getForceTotal()==0)))) ) )
151  OP_Utils::evalOpParm(myNpts, node, "npts", time, 0);
152  else myNpts = 1000;
153  if (true && ( (!(((int64(getGenerateBy())!=2)))) ) )
154  OP_Utils::evalOpParm(myUseDensityTexture, node, "usedensitytexture", time, 0);
155  else myUseDensityTexture = false;
156  if (true && ( (!(((int64(getGenerateBy())!=2))||((getUseDensityTexture()==0)))) ) )
157  OP_Utils::evalOpParm(myDensityTexture, node, "densitytexture", time, 0);
158  else myDensityTexture = "default.pic"_sh;
159  if (true && ( (!(((int64(getGenerateBy())!=1)))) ) )
160  OP_Utils::evalOpParm(myCountPerPrimAttrib, node, "primcountattrib", time, 0);
161  else myCountPerPrimAttrib = "count"_sh;
162  if (true)
163  OP_Utils::evalOpParm(myUseEmergencyLimit, node, "useemergencylimit", time, 0);
164  else myUseEmergencyLimit = false;
165  if (true && ( (!(((getUseEmergencyLimit()==0)))) ) )
166  OP_Utils::evalOpParm(myEmergencyLimit, node, "emergencylimit", time, 0);
167  else myEmergencyLimit = 1e+06;
168  if (true)
169  OP_Utils::evalOpParm(mySeed, node, "seed", time, 0);
170  else mySeed = 0;
171  if (true && ( (!(((int64(getGenerateBy())==2)))) ) )
172  OP_Utils::evalOpParm(myOverridePrimSeed, node, "overrideprimseed", time, 0);
173  else myOverridePrimSeed = false;
174  if (true && ( (!(((int64(getGenerateBy())==2))||((getOverridePrimSeed()==0)))) ) )
175  OP_Utils::evalOpParm(myPrimSeedAttrib, node, "primseedattrib", time, 0);
176  else myPrimSeedAttrib = "primid"_sh;
177  if (true)
178  OP_Utils::evalOpParm(myRandomizeOrder, node, "randomizeorder", time, 0);
179  else myRandomizeOrder = false;
180  if (true)
181  OP_Utils::evalOpParm(myRelaxPoints, node, "relaxpoints", time, 0);
182  else myRelaxPoints = false;
183  if (true && ( (!(((getRelaxPoints()==0)))) ) )
184  OP_Utils::evalOpParm(myRelaxIterations, node, "relaxiterations", time, 0);
185  else myRelaxIterations = 10;
186  if (true)
187  OP_Utils::evalOpParm(myUsePrimNumAttrib, node, "useprimnumattrib", time, 0);
188  else myUsePrimNumAttrib = false;
189  if (true && ( (!(((getUsePrimNumAttrib()==0)))) ) )
190  OP_Utils::evalOpParm(myPrimNumAttrib, node, "primnumattrib", time, 0);
191  else myPrimNumAttrib = "sourceprim"_sh;
192  if (true)
193  OP_Utils::evalOpParm(myUsePrimUVWAttrib, node, "useprimuvwattrib", time, 0);
194  else myUsePrimUVWAttrib = false;
195  if (true && ( (!(((getUsePrimUVWAttrib()==0)))) ) )
196  OP_Utils::evalOpParm(myPrimUVWAttrib, node, "primuvwattrib", time, 0);
197  else myPrimUVWAttrib = "sourceprimuv"_sh;
198  if (true)
199  OP_Utils::evalOpParm(myUseOutputDensityAttrib, node, "useoutputdensityattrib", time, 0);
200  else myUseOutputDensityAttrib = false;
201  if (true && ( (!(((getUseOutputDensityAttrib()==0)))) ) )
202  OP_Utils::evalOpParm(myOutputDensityAttrib, node, "outputdensityattrib", time, 0);
203  else myOutputDensityAttrib = "density"_sh;
204  if (true)
205  OP_Utils::evalOpParm(myUseOutputRadiusAttrib, node, "useoutputradiusattrib", time, 0);
206  else myUseOutputRadiusAttrib = false;
207  if (true && ( (!(((getUseOutputRadiusAttrib()==0)))) ) )
208  OP_Utils::evalOpParm(myOutputRadiusAttrib, node, "outputradiusattrib", time, 0);
209  else myOutputRadiusAttrib = "pscale"_sh;
210  if (true && ( (!(((int64(getGenerateBy())!=2))||((getUseOutputRadiusAttrib()==0)&&(getUseOutputDensityAttrib()==0)))) ) )
211  OP_Utils::evalOpParm(myRadiusInTextureSpace, node, "radiusintexturespace", time, 0);
212  else myRadiusInTextureSpace = false;
213  if (true)
214  OP_Utils::evalOpParm(myPointAttribs, node, "pointattribs", time, 0);
215  else myPointAttribs = "*"_sh;
216  if (true)
217  OP_Utils::evalOpParm(myVertAttribs, node, "vertattribs", time, 0);
218  else myVertAttribs = ""_sh;
219  if (true)
220  OP_Utils::evalOpParm(myPrimAttribs, node, "primattribs", time, 0);
221  else myPrimAttribs = ""_sh;
222  if (true)
223  OP_Utils::evalOpParm(myDetailAttribs, node, "detailattribs", time, 0);
224  else myDetailAttribs = ""_sh;
225  if (true && ( (!(((int64(getGenerateBy())==1))||((int64(getGenerateBy())==0)&&(getForceTotal()==1)))) ) )
226  OP_Utils::evalOpParm(myDensityScale, node, "densityscale", time, 0);
227  else myDensityScale = 10;
228  if (true && ( (!(((getRelaxPoints()==0)&&(getUseOutputRadiusAttrib()==0)))) ) )
229  OP_Utils::evalOpParm(myScaleRadiiBy, node, "scaleradiiby", time, 0);
230  else myScaleRadiiBy = 1;
231  if (true && ( (!(((getRelaxPoints()==0)&&(getUseOutputRadiusAttrib()==0)))) ) )
232  OP_Utils::evalOpParm(myUseMaxRadius, node, "usemaxradius", time, 0);
233  else myUseMaxRadius = false;
234  if (true && ( (!(((getRelaxPoints()==0)&&(getUseOutputRadiusAttrib()==0))||((getUseMaxRadius()==0)))) ) )
235  OP_Utils::evalOpParm(myMaxRadius, node, "maxradius", time, 0);
236  else myMaxRadius = 10;
237 
238  }
239 
240 
241  virtual void loadFromOpSubclass(const LoadParms &loadparms)
242  {
243  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
244  }
245 
246 
247  virtual void copyFrom(const SOP_NodeParms *src)
248  {
249  *this = *((const SOP_Scatter_2_0Parms *)src);
250  }
251 
252  template <typename T>
253  void
254  doGetParmValue(exint idx, T &value) const
255  {
256  switch (idx)
257  {
258  case 0:
259  coerceValue(value, myGroup);
260  break;
261  case 1:
262  coerceValue(value, myGenerateBy);
263  break;
264  case 2:
265  coerceValue(value, myUseDensityAttrib);
266  break;
267  case 3:
268  coerceValue(value, myDensityAttrib);
269  break;
270  case 4:
271  coerceValue(value, myUseAreaAttrib);
272  break;
273  case 5:
274  coerceValue(value, myAreaAttrib);
275  break;
276  case 6:
277  coerceValue(value, myForceTotal);
278  break;
279  case 7:
280  coerceValue(value, myNpts);
281  break;
282  case 8:
283  coerceValue(value, myUseDensityTexture);
284  break;
285  case 9:
286  coerceValue(value, myDensityTexture);
287  break;
288  case 10:
289  coerceValue(value, myCountPerPrimAttrib);
290  break;
291  case 11:
292  coerceValue(value, myUseEmergencyLimit);
293  break;
294  case 12:
295  coerceValue(value, myEmergencyLimit);
296  break;
297  case 13:
298  coerceValue(value, mySeed);
299  break;
300  case 14:
301  coerceValue(value, myOverridePrimSeed);
302  break;
303  case 15:
304  coerceValue(value, myPrimSeedAttrib);
305  break;
306  case 16:
307  coerceValue(value, myRandomizeOrder);
308  break;
309  case 17:
310  coerceValue(value, myRelaxPoints);
311  break;
312  case 18:
313  coerceValue(value, myRelaxIterations);
314  break;
315  case 19:
316  coerceValue(value, myUsePrimNumAttrib);
317  break;
318  case 20:
319  coerceValue(value, myPrimNumAttrib);
320  break;
321  case 21:
322  coerceValue(value, myUsePrimUVWAttrib);
323  break;
324  case 22:
325  coerceValue(value, myPrimUVWAttrib);
326  break;
327  case 23:
328  coerceValue(value, myUseOutputDensityAttrib);
329  break;
330  case 24:
331  coerceValue(value, myOutputDensityAttrib);
332  break;
333  case 25:
334  coerceValue(value, myUseOutputRadiusAttrib);
335  break;
336  case 26:
337  coerceValue(value, myOutputRadiusAttrib);
338  break;
339  case 27:
340  coerceValue(value, myRadiusInTextureSpace);
341  break;
342  case 28:
343  coerceValue(value, myPointAttribs);
344  break;
345  case 29:
346  coerceValue(value, myVertAttribs);
347  break;
348  case 30:
349  coerceValue(value, myPrimAttribs);
350  break;
351  case 31:
352  coerceValue(value, myDetailAttribs);
353  break;
354  case 32:
355  coerceValue(value, myDensityScale);
356  break;
357  case 33:
358  coerceValue(value, myScaleRadiiBy);
359  break;
360  case 34:
361  coerceValue(value, myUseMaxRadius);
362  break;
363  case 35:
364  coerceValue(value, myMaxRadius);
365  break;
366 
367  }
368  }
369 
370  void getParmValue(exint idx, exint &value) const
371  { doGetParmValue(idx, value); }
372  void getParmValue(exint idx, fpreal &value) const
373  { doGetParmValue(idx, value); }
375  { doGetParmValue(idx, value); }
377  { doGetParmValue(idx, value); }
379  { doGetParmValue(idx, value); }
381  { doGetParmValue(idx, value); }
383  { doGetParmValue(idx, value); }
385  { doGetParmValue(idx, value); }
387  { doGetParmValue(idx, value); }
389  { doGetParmValue(idx, value); }
391  { doGetParmValue(idx, value); }
392 
393  template <typename T>
394  void
395  doSetParmValue(exint idx, const T &value)
396  {
397  switch (idx)
398  {
399  case 0:
400  coerceValue(myGroup, value);
401  break;
402  case 1:
403  coerceValue(myGenerateBy, value);
404  break;
405  case 2:
406  coerceValue(myUseDensityAttrib, value);
407  break;
408  case 3:
409  coerceValue(myDensityAttrib, value);
410  break;
411  case 4:
412  coerceValue(myUseAreaAttrib, value);
413  break;
414  case 5:
415  coerceValue(myAreaAttrib, value);
416  break;
417  case 6:
418  coerceValue(myForceTotal, value);
419  break;
420  case 7:
421  coerceValue(myNpts, value);
422  break;
423  case 8:
424  coerceValue(myUseDensityTexture, value);
425  break;
426  case 9:
427  coerceValue(myDensityTexture, value);
428  break;
429  case 10:
430  coerceValue(myCountPerPrimAttrib, value);
431  break;
432  case 11:
433  coerceValue(myUseEmergencyLimit, value);
434  break;
435  case 12:
436  coerceValue(myEmergencyLimit, value);
437  break;
438  case 13:
439  coerceValue(mySeed, value);
440  break;
441  case 14:
442  coerceValue(myOverridePrimSeed, value);
443  break;
444  case 15:
445  coerceValue(myPrimSeedAttrib, value);
446  break;
447  case 16:
448  coerceValue(myRandomizeOrder, value);
449  break;
450  case 17:
451  coerceValue(myRelaxPoints, value);
452  break;
453  case 18:
454  coerceValue(myRelaxIterations, value);
455  break;
456  case 19:
457  coerceValue(myUsePrimNumAttrib, value);
458  break;
459  case 20:
460  coerceValue(myPrimNumAttrib, value);
461  break;
462  case 21:
463  coerceValue(myUsePrimUVWAttrib, value);
464  break;
465  case 22:
466  coerceValue(myPrimUVWAttrib, value);
467  break;
468  case 23:
469  coerceValue(myUseOutputDensityAttrib, value);
470  break;
471  case 24:
472  coerceValue(myOutputDensityAttrib, value);
473  break;
474  case 25:
475  coerceValue(myUseOutputRadiusAttrib, value);
476  break;
477  case 26:
478  coerceValue(myOutputRadiusAttrib, value);
479  break;
480  case 27:
481  coerceValue(myRadiusInTextureSpace, value);
482  break;
483  case 28:
484  coerceValue(myPointAttribs, value);
485  break;
486  case 29:
487  coerceValue(myVertAttribs, value);
488  break;
489  case 30:
490  coerceValue(myPrimAttribs, value);
491  break;
492  case 31:
493  coerceValue(myDetailAttribs, value);
494  break;
495  case 32:
496  coerceValue(myDensityScale, value);
497  break;
498  case 33:
499  coerceValue(myScaleRadiiBy, value);
500  break;
501  case 34:
502  coerceValue(myUseMaxRadius, value);
503  break;
504  case 35:
505  coerceValue(myMaxRadius, value);
506  break;
507 
508  }
509  }
510 
511  void setParmValue(exint idx, const exint &value)
512  { doSetParmValue(idx, value); }
513  void setParmValue(exint idx, const fpreal &value)
514  { doSetParmValue(idx, value); }
515  void setParmValue(exint idx, const UT_Vector2D &value)
516  { doSetParmValue(idx, value); }
517  void setParmValue(exint idx, const UT_Vector3D &value)
518  { doSetParmValue(idx, value); }
519  void setParmValue(exint idx, const UT_Vector4D &value)
520  { doSetParmValue(idx, value); }
521  void setParmValue(exint idx, const UT_Matrix2D &value)
522  { doSetParmValue(idx, value); }
523  void setParmValue(exint idx, const UT_Matrix3D &value)
524  { doSetParmValue(idx, value); }
525  void setParmValue(exint idx, const UT_Matrix4D &value)
526  { doSetParmValue(idx, value); }
528  { doSetParmValue(idx, value); }
530  { doSetParmValue(idx, value); }
532  { doSetParmValue(idx, value); }
533 
534  virtual exint getNumParms() const
535  {
536  return 36;
537  }
538 
539  virtual const char *getParmName(exint fieldnum) const
540  {
541  switch (fieldnum)
542  {
543  case 0:
544  return "group";
545  case 1:
546  return "generateby";
547  case 2:
548  return "usedensityattrib";
549  case 3:
550  return "densityattrib";
551  case 4:
552  return "useareaattrib";
553  case 5:
554  return "areaattrib";
555  case 6:
556  return "forcetotal";
557  case 7:
558  return "npts";
559  case 8:
560  return "usedensitytexture";
561  case 9:
562  return "densitytexture";
563  case 10:
564  return "primcountattrib";
565  case 11:
566  return "useemergencylimit";
567  case 12:
568  return "emergencylimit";
569  case 13:
570  return "seed";
571  case 14:
572  return "overrideprimseed";
573  case 15:
574  return "primseedattrib";
575  case 16:
576  return "randomizeorder";
577  case 17:
578  return "relaxpoints";
579  case 18:
580  return "relaxiterations";
581  case 19:
582  return "useprimnumattrib";
583  case 20:
584  return "primnumattrib";
585  case 21:
586  return "useprimuvwattrib";
587  case 22:
588  return "primuvwattrib";
589  case 23:
590  return "useoutputdensityattrib";
591  case 24:
592  return "outputdensityattrib";
593  case 25:
594  return "useoutputradiusattrib";
595  case 26:
596  return "outputradiusattrib";
597  case 27:
598  return "radiusintexturespace";
599  case 28:
600  return "pointattribs";
601  case 29:
602  return "vertattribs";
603  case 30:
604  return "primattribs";
605  case 31:
606  return "detailattribs";
607  case 32:
608  return "densityscale";
609  case 33:
610  return "scaleradiiby";
611  case 34:
612  return "usemaxradius";
613  case 35:
614  return "maxradius";
615 
616  }
617  return 0;
618  }
619 
620  virtual ParmType getParmType(exint fieldnum) const
621  {
622  switch (fieldnum)
623  {
624  case 0:
625  return PARM_STRING;
626  case 1:
627  return PARM_INTEGER;
628  case 2:
629  return PARM_INTEGER;
630  case 3:
631  return PARM_STRING;
632  case 4:
633  return PARM_INTEGER;
634  case 5:
635  return PARM_STRING;
636  case 6:
637  return PARM_INTEGER;
638  case 7:
639  return PARM_INTEGER;
640  case 8:
641  return PARM_INTEGER;
642  case 9:
643  return PARM_STRING;
644  case 10:
645  return PARM_STRING;
646  case 11:
647  return PARM_INTEGER;
648  case 12:
649  return PARM_INTEGER;
650  case 13:
651  return PARM_FLOAT;
652  case 14:
653  return PARM_INTEGER;
654  case 15:
655  return PARM_STRING;
656  case 16:
657  return PARM_INTEGER;
658  case 17:
659  return PARM_INTEGER;
660  case 18:
661  return PARM_INTEGER;
662  case 19:
663  return PARM_INTEGER;
664  case 20:
665  return PARM_STRING;
666  case 21:
667  return PARM_INTEGER;
668  case 22:
669  return PARM_STRING;
670  case 23:
671  return PARM_INTEGER;
672  case 24:
673  return PARM_STRING;
674  case 25:
675  return PARM_INTEGER;
676  case 26:
677  return PARM_STRING;
678  case 27:
679  return PARM_INTEGER;
680  case 28:
681  return PARM_STRING;
682  case 29:
683  return PARM_STRING;
684  case 30:
685  return PARM_STRING;
686  case 31:
687  return PARM_STRING;
688  case 32:
689  return PARM_FLOAT;
690  case 33:
691  return PARM_FLOAT;
692  case 34:
693  return PARM_INTEGER;
694  case 35:
695  return PARM_FLOAT;
696 
697  }
698  return PARM_UNSUPPORTED;
699  }
700 
701  // Boiler plate to load individual types.
702  static void loadData(UT_IStream &is, int64 &v)
703  { is.bread(&v, 1); }
704  static void loadData(UT_IStream &is, bool &v)
705  { int64 iv; is.bread(&iv, 1); v = iv; }
706  static void loadData(UT_IStream &is, fpreal64 &v)
707  { is.bread<fpreal64>(&v, 1); }
708  static void loadData(UT_IStream &is, UT_Vector2D &v)
709  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
710  static void loadData(UT_IStream &is, UT_Vector3D &v)
711  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
712  is.bread<fpreal64>(&v.z(), 1); }
713  static void loadData(UT_IStream &is, UT_Vector4D &v)
714  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
715  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
716  static void loadData(UT_IStream &is, UT_Matrix2D &v)
717  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
718  static void loadData(UT_IStream &is, UT_Matrix3D &v)
719  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
720  static void loadData(UT_IStream &is, UT_Matrix4D &v)
721  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
722  static void loadData(UT_IStream &is, UT_Vector2I &v)
723  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
724  static void loadData(UT_IStream &is, UT_Vector3I &v)
725  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
726  is.bread<int64>(&v.z(), 1); }
727  static void loadData(UT_IStream &is, UT_Vector4I &v)
728  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
729  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
731  { is.bread(v); }
733  { UT_StringHolder rampdata;
734  loadData(is, rampdata);
735  if (rampdata.isstring())
736  {
737  v.reset(new UT_Ramp());
738  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
739  v->load(istr);
740  }
741  else v.reset();
742  }
745  loadData(is, data);
746  if (data.isstring())
747  {
748  // Find the data type.
749  char *colon = UT_StringWrap(data).findChar(':');
750  if (colon)
751  {
752  int typelen = colon - data.buffer();
754  type.strncpy(data.buffer(), typelen);
755  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
756 
757  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
758  }
759  }
760  else v.reset();
761  }
762 
763  static void saveData(std::ostream &os, int64 v)
764  { UTwrite(os, &v); }
765  static void saveData(std::ostream &os, bool v)
766  { int64 iv = v; UTwrite(os, &iv); }
767  static void saveData(std::ostream &os, fpreal64 v)
768  { UTwrite<fpreal64>(os, &v); }
769  static void saveData(std::ostream &os, UT_Vector2D v)
770  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
771  static void saveData(std::ostream &os, UT_Vector3D v)
772  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
773  UTwrite<fpreal64>(os, &v.z()); }
774  static void saveData(std::ostream &os, UT_Vector4D v)
775  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
776  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
777  static void saveData(std::ostream &os, UT_Matrix2D v)
779  static void saveData(std::ostream &os, UT_Matrix3D v)
781  static void saveData(std::ostream &os, UT_Matrix4D v)
783  static void saveData(std::ostream &os, UT_StringHolder s)
784  { UT_StringWrap(s).saveBinary(os); }
785  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
786  { UT_StringHolder result;
787  UT_OStringStream ostr;
788  if (s) s->save(ostr);
789  result = ostr.str();
790  saveData(os, result);
791  }
792  static void saveData(std::ostream &os, PRM_DataItemHandle s)
793  { UT_StringHolder result;
794  UT_OStringStream ostr;
795  if (s)
796  {
797  ostr << s->getDataTypeToken();
798  ostr << ":";
799  s->saveBinary(ostr);
800  }
801  result = ostr.str();
802  saveData(os, result);
803  }
804 
805 
806  void save(std::ostream &os) const
807  {
808  int32 v = version();
809  UTwrite(os, &v);
810  saveData(os, myGroup);
811  saveData(os, myGenerateBy);
812  saveData(os, myUseDensityAttrib);
813  saveData(os, myDensityAttrib);
814  saveData(os, myUseAreaAttrib);
815  saveData(os, myAreaAttrib);
816  saveData(os, myForceTotal);
817  saveData(os, myNpts);
818  saveData(os, myUseDensityTexture);
819  saveData(os, myDensityTexture);
820  saveData(os, myCountPerPrimAttrib);
821  saveData(os, myUseEmergencyLimit);
822  saveData(os, myEmergencyLimit);
823  saveData(os, mySeed);
824  saveData(os, myOverridePrimSeed);
825  saveData(os, myPrimSeedAttrib);
826  saveData(os, myRandomizeOrder);
827  saveData(os, myRelaxPoints);
828  saveData(os, myRelaxIterations);
829  saveData(os, myUsePrimNumAttrib);
830  saveData(os, myPrimNumAttrib);
831  saveData(os, myUsePrimUVWAttrib);
832  saveData(os, myPrimUVWAttrib);
833  saveData(os, myUseOutputDensityAttrib);
834  saveData(os, myOutputDensityAttrib);
835  saveData(os, myUseOutputRadiusAttrib);
836  saveData(os, myOutputRadiusAttrib);
837  saveData(os, myRadiusInTextureSpace);
838  saveData(os, myPointAttribs);
839  saveData(os, myVertAttribs);
840  saveData(os, myPrimAttribs);
841  saveData(os, myDetailAttribs);
842  saveData(os, myDensityScale);
843  saveData(os, myScaleRadiiBy);
844  saveData(os, myUseMaxRadius);
845  saveData(os, myMaxRadius);
846 
847  }
848 
849  bool load(UT_IStream &is)
850  {
851  int32 v;
852  is.bread(&v, 1);
853  if (version() != v)
854  {
855  // Fail incompatible versions
856  return false;
857  }
858  loadData(is, myGroup);
859  loadData(is, myGenerateBy);
860  loadData(is, myUseDensityAttrib);
861  loadData(is, myDensityAttrib);
862  loadData(is, myUseAreaAttrib);
863  loadData(is, myAreaAttrib);
864  loadData(is, myForceTotal);
865  loadData(is, myNpts);
866  loadData(is, myUseDensityTexture);
867  loadData(is, myDensityTexture);
868  loadData(is, myCountPerPrimAttrib);
869  loadData(is, myUseEmergencyLimit);
870  loadData(is, myEmergencyLimit);
871  loadData(is, mySeed);
872  loadData(is, myOverridePrimSeed);
873  loadData(is, myPrimSeedAttrib);
874  loadData(is, myRandomizeOrder);
875  loadData(is, myRelaxPoints);
876  loadData(is, myRelaxIterations);
877  loadData(is, myUsePrimNumAttrib);
878  loadData(is, myPrimNumAttrib);
879  loadData(is, myUsePrimUVWAttrib);
880  loadData(is, myPrimUVWAttrib);
881  loadData(is, myUseOutputDensityAttrib);
882  loadData(is, myOutputDensityAttrib);
883  loadData(is, myUseOutputRadiusAttrib);
884  loadData(is, myOutputRadiusAttrib);
885  loadData(is, myRadiusInTextureSpace);
886  loadData(is, myPointAttribs);
887  loadData(is, myVertAttribs);
888  loadData(is, myPrimAttribs);
889  loadData(is, myDetailAttribs);
890  loadData(is, myDensityScale);
891  loadData(is, myScaleRadiiBy);
892  loadData(is, myUseMaxRadius);
893  loadData(is, myMaxRadius);
894 
895  return true;
896  }
897 
898  const UT_StringHolder & getGroup() const { return myGroup; }
899  void setGroup(const UT_StringHolder & val) { myGroup = val; }
901  {
902  SOP_Node *thissop = cookparms.getNode();
903  if (!thissop) return getGroup();
904  UT_StringHolder result;
905  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
906  return result;
907  }
908  GenerateBy getGenerateBy() const { return GenerateBy(myGenerateBy); }
909  void setGenerateBy(GenerateBy val) { myGenerateBy = int64(val); }
911  {
912  SOP_Node *thissop = cookparms.getNode();
913  if (!thissop) return getGenerateBy();
914  int64 result;
915  OP_Utils::evalOpParm(result, thissop, "generateby", cookparms.getCookTime(), 0);
916  return GenerateBy(result);
917  }
918  bool getUseDensityAttrib() const { return myUseDensityAttrib; }
919  void setUseDensityAttrib(bool val) { myUseDensityAttrib = val; }
920  bool opUseDensityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
921  {
922  SOP_Node *thissop = cookparms.getNode();
923  if (!thissop) return getUseDensityAttrib();
924  bool result;
925  OP_Utils::evalOpParm(result, thissop, "usedensityattrib", cookparms.getCookTime(), 0);
926  return result;
927  }
928  const UT_StringHolder & getDensityAttrib() const { return myDensityAttrib; }
929  void setDensityAttrib(const UT_StringHolder & val) { myDensityAttrib = val; }
931  {
932  SOP_Node *thissop = cookparms.getNode();
933  if (!thissop) return getDensityAttrib();
934  UT_StringHolder result;
935  OP_Utils::evalOpParm(result, thissop, "densityattrib", cookparms.getCookTime(), 0);
936  return result;
937  }
938  bool getUseAreaAttrib() const { return myUseAreaAttrib; }
939  void setUseAreaAttrib(bool val) { myUseAreaAttrib = val; }
940  bool opUseAreaAttrib(const SOP_NodeVerb::CookParms &cookparms) const
941  {
942  SOP_Node *thissop = cookparms.getNode();
943  if (!thissop) return getUseAreaAttrib();
944  bool result;
945  OP_Utils::evalOpParm(result, thissop, "useareaattrib", cookparms.getCookTime(), 0);
946  return result;
947  }
948  const UT_StringHolder & getAreaAttrib() const { return myAreaAttrib; }
949  void setAreaAttrib(const UT_StringHolder & val) { myAreaAttrib = val; }
951  {
952  SOP_Node *thissop = cookparms.getNode();
953  if (!thissop) return getAreaAttrib();
954  UT_StringHolder result;
955  OP_Utils::evalOpParm(result, thissop, "areaattrib", cookparms.getCookTime(), 0);
956  return result;
957  }
958  bool getForceTotal() const { return myForceTotal; }
959  void setForceTotal(bool val) { myForceTotal = val; }
960  bool opForceTotal(const SOP_NodeVerb::CookParms &cookparms) const
961  {
962  SOP_Node *thissop = cookparms.getNode();
963  if (!thissop) return getForceTotal();
964  bool result;
965  OP_Utils::evalOpParm(result, thissop, "forcetotal", cookparms.getCookTime(), 0);
966  return result;
967  }
968  int64 getNpts() const { return myNpts; }
969  void setNpts(int64 val) { myNpts = val; }
970  int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
971  {
972  SOP_Node *thissop = cookparms.getNode();
973  if (!thissop) return getNpts();
974  int64 result;
975  OP_Utils::evalOpParm(result, thissop, "npts", cookparms.getCookTime(), 0);
976  return result;
977  }
978  bool getUseDensityTexture() const { return myUseDensityTexture; }
979  void setUseDensityTexture(bool val) { myUseDensityTexture = val; }
980  bool opUseDensityTexture(const SOP_NodeVerb::CookParms &cookparms) const
981  {
982  SOP_Node *thissop = cookparms.getNode();
983  if (!thissop) return getUseDensityTexture();
984  bool result;
985  OP_Utils::evalOpParm(result, thissop, "usedensitytexture", cookparms.getCookTime(), 0);
986  return result;
987  }
988  const UT_StringHolder & getDensityTexture() const { return myDensityTexture; }
989  void setDensityTexture(const UT_StringHolder & val) { myDensityTexture = val; }
991  {
992  SOP_Node *thissop = cookparms.getNode();
993  if (!thissop) return getDensityTexture();
994  UT_StringHolder result;
995  OP_Utils::evalOpParm(result, thissop, "densitytexture", cookparms.getCookTime(), 0);
996  return result;
997  }
998  const UT_StringHolder & getCountPerPrimAttrib() const { return myCountPerPrimAttrib; }
999  void setCountPerPrimAttrib(const UT_StringHolder & val) { myCountPerPrimAttrib = val; }
1001  {
1002  SOP_Node *thissop = cookparms.getNode();
1003  if (!thissop) return getCountPerPrimAttrib();
1004  UT_StringHolder result;
1005  OP_Utils::evalOpParm(result, thissop, "primcountattrib", cookparms.getCookTime(), 0);
1006  return result;
1007  }
1008  bool getUseEmergencyLimit() const { return myUseEmergencyLimit; }
1009  void setUseEmergencyLimit(bool val) { myUseEmergencyLimit = val; }
1010  bool opUseEmergencyLimit(const SOP_NodeVerb::CookParms &cookparms) const
1011  {
1012  SOP_Node *thissop = cookparms.getNode();
1013  if (!thissop) return getUseEmergencyLimit();
1014  bool result;
1015  OP_Utils::evalOpParm(result, thissop, "useemergencylimit", cookparms.getCookTime(), 0);
1016  return result;
1017  }
1018  int64 getEmergencyLimit() const { return myEmergencyLimit; }
1019  void setEmergencyLimit(int64 val) { myEmergencyLimit = val; }
1021  {
1022  SOP_Node *thissop = cookparms.getNode();
1023  if (!thissop) return getEmergencyLimit();
1024  int64 result;
1025  OP_Utils::evalOpParm(result, thissop, "emergencylimit", cookparms.getCookTime(), 0);
1026  return result;
1027  }
1028  fpreal64 getSeed() const { return mySeed; }
1029  void setSeed(fpreal64 val) { mySeed = val; }
1030  fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
1031  {
1032  SOP_Node *thissop = cookparms.getNode();
1033  if (!thissop) return getSeed();
1034  fpreal64 result;
1035  OP_Utils::evalOpParm(result, thissop, "seed", cookparms.getCookTime(), 0);
1036  return result;
1037  }
1038  bool getOverridePrimSeed() const { return myOverridePrimSeed; }
1039  void setOverridePrimSeed(bool val) { myOverridePrimSeed = val; }
1040  bool opOverridePrimSeed(const SOP_NodeVerb::CookParms &cookparms) const
1041  {
1042  SOP_Node *thissop = cookparms.getNode();
1043  if (!thissop) return getOverridePrimSeed();
1044  bool result;
1045  OP_Utils::evalOpParm(result, thissop, "overrideprimseed", cookparms.getCookTime(), 0);
1046  return result;
1047  }
1048  const UT_StringHolder & getPrimSeedAttrib() const { return myPrimSeedAttrib; }
1049  void setPrimSeedAttrib(const UT_StringHolder & val) { myPrimSeedAttrib = val; }
1051  {
1052  SOP_Node *thissop = cookparms.getNode();
1053  if (!thissop) return getPrimSeedAttrib();
1054  UT_StringHolder result;
1055  OP_Utils::evalOpParm(result, thissop, "primseedattrib", cookparms.getCookTime(), 0);
1056  return result;
1057  }
1058  bool getRandomizeOrder() const { return myRandomizeOrder; }
1059  void setRandomizeOrder(bool val) { myRandomizeOrder = val; }
1060  bool opRandomizeOrder(const SOP_NodeVerb::CookParms &cookparms) const
1061  {
1062  SOP_Node *thissop = cookparms.getNode();
1063  if (!thissop) return getRandomizeOrder();
1064  bool result;
1065  OP_Utils::evalOpParm(result, thissop, "randomizeorder", cookparms.getCookTime(), 0);
1066  return result;
1067  }
1068  bool getRelaxPoints() const { return myRelaxPoints; }
1069  void setRelaxPoints(bool val) { myRelaxPoints = val; }
1070  bool opRelaxPoints(const SOP_NodeVerb::CookParms &cookparms) const
1071  {
1072  SOP_Node *thissop = cookparms.getNode();
1073  if (!thissop) return getRelaxPoints();
1074  bool result;
1075  OP_Utils::evalOpParm(result, thissop, "relaxpoints", cookparms.getCookTime(), 0);
1076  return result;
1077  }
1078  int64 getRelaxIterations() const { return myRelaxIterations; }
1079  void setRelaxIterations(int64 val) { myRelaxIterations = val; }
1081  {
1082  SOP_Node *thissop = cookparms.getNode();
1083  if (!thissop) return getRelaxIterations();
1084  int64 result;
1085  OP_Utils::evalOpParm(result, thissop, "relaxiterations", cookparms.getCookTime(), 0);
1086  return result;
1087  }
1088  bool getUsePrimNumAttrib() const { return myUsePrimNumAttrib; }
1089  void setUsePrimNumAttrib(bool val) { myUsePrimNumAttrib = val; }
1090  bool opUsePrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1091  {
1092  SOP_Node *thissop = cookparms.getNode();
1093  if (!thissop) return getUsePrimNumAttrib();
1094  bool result;
1095  OP_Utils::evalOpParm(result, thissop, "useprimnumattrib", cookparms.getCookTime(), 0);
1096  return result;
1097  }
1098  const UT_StringHolder & getPrimNumAttrib() const { return myPrimNumAttrib; }
1099  void setPrimNumAttrib(const UT_StringHolder & val) { myPrimNumAttrib = val; }
1101  {
1102  SOP_Node *thissop = cookparms.getNode();
1103  if (!thissop) return getPrimNumAttrib();
1104  UT_StringHolder result;
1105  OP_Utils::evalOpParm(result, thissop, "primnumattrib", cookparms.getCookTime(), 0);
1106  return result;
1107  }
1108  bool getUsePrimUVWAttrib() const { return myUsePrimUVWAttrib; }
1109  void setUsePrimUVWAttrib(bool val) { myUsePrimUVWAttrib = val; }
1110  bool opUsePrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1111  {
1112  SOP_Node *thissop = cookparms.getNode();
1113  if (!thissop) return getUsePrimUVWAttrib();
1114  bool result;
1115  OP_Utils::evalOpParm(result, thissop, "useprimuvwattrib", cookparms.getCookTime(), 0);
1116  return result;
1117  }
1118  const UT_StringHolder & getPrimUVWAttrib() const { return myPrimUVWAttrib; }
1119  void setPrimUVWAttrib(const UT_StringHolder & val) { myPrimUVWAttrib = val; }
1121  {
1122  SOP_Node *thissop = cookparms.getNode();
1123  if (!thissop) return getPrimUVWAttrib();
1124  UT_StringHolder result;
1125  OP_Utils::evalOpParm(result, thissop, "primuvwattrib", cookparms.getCookTime(), 0);
1126  return result;
1127  }
1128  bool getUseOutputDensityAttrib() const { return myUseOutputDensityAttrib; }
1129  void setUseOutputDensityAttrib(bool val) { myUseOutputDensityAttrib = val; }
1131  {
1132  SOP_Node *thissop = cookparms.getNode();
1133  if (!thissop) return getUseOutputDensityAttrib();
1134  bool result;
1135  OP_Utils::evalOpParm(result, thissop, "useoutputdensityattrib", cookparms.getCookTime(), 0);
1136  return result;
1137  }
1138  const UT_StringHolder & getOutputDensityAttrib() const { return myOutputDensityAttrib; }
1139  void setOutputDensityAttrib(const UT_StringHolder & val) { myOutputDensityAttrib = val; }
1141  {
1142  SOP_Node *thissop = cookparms.getNode();
1143  if (!thissop) return getOutputDensityAttrib();
1144  UT_StringHolder result;
1145  OP_Utils::evalOpParm(result, thissop, "outputdensityattrib", cookparms.getCookTime(), 0);
1146  return result;
1147  }
1148  bool getUseOutputRadiusAttrib() const { return myUseOutputRadiusAttrib; }
1149  void setUseOutputRadiusAttrib(bool val) { myUseOutputRadiusAttrib = val; }
1151  {
1152  SOP_Node *thissop = cookparms.getNode();
1153  if (!thissop) return getUseOutputRadiusAttrib();
1154  bool result;
1155  OP_Utils::evalOpParm(result, thissop, "useoutputradiusattrib", cookparms.getCookTime(), 0);
1156  return result;
1157  }
1158  const UT_StringHolder & getOutputRadiusAttrib() const { return myOutputRadiusAttrib; }
1159  void setOutputRadiusAttrib(const UT_StringHolder & val) { myOutputRadiusAttrib = val; }
1161  {
1162  SOP_Node *thissop = cookparms.getNode();
1163  if (!thissop) return getOutputRadiusAttrib();
1164  UT_StringHolder result;
1165  OP_Utils::evalOpParm(result, thissop, "outputradiusattrib", cookparms.getCookTime(), 0);
1166  return result;
1167  }
1168  bool getRadiusInTextureSpace() const { return myRadiusInTextureSpace; }
1169  void setRadiusInTextureSpace(bool val) { myRadiusInTextureSpace = val; }
1171  {
1172  SOP_Node *thissop = cookparms.getNode();
1173  if (!thissop) return getRadiusInTextureSpace();
1174  bool result;
1175  OP_Utils::evalOpParm(result, thissop, "radiusintexturespace", cookparms.getCookTime(), 0);
1176  return result;
1177  }
1178  const UT_StringHolder & getPointAttribs() const { return myPointAttribs; }
1179  void setPointAttribs(const UT_StringHolder & val) { myPointAttribs = val; }
1181  {
1182  SOP_Node *thissop = cookparms.getNode();
1183  if (!thissop) return getPointAttribs();
1184  UT_StringHolder result;
1185  OP_Utils::evalOpParm(result, thissop, "pointattribs", cookparms.getCookTime(), 0);
1186  return result;
1187  }
1188  const UT_StringHolder & getVertAttribs() const { return myVertAttribs; }
1189  void setVertAttribs(const UT_StringHolder & val) { myVertAttribs = val; }
1191  {
1192  SOP_Node *thissop = cookparms.getNode();
1193  if (!thissop) return getVertAttribs();
1194  UT_StringHolder result;
1195  OP_Utils::evalOpParm(result, thissop, "vertattribs", cookparms.getCookTime(), 0);
1196  return result;
1197  }
1198  const UT_StringHolder & getPrimAttribs() const { return myPrimAttribs; }
1199  void setPrimAttribs(const UT_StringHolder & val) { myPrimAttribs = val; }
1201  {
1202  SOP_Node *thissop = cookparms.getNode();
1203  if (!thissop) return getPrimAttribs();
1204  UT_StringHolder result;
1205  OP_Utils::evalOpParm(result, thissop, "primattribs", cookparms.getCookTime(), 0);
1206  return result;
1207  }
1208  const UT_StringHolder & getDetailAttribs() const { return myDetailAttribs; }
1209  void setDetailAttribs(const UT_StringHolder & val) { myDetailAttribs = val; }
1211  {
1212  SOP_Node *thissop = cookparms.getNode();
1213  if (!thissop) return getDetailAttribs();
1214  UT_StringHolder result;
1215  OP_Utils::evalOpParm(result, thissop, "detailattribs", cookparms.getCookTime(), 0);
1216  return result;
1217  }
1218  fpreal64 getDensityScale() const { return myDensityScale; }
1219  void setDensityScale(fpreal64 val) { myDensityScale = val; }
1221  {
1222  SOP_Node *thissop = cookparms.getNode();
1223  if (!thissop) return getDensityScale();
1224  fpreal64 result;
1225  OP_Utils::evalOpParm(result, thissop, "densityscale", cookparms.getCookTime(), 0);
1226  return result;
1227  }
1228  fpreal64 getScaleRadiiBy() const { return myScaleRadiiBy; }
1229  void setScaleRadiiBy(fpreal64 val) { myScaleRadiiBy = val; }
1231  {
1232  SOP_Node *thissop = cookparms.getNode();
1233  if (!thissop) return getScaleRadiiBy();
1234  fpreal64 result;
1235  OP_Utils::evalOpParm(result, thissop, "scaleradiiby", cookparms.getCookTime(), 0);
1236  return result;
1237  }
1238  bool getUseMaxRadius() const { return myUseMaxRadius; }
1239  void setUseMaxRadius(bool val) { myUseMaxRadius = val; }
1240  bool opUseMaxRadius(const SOP_NodeVerb::CookParms &cookparms) const
1241  {
1242  SOP_Node *thissop = cookparms.getNode();
1243  if (!thissop) return getUseMaxRadius();
1244  bool result;
1245  OP_Utils::evalOpParm(result, thissop, "usemaxradius", cookparms.getCookTime(), 0);
1246  return result;
1247  }
1248  fpreal64 getMaxRadius() const { return myMaxRadius; }
1249  void setMaxRadius(fpreal64 val) { myMaxRadius = val; }
1251  {
1252  SOP_Node *thissop = cookparms.getNode();
1253  if (!thissop) return getMaxRadius();
1254  fpreal64 result;
1255  OP_Utils::evalOpParm(result, thissop, "maxradius", cookparms.getCookTime(), 0);
1256  return result;
1257  }
1258 
1259 private:
1260  UT_StringHolder myGroup;
1261  int64 myGenerateBy;
1262  bool myUseDensityAttrib;
1263  UT_StringHolder myDensityAttrib;
1264  bool myUseAreaAttrib;
1265  UT_StringHolder myAreaAttrib;
1266  bool myForceTotal;
1267  int64 myNpts;
1268  bool myUseDensityTexture;
1269  UT_StringHolder myDensityTexture;
1270  UT_StringHolder myCountPerPrimAttrib;
1271  bool myUseEmergencyLimit;
1272  int64 myEmergencyLimit;
1273  fpreal64 mySeed;
1274  bool myOverridePrimSeed;
1275  UT_StringHolder myPrimSeedAttrib;
1276  bool myRandomizeOrder;
1277  bool myRelaxPoints;
1278  int64 myRelaxIterations;
1279  bool myUsePrimNumAttrib;
1280  UT_StringHolder myPrimNumAttrib;
1281  bool myUsePrimUVWAttrib;
1282  UT_StringHolder myPrimUVWAttrib;
1283  bool myUseOutputDensityAttrib;
1284  UT_StringHolder myOutputDensityAttrib;
1285  bool myUseOutputRadiusAttrib;
1286  UT_StringHolder myOutputRadiusAttrib;
1287  bool myRadiusInTextureSpace;
1288  UT_StringHolder myPointAttribs;
1289  UT_StringHolder myVertAttribs;
1290  UT_StringHolder myPrimAttribs;
1291  UT_StringHolder myDetailAttribs;
1292  fpreal64 myDensityScale;
1293  fpreal64 myScaleRadiiBy;
1294  bool myUseMaxRadius;
1295  fpreal64 myMaxRadius;
1296 
1297 };
void setParmValue(exint idx, const UT_Matrix2D &value)
UT_StringHolder opVertAttribs(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getScaleRadiiBy() const
static void saveData(std::ostream &os, UT_Vector4D v)
const UT_StringHolder & getPrimNumAttrib() const
void doSetParmValue(exint idx, const T &value)
void setParmValue(exint idx, const fpreal &value)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
void setSeed(fpreal64 val)
void setScaleRadiiBy(fpreal64 val)
T & z(void)
Definition: UT_Vector4.h:372
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
void getParmValue(exint idx, exint &value) const
UT_StringHolder opPrimAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setUseDensityTexture(bool val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setVertAttribs(const UT_StringHolder &val)
void setGenerateBy(GenerateBy val)
exint bread(int32 *buffer, exint asize=1)
void getParmValue(exint idx, fpreal &value) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal getTime() const
Definition: OP_Context.h:34
const GLdouble * v
Definition: glcorearb.h:836
bool opUseDensityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPrimSeedAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setDensityScale(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool opUseOutputRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
void setUseOutputRadiusAttrib(bool val)
void setUseOutputDensityAttrib(bool val)
UT_StringHolder opOutputDensityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void setPrimUVWAttrib(const UT_StringHolder &val)
T & x(void)
Definition: UT_Vector2.h:284
static void loadData(UT_IStream &is, UT_Vector3I &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opDetailAttribs(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opDensityTexture(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void setPrimAttribs(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getPrimSeedAttrib() const
static void saveData(std::ostream &os, UT_Vector2D v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
bool opRandomizeOrder(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opOutputRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setPointAttribs(const UT_StringHolder &val)
void doGetParmValue(exint idx, T &value) const
const UT_StringHolder & getVertAttribs() const
void getParmValue(exint idx, UT_Vector2D &value) const
void setDensityAttrib(const UT_StringHolder &val)
const UT_StringHolder & getOutputDensityAttrib() const
bool opUseMaxRadius(const SOP_NodeVerb::CookParms &cookparms) const
bool opOverridePrimSeed(const SOP_NodeVerb::CookParms &cookparms) const
void setMaxRadius(fpreal64 val)
UT_StringHolder opAreaAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setDensityTexture(const UT_StringHolder &val)
void setOutputDensityAttrib(const UT_StringHolder &val)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
void setParmValue(exint idx, const UT_StringHolder &value)
long long int64
Definition: SYS_Types.h:106
UT_StringHolder opDensityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector3D &value) const
const UT_StringHolder & getAreaAttrib() const
void getParmValue(exint idx, UT_Matrix3D &value) const
bool opUsePrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opRadiusInTextureSpace(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
GenerateBy opGenerateBy(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
const UT_StringHolder & getCountPerPrimAttrib() 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 UT_Vector3D &value)
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getDensityTexture() const
void getParmValue(exint idx, UT_Matrix2D &value) const
int64 exint
Definition: SYS_Types.h:115
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:191
const UT_StringHolder & getDetailAttribs() const
const UT_StringHolder & getPrimAttribs() const
const UT_StringHolder & getGroup() const
void setAreaAttrib(const UT_StringHolder &val)
const UT_StringHolder & getOutputRadiusAttrib() const
int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
bool operator==(const SOP_Scatter_2_0Parms &src) const
bool getUseDensityTexture() const
static void saveData(std::ostream &os, int64 v)
void setParmValue(exint idx, const UT_Matrix3D &value)
bool opUseAreaAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setCountPerPrimAttrib(const UT_StringHolder &val)
bool getUseOutputRadiusAttrib() const
void getParmValue(exint idx, PRM_DataItemHandle &value) const
virtual exint getNumParms() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void save(std::ostream &os) const
GLboolean * data
Definition: glcorearb.h:130
const UT_StringHolder & getPointAttribs() const
UT_StringHolder opPrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:34
T & y(void)
Definition: UT_Vector4.h:370
fpreal64 opMaxRadius(const SOP_NodeVerb::CookParms &cookparms) const
GenerateBy getGenerateBy() const
const UT_StringHolder & getDensityAttrib() const
bool opForceTotal(const SOP_NodeVerb::CookParms &cookparms) const
bool opUsePrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
UT_StringHolder opPrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector4D &value) const
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void loadData(UT_IStream &is, int64 &v)
bool opUseDensityTexture(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void setUsePrimUVWAttrib(bool val)
void getParmValue(exint idx, UT_Matrix4D &value) const
bool opRelaxPoints(const SOP_NodeVerb::CookParms &cookparms) const
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
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, fpreal64 v)
void strncpy(const char *src, exint maxlen)
virtual void copyFrom(const SOP_NodeParms *src)
static void loadData(UT_IStream &is, UT_StringHolder &v)
const UT_StringHolder & getPrimUVWAttrib() const
bool opUseOutputDensityAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
fpreal64 opScaleRadiiBy(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const exint &value)
static void loadData(UT_IStream &is, fpreal64 &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
UT_StringHolder opPointAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setDetailAttribs(const UT_StringHolder &val)
fpreal64 getDensityScale() const
void setUseDensityAttrib(bool val)
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
bool getRadiusInTextureSpace() const
fpreal64 getMaxRadius() const
#define SOP_API
Definition: SOP_API.h:10
bool opUseEmergencyLimit(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opCountPerPrimAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const char * buffer() const
void setRadiusInTextureSpace(bool val)
int64 opEmergencyLimit(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
bool load(UT_IStream &is)
void setParmValue(exint idx, const UT_Matrix4D &value)
T & x(void)
Definition: UT_Vector4.h:368
void setEmergencyLimit(int64 val)
T & y(void)
Definition: UT_Vector2.h:286
void setOutputRadiusAttrib(const UT_StringHolder &val)
void setPrimNumAttrib(const UT_StringHolder &val)
GLboolean r
Definition: glcorearb.h:1221
static void saveData(std::ostream &os, UT_Matrix2D v)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void setRelaxIterations(int64 val)
static void saveData(std::ostream &os, bool v)
void setPrimSeedAttrib(const UT_StringHolder &val)
T & w(void)
Definition: UT_Vector4.h:374
int64 opRelaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseOutputDensityAttrib() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setUsePrimNumAttrib(bool val)
void setOverridePrimSeed(bool val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
void setUseEmergencyLimit(bool val)
virtual ParmType getParmType(exint fieldnum) const
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setParmValue(exint idx, const UT_Vector4D &value)
GLenum src
Definition: glcorearb.h:1792
fpreal64 opDensityScale(const SOP_NodeVerb::CookParms &cookparms) const
virtual const char * getParmName(exint fieldnum) const