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