HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Ray.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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_RayEnums
24 {
25  enum class Entity
26  {
27  PRIMITIVE = 0,
28  POINT
29  };
30 
32  getToken(Entity enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Entity::PRIMITIVE: return "primitive"_sh;
37  case Entity::POINT: return "point"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class Method
43  {
44  MINIMUM = 0,
45  PROJECT
46  };
47 
49  getToken(Method enum_value)
50  {
51  using namespace UT::Literal;
52  switch (enum_value) {
53  case Method::MINIMUM: return "minimum"_sh;
54  case Method::PROJECT: return "project"_sh;
55  default: UT_ASSERT(false); return ""_sh;
56  }
57  }
58 
59  enum class DirMethod
60  {
61  VECTOR = 0,
62  NORMAL,
63  ATTRIBUTE
64  };
65 
67  getToken(DirMethod enum_value)
68  {
69  using namespace UT::Literal;
70  switch (enum_value) {
71  case DirMethod::VECTOR: return "vector"_sh;
72  case DirMethod::NORMAL: return "normal"_sh;
73  case DirMethod::ATTRIBUTE: return "attribute"_sh;
74  default: UT_ASSERT(false); return ""_sh;
75  }
76  }
77 
78  enum class Combinetype
79  {
80  AVERAGE = 0,
81  MEDIAN,
82  SHORTEST,
83  LONGEST
84  };
85 
87  getToken(Combinetype enum_value)
88  {
89  using namespace UT::Literal;
90  switch (enum_value) {
91  case Combinetype::AVERAGE: return "average"_sh;
92  case Combinetype::MEDIAN: return "median"_sh;
93  case Combinetype::SHORTEST: return "shortest"_sh;
94  case Combinetype::LONGEST: return "longest"_sh;
95  default: UT_ASSERT(false); return ""_sh;
96  }
97  }
98 
99 }
100 
101 
103 {
104 public:
105  static int version() { return 1; }
106 
108  {
109  myGroup = ""_UTsh;
110  myEntity = 0;
111  myCollision = ""_UTsh;
112  myMethod = 1;
113  myDirMethod = 1;
114  myDir = UT_Vector3D(0,0,0);
115  myDirAttrib = "N"_UTsh;
116  myShowguide = true;
117  myDotrans = true;
118  myLookfar = false;
119  myPutnml = false;
120  myPutdist = false;
121  myReverserays = false;
122  myRtolerance = 0.01;
123  myScale = 1;
124  myLift = 0;
125  myBias = 0;
126  myMaxraydistcheck = false;
127  myMaxraydist = 0;
128  mySample = 1;
129  myJitter = 0;
130  myCombinetype = 0;
131  mySeed = 1;
132  myNewgrp = false;
133  myHitgrp = "rayHitGroup"_UTsh;
134  myUseprimnumattrib = false;
135  myPrimnumattrib = "hitprim"_UTsh;
136  myUseprimuvwattrib = false;
137  myPrimuvwattrib = "hitprimuv"_UTsh;
138  myGetptattribs = false;
139  myPtattribnames = "*"_UTsh;
140  myVertexattribnames = ""_UTsh;
141  myPrimitiveattribnames = ""_UTsh;
142  myDetailattribnames = ""_UTsh;
143 
144  }
145 
146  explicit SOP_RayParms(const SOP_RayParms &) = default;
147  SOP_RayParms &operator=(const SOP_RayParms &) = default;
148  SOP_RayParms(SOP_RayParms &&) noexcept = default;
149  SOP_RayParms &operator=(SOP_RayParms &&) noexcept = default;
150 
151  ~SOP_RayParms() override {}
152 
153  bool operator==(const SOP_RayParms &src) const
154  {
155  if (myGroup != src.myGroup) return false;
156  if (myEntity != src.myEntity) return false;
157  if (myCollision != src.myCollision) return false;
158  if (myMethod != src.myMethod) return false;
159  if (myDirMethod != src.myDirMethod) return false;
160  if (myDir != src.myDir) return false;
161  if (myDirAttrib != src.myDirAttrib) return false;
162  if (myShowguide != src.myShowguide) return false;
163  if (myDotrans != src.myDotrans) return false;
164  if (myLookfar != src.myLookfar) return false;
165  if (myPutnml != src.myPutnml) return false;
166  if (myPutdist != src.myPutdist) return false;
167  if (myReverserays != src.myReverserays) return false;
168  if (myRtolerance != src.myRtolerance) return false;
169  if (myScale != src.myScale) return false;
170  if (myLift != src.myLift) return false;
171  if (myBias != src.myBias) return false;
172  if (myMaxraydistcheck != src.myMaxraydistcheck) return false;
173  if (myMaxraydist != src.myMaxraydist) return false;
174  if (mySample != src.mySample) return false;
175  if (myJitter != src.myJitter) return false;
176  if (myCombinetype != src.myCombinetype) return false;
177  if (mySeed != src.mySeed) return false;
178  if (myNewgrp != src.myNewgrp) return false;
179  if (myHitgrp != src.myHitgrp) return false;
180  if (myUseprimnumattrib != src.myUseprimnumattrib) return false;
181  if (myPrimnumattrib != src.myPrimnumattrib) return false;
182  if (myUseprimuvwattrib != src.myUseprimuvwattrib) return false;
183  if (myPrimuvwattrib != src.myPrimuvwattrib) return false;
184  if (myGetptattribs != src.myGetptattribs) return false;
185  if (myPtattribnames != src.myPtattribnames) return false;
186  if (myVertexattribnames != src.myVertexattribnames) return false;
187  if (myPrimitiveattribnames != src.myPrimitiveattribnames) return false;
188  if (myDetailattribnames != src.myDetailattribnames) return false;
189 
190  return true;
191  }
192  bool operator!=(const SOP_RayParms &src) const
193  {
194  return !operator==(src);
195  }
200 
201 
202 
203  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
204  {
205  myGroup = ""_UTsh;
206  if (true)
207  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
208  myEntity = 0;
209  if (true)
210  graph->evalOpParm(myEntity, nodeidx, "entity", time, 0);
211  myCollision = ""_UTsh;
212  if (true)
213  graph->evalOpParm(myCollision, nodeidx, "collision", time, 0);
214  myMethod = 1;
215  if (true)
216  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
217  myDirMethod = 1;
218  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
219  graph->evalOpParm(myDirMethod, nodeidx, "dirmethod", time, 0);
220  myDir = UT_Vector3D(0,0,0);
221  if (true && ( (true&&!(((int64(getMethod())!=1))||((int64(getDirMethod())!=0)))) ) )
222  graph->evalOpParm(myDir, nodeidx, "dir", time, 0);
223  myDirAttrib = "N"_UTsh;
224  if (true && ( (true&&!(((int64(getMethod())!=1))||((int64(getDirMethod())!=2)))) ) )
225  graph->evalOpParm(myDirAttrib, nodeidx, "dirattrib", time, 0);
226  myShowguide = true;
227  if (true && ( (true&&!(((int64(getMethod())>=0)))) ) )
228  graph->evalOpParm(myShowguide, nodeidx, "showguide", time, 0);
229  myDotrans = true;
230  if (true)
231  graph->evalOpParm(myDotrans, nodeidx, "dotrans", time, 0);
232  myLookfar = false;
233  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
234  graph->evalOpParm(myLookfar, nodeidx, "lookfar", time, 0);
235  myPutnml = false;
236  if (true)
237  graph->evalOpParm(myPutnml, nodeidx, "putnml", time, 0);
238  myPutdist = false;
239  if (true)
240  graph->evalOpParm(myPutdist, nodeidx, "putdist", time, 0);
241  myReverserays = false;
242  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
243  graph->evalOpParm(myReverserays, nodeidx, "reverserays", time, 0);
244  myRtolerance = 0.01;
245  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
246  graph->evalOpParm(myRtolerance, nodeidx, "rtolerance", time, 0);
247  myScale = 1;
248  if (true && ( (true&&!(((getDotrans()==0)))) ) )
249  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
250  myLift = 0;
251  if (true)
252  graph->evalOpParm(myLift, nodeidx, "lift", time, 0);
253  myBias = 0;
254  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
255  graph->evalOpParm(myBias, nodeidx, "bias", time, 0);
256  myMaxraydistcheck = false;
257  if (true)
258  graph->evalOpParm(myMaxraydistcheck, nodeidx, "maxraydistcheck", time, 0);
259  myMaxraydist = 0;
260  if (true && ( (true&&!(((getMaxraydistcheck()==0)))) ) )
261  graph->evalOpParm(myMaxraydist, nodeidx, "maxraydist", time, 0);
262  mySample = 1;
263  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
264  graph->evalOpParm(mySample, nodeidx, "sample", time, 0);
265  myJitter = 0;
266  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
267  graph->evalOpParm(myJitter, nodeidx, "jitter", time, 0);
268  myCombinetype = 0;
269  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
270  graph->evalOpParm(myCombinetype, nodeidx, "combinetype", time, 0);
271  mySeed = 1;
272  if (true && ( (true&&!(((int64(getMethod())!=1)))) ) )
273  graph->evalOpParm(mySeed, nodeidx, "seed", time, 0);
274  myNewgrp = false;
275  if (true)
276  graph->evalOpParm(myNewgrp, nodeidx, "newgrp", time, 0);
277  myHitgrp = "rayHitGroup"_UTsh;
278  if (true && ( (true&&!(((getNewgrp()==0)))) ) )
279  graph->evalOpParm(myHitgrp, nodeidx, "hitgrp", time, 0);
280  myUseprimnumattrib = false;
281  if (true)
282  graph->evalOpParm(myUseprimnumattrib, nodeidx, "useprimnumattrib", time, 0);
283  myPrimnumattrib = "hitprim"_UTsh;
284  if (true && ( (true&&!(((getUseprimnumattrib()==0)))) ) )
285  graph->evalOpParm(myPrimnumattrib, nodeidx, "primnumattrib", time, 0);
286  myUseprimuvwattrib = false;
287  if (true)
288  graph->evalOpParm(myUseprimuvwattrib, nodeidx, "useprimuvwattrib", time, 0);
289  myPrimuvwattrib = "hitprimuv"_UTsh;
290  if (true && ( (true&&!(((getUseprimuvwattrib()==0)))) ) )
291  graph->evalOpParm(myPrimuvwattrib, nodeidx, "primuvwattrib", time, 0);
292  myGetptattribs = false;
293  if (true)
294  graph->evalOpParm(myGetptattribs, nodeidx, "getptattribs", time, 0);
295  myPtattribnames = "*"_UTsh;
296  if (true && ( (true&&!(((getGetptattribs()==0)))) ) )
297  graph->evalOpParm(myPtattribnames, nodeidx, "ptattribnames", time, 0);
298  myVertexattribnames = ""_UTsh;
299  if (true && ( (true&&!(((getGetptattribs()==0)))) ) )
300  graph->evalOpParm(myVertexattribnames, nodeidx, "vertexattribnames", time, 0);
301  myPrimitiveattribnames = ""_UTsh;
302  if (true && ( (true&&!(((getGetptattribs()==0)))) ) )
303  graph->evalOpParm(myPrimitiveattribnames, nodeidx, "primitiveattribnames", time, 0);
304  myDetailattribnames = ""_UTsh;
305  if (true && ( (true&&!(((getGetptattribs()==0)))) ) )
306  graph->evalOpParm(myDetailattribnames, nodeidx, "detailattribnames", time, 0);
307 
308  }
309 
310 
311  void loadFromOpSubclass(const LoadParms &loadparms) override
312  {
313  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
314  }
315 
316 
317  void copyFrom(const OP_NodeParms *src) override
318  {
319  *this = *((const SOP_RayParms *)src);
320  }
321 
322  template <typename T>
323  void
324  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
325  {
326  if (idx.size() < 1)
327  return;
328  UT_ASSERT(idx.size() == instance.size()+1);
329  if (idx.size() != instance.size()+1)
330  return;
331  switch (idx[0])
332  {
333  case 0:
334  coerceValue(value, myGroup);
335  break;
336  case 1:
337  coerceValue(value, myEntity);
338  break;
339  case 2:
340  coerceValue(value, myCollision);
341  break;
342  case 3:
343  coerceValue(value, myMethod);
344  break;
345  case 4:
346  coerceValue(value, myDirMethod);
347  break;
348  case 5:
349  coerceValue(value, myDir);
350  break;
351  case 6:
352  coerceValue(value, myDirAttrib);
353  break;
354  case 7:
355  coerceValue(value, myShowguide);
356  break;
357  case 8:
358  coerceValue(value, myDotrans);
359  break;
360  case 9:
361  coerceValue(value, myLookfar);
362  break;
363  case 10:
364  coerceValue(value, myPutnml);
365  break;
366  case 11:
367  coerceValue(value, myPutdist);
368  break;
369  case 12:
370  coerceValue(value, myReverserays);
371  break;
372  case 13:
373  coerceValue(value, myRtolerance);
374  break;
375  case 14:
376  coerceValue(value, myScale);
377  break;
378  case 15:
379  coerceValue(value, myLift);
380  break;
381  case 16:
382  coerceValue(value, myBias);
383  break;
384  case 17:
385  coerceValue(value, myMaxraydistcheck);
386  break;
387  case 18:
388  coerceValue(value, myMaxraydist);
389  break;
390  case 19:
391  coerceValue(value, mySample);
392  break;
393  case 20:
394  coerceValue(value, myJitter);
395  break;
396  case 21:
397  coerceValue(value, myCombinetype);
398  break;
399  case 22:
400  coerceValue(value, mySeed);
401  break;
402  case 23:
403  coerceValue(value, myNewgrp);
404  break;
405  case 24:
406  coerceValue(value, myHitgrp);
407  break;
408  case 25:
409  coerceValue(value, myUseprimnumattrib);
410  break;
411  case 26:
412  coerceValue(value, myPrimnumattrib);
413  break;
414  case 27:
415  coerceValue(value, myUseprimuvwattrib);
416  break;
417  case 28:
418  coerceValue(value, myPrimuvwattrib);
419  break;
420  case 29:
421  coerceValue(value, myGetptattribs);
422  break;
423  case 30:
424  coerceValue(value, myPtattribnames);
425  break;
426  case 31:
427  coerceValue(value, myVertexattribnames);
428  break;
429  case 32:
430  coerceValue(value, myPrimitiveattribnames);
431  break;
432  case 33:
433  coerceValue(value, myDetailattribnames);
434  break;
435 
436  }
437  }
438 
439  bool isParmColorRamp(exint idx) const override
440  {
441  switch (idx)
442  {
443 
444  }
445  return false;
446  }
447 
448  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
449  { doGetParmValue(idx, instance, value); }
450  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
451  { doGetParmValue(idx, instance, value); }
452  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
453  { doGetParmValue(idx, instance, value); }
454  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
455  { doGetParmValue(idx, instance, value); }
456  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
457  { doGetParmValue(idx, instance, value); }
458  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
459  { doGetParmValue(idx, instance, value); }
460  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
461  { doGetParmValue(idx, instance, value); }
462  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
463  { doGetParmValue(idx, instance, value); }
464  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
465  { doGetParmValue(idx, instance, value); }
466  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
467  { doGetParmValue(idx, instance, value); }
468  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
469  { doGetParmValue(idx, instance, value); }
470 
471  template <typename T>
472  void
473  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
474  {
475  if (idx.size() < 1)
476  return;
477  UT_ASSERT(idx.size() == instance.size()+1);
478  if (idx.size() != instance.size()+1)
479  return;
480  switch (idx[0])
481  {
482  case 0:
483  coerceValue(myGroup, ( ( value ) ));
484  break;
485  case 1:
486  coerceValue(myEntity, clampMinValue(0, clampMaxValue(1, value ) ));
487  break;
488  case 2:
489  coerceValue(myCollision, ( ( value ) ));
490  break;
491  case 3:
492  coerceValue(myMethod, clampMinValue(0, clampMaxValue(1, value ) ));
493  break;
494  case 4:
495  coerceValue(myDirMethod, clampMinValue(0, clampMaxValue(2, value ) ));
496  break;
497  case 5:
498  coerceValue(myDir, ( ( value ) ));
499  break;
500  case 6:
501  coerceValue(myDirAttrib, ( ( value ) ));
502  break;
503  case 7:
504  coerceValue(myShowguide, ( ( value ) ));
505  break;
506  case 8:
507  coerceValue(myDotrans, ( ( value ) ));
508  break;
509  case 9:
510  coerceValue(myLookfar, ( ( value ) ));
511  break;
512  case 10:
513  coerceValue(myPutnml, ( ( value ) ));
514  break;
515  case 11:
516  coerceValue(myPutdist, ( ( value ) ));
517  break;
518  case 12:
519  coerceValue(myReverserays, ( ( value ) ));
520  break;
521  case 13:
522  coerceValue(myRtolerance, clampMinValue(0, clampMaxValue(1, value ) ));
523  break;
524  case 14:
525  coerceValue(myScale, ( ( value ) ));
526  break;
527  case 15:
528  coerceValue(myLift, ( ( value ) ));
529  break;
530  case 16:
531  coerceValue(myBias, ( ( value ) ));
532  break;
533  case 17:
534  coerceValue(myMaxraydistcheck, ( ( value ) ));
535  break;
536  case 18:
537  coerceValue(myMaxraydist, ( ( value ) ));
538  break;
539  case 19:
540  coerceValue(mySample, clampMinValue(1, ( value ) ));
541  break;
542  case 20:
543  coerceValue(myJitter, ( ( value ) ));
544  break;
545  case 21:
546  coerceValue(myCombinetype, clampMinValue(0, clampMaxValue(3, value ) ));
547  break;
548  case 22:
549  coerceValue(mySeed, clampMinValue(0, ( value ) ));
550  break;
551  case 23:
552  coerceValue(myNewgrp, ( ( value ) ));
553  break;
554  case 24:
555  coerceValue(myHitgrp, ( ( value ) ));
556  break;
557  case 25:
558  coerceValue(myUseprimnumattrib, ( ( value ) ));
559  break;
560  case 26:
561  coerceValue(myPrimnumattrib, ( ( value ) ));
562  break;
563  case 27:
564  coerceValue(myUseprimuvwattrib, ( ( value ) ));
565  break;
566  case 28:
567  coerceValue(myPrimuvwattrib, ( ( value ) ));
568  break;
569  case 29:
570  coerceValue(myGetptattribs, ( ( value ) ));
571  break;
572  case 30:
573  coerceValue(myPtattribnames, ( ( value ) ));
574  break;
575  case 31:
576  coerceValue(myVertexattribnames, ( ( value ) ));
577  break;
578  case 32:
579  coerceValue(myPrimitiveattribnames, ( ( value ) ));
580  break;
581  case 33:
582  coerceValue(myDetailattribnames, ( ( value ) ));
583  break;
584 
585  }
586  }
587 
588  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
589  { doSetParmValue(idx, instance, value); }
590  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
591  { doSetParmValue(idx, instance, value); }
592  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
593  { doSetParmValue(idx, instance, value); }
594  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
595  { doSetParmValue(idx, instance, value); }
596  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
597  { doSetParmValue(idx, instance, value); }
598  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
599  { doSetParmValue(idx, instance, value); }
600  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
601  { doSetParmValue(idx, instance, value); }
602  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
603  { doSetParmValue(idx, instance, value); }
604  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
605  { doSetParmValue(idx, instance, value); }
606  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
607  { doSetParmValue(idx, instance, value); }
608  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
609  { doSetParmValue(idx, instance, value); }
610 
611  exint getNestNumParms(TempIndex idx) const override
612  {
613  if (idx.size() == 0)
614  return 34;
615  switch (idx[0])
616  {
617 
618  }
619  // Invalid
620  return 0;
621  }
622 
623  const char *getNestParmName(TempIndex fieldnum) const override
624  {
625  if (fieldnum.size() < 1)
626  return 0;
627  switch (fieldnum[0])
628  {
629  case 0:
630  return "group";
631  case 1:
632  return "entity";
633  case 2:
634  return "collision";
635  case 3:
636  return "method";
637  case 4:
638  return "dirmethod";
639  case 5:
640  return "dir";
641  case 6:
642  return "dirattrib";
643  case 7:
644  return "showguide";
645  case 8:
646  return "dotrans";
647  case 9:
648  return "lookfar";
649  case 10:
650  return "putnml";
651  case 11:
652  return "putdist";
653  case 12:
654  return "reverserays";
655  case 13:
656  return "rtolerance";
657  case 14:
658  return "scale";
659  case 15:
660  return "lift";
661  case 16:
662  return "bias";
663  case 17:
664  return "maxraydistcheck";
665  case 18:
666  return "maxraydist";
667  case 19:
668  return "sample";
669  case 20:
670  return "jitter";
671  case 21:
672  return "combinetype";
673  case 22:
674  return "seed";
675  case 23:
676  return "newgrp";
677  case 24:
678  return "hitgrp";
679  case 25:
680  return "useprimnumattrib";
681  case 26:
682  return "primnumattrib";
683  case 27:
684  return "useprimuvwattrib";
685  case 28:
686  return "primuvwattrib";
687  case 29:
688  return "getptattribs";
689  case 30:
690  return "ptattribnames";
691  case 31:
692  return "vertexattribnames";
693  case 32:
694  return "primitiveattribnames";
695  case 33:
696  return "detailattribnames";
697 
698  }
699  return 0;
700  }
701 
702  ParmType getNestParmType(TempIndex fieldnum) const override
703  {
704  if (fieldnum.size() < 1)
705  return PARM_UNSUPPORTED;
706  switch (fieldnum[0])
707  {
708  case 0:
709  return PARM_STRING;
710  case 1:
711  return PARM_INTEGER;
712  case 2:
713  return PARM_STRING;
714  case 3:
715  return PARM_INTEGER;
716  case 4:
717  return PARM_INTEGER;
718  case 5:
719  return PARM_VECTOR3;
720  case 6:
721  return PARM_STRING;
722  case 7:
723  return PARM_INTEGER;
724  case 8:
725  return PARM_INTEGER;
726  case 9:
727  return PARM_INTEGER;
728  case 10:
729  return PARM_INTEGER;
730  case 11:
731  return PARM_INTEGER;
732  case 12:
733  return PARM_INTEGER;
734  case 13:
735  return PARM_FLOAT;
736  case 14:
737  return PARM_FLOAT;
738  case 15:
739  return PARM_FLOAT;
740  case 16:
741  return PARM_FLOAT;
742  case 17:
743  return PARM_INTEGER;
744  case 18:
745  return PARM_FLOAT;
746  case 19:
747  return PARM_INTEGER;
748  case 20:
749  return PARM_FLOAT;
750  case 21:
751  return PARM_INTEGER;
752  case 22:
753  return PARM_INTEGER;
754  case 23:
755  return PARM_INTEGER;
756  case 24:
757  return PARM_STRING;
758  case 25:
759  return PARM_INTEGER;
760  case 26:
761  return PARM_STRING;
762  case 27:
763  return PARM_INTEGER;
764  case 28:
765  return PARM_STRING;
766  case 29:
767  return PARM_INTEGER;
768  case 30:
769  return PARM_STRING;
770  case 31:
771  return PARM_STRING;
772  case 32:
773  return PARM_STRING;
774  case 33:
775  return PARM_STRING;
776 
777  }
778  return PARM_UNSUPPORTED;
779  }
780 
781  // Boiler plate to load individual types.
782  static void loadData(UT_IStream &is, int64 &v)
783  { is.bread(&v, 1); }
784  static void loadData(UT_IStream &is, bool &v)
785  { int64 iv; is.bread(&iv, 1); v = iv; }
786  static void loadData(UT_IStream &is, fpreal64 &v)
787  { is.bread<fpreal64>(&v, 1); }
788  static void loadData(UT_IStream &is, UT_Vector2D &v)
789  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
790  static void loadData(UT_IStream &is, UT_Vector3D &v)
791  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
792  is.bread<fpreal64>(&v.z(), 1); }
793  static void loadData(UT_IStream &is, UT_Vector4D &v)
794  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
795  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
796  static void loadData(UT_IStream &is, UT_Matrix2D &v)
797  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
798  static void loadData(UT_IStream &is, UT_Matrix3D &v)
799  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
800  static void loadData(UT_IStream &is, UT_Matrix4D &v)
801  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
802  static void loadData(UT_IStream &is, UT_Vector2I &v)
803  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
804  static void loadData(UT_IStream &is, UT_Vector3I &v)
805  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
806  is.bread<int64>(&v.z(), 1); }
807  static void loadData(UT_IStream &is, UT_Vector4I &v)
808  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
809  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
811  { is.bread(v); }
813  { UT_StringHolder rampdata;
814  loadData(is, rampdata);
815  if (rampdata.isstring())
816  {
817  v.reset(new UT_Ramp());
818  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
819  v->load(istr);
820  }
821  else v.reset();
822  }
825  loadData(is, data);
826  if (data.isstring())
827  {
828  // Find the data type.
829  const char *colon = UT_StringWrap(data).findChar(':');
830  if (colon)
831  {
832  int typelen = colon - data.buffer();
834  type.strncpy(data.buffer(), typelen);
835  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
836 
837  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
838  }
839  }
840  else v.reset();
841  }
842 
843  static void saveData(std::ostream &os, int64 v)
844  { UTwrite(os, &v); }
845  static void saveData(std::ostream &os, bool v)
846  { int64 iv = v; UTwrite(os, &iv); }
847  static void saveData(std::ostream &os, fpreal64 v)
848  { UTwrite<fpreal64>(os, &v); }
849  static void saveData(std::ostream &os, UT_Vector2D v)
850  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
851  static void saveData(std::ostream &os, UT_Vector3D v)
852  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
853  UTwrite<fpreal64>(os, &v.z()); }
854  static void saveData(std::ostream &os, UT_Vector4D v)
855  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
856  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
857  static void saveData(std::ostream &os, UT_Matrix2D v)
859  static void saveData(std::ostream &os, UT_Matrix3D v)
861  static void saveData(std::ostream &os, UT_Matrix4D v)
863  static void saveData(std::ostream &os, UT_StringHolder s)
864  { UT_StringWrap(s).saveBinary(os); }
865  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
867  UT_OStringStream ostr;
868  if (s) s->save(ostr);
869  result = ostr.str();
870  saveData(os, result);
871  }
872  static void saveData(std::ostream &os, PRM_DataItemHandle s)
874  UT_OStringStream ostr;
875  if (s)
876  {
877  ostr << s->getDataTypeToken();
878  ostr << ":";
879  s->saveBinary(ostr);
880  }
881  result = ostr.str();
882  saveData(os, result);
883  }
884 
885 
886  void save(std::ostream &os) const
887  {
888  int32 v = version();
889  UTwrite(os, &v);
890  saveData(os, myGroup);
891  saveData(os, myEntity);
892  saveData(os, myCollision);
893  saveData(os, myMethod);
894  saveData(os, myDirMethod);
895  saveData(os, myDir);
896  saveData(os, myDirAttrib);
897  saveData(os, myShowguide);
898  saveData(os, myDotrans);
899  saveData(os, myLookfar);
900  saveData(os, myPutnml);
901  saveData(os, myPutdist);
902  saveData(os, myReverserays);
903  saveData(os, myRtolerance);
904  saveData(os, myScale);
905  saveData(os, myLift);
906  saveData(os, myBias);
907  saveData(os, myMaxraydistcheck);
908  saveData(os, myMaxraydist);
909  saveData(os, mySample);
910  saveData(os, myJitter);
911  saveData(os, myCombinetype);
912  saveData(os, mySeed);
913  saveData(os, myNewgrp);
914  saveData(os, myHitgrp);
915  saveData(os, myUseprimnumattrib);
916  saveData(os, myPrimnumattrib);
917  saveData(os, myUseprimuvwattrib);
918  saveData(os, myPrimuvwattrib);
919  saveData(os, myGetptattribs);
920  saveData(os, myPtattribnames);
921  saveData(os, myVertexattribnames);
922  saveData(os, myPrimitiveattribnames);
923  saveData(os, myDetailattribnames);
924 
925  }
926 
927  bool load(UT_IStream &is)
928  {
929  int32 v;
930  is.bread(&v, 1);
931  if (version() != v)
932  {
933  // Fail incompatible versions
934  return false;
935  }
936  loadData(is, myGroup);
937  loadData(is, myEntity);
938  loadData(is, myCollision);
939  loadData(is, myMethod);
940  loadData(is, myDirMethod);
941  loadData(is, myDir);
942  loadData(is, myDirAttrib);
943  loadData(is, myShowguide);
944  loadData(is, myDotrans);
945  loadData(is, myLookfar);
946  loadData(is, myPutnml);
947  loadData(is, myPutdist);
948  loadData(is, myReverserays);
949  loadData(is, myRtolerance);
950  loadData(is, myScale);
951  loadData(is, myLift);
952  loadData(is, myBias);
953  loadData(is, myMaxraydistcheck);
954  loadData(is, myMaxraydist);
955  loadData(is, mySample);
956  loadData(is, myJitter);
957  loadData(is, myCombinetype);
958  loadData(is, mySeed);
959  loadData(is, myNewgrp);
960  loadData(is, myHitgrp);
961  loadData(is, myUseprimnumattrib);
962  loadData(is, myPrimnumattrib);
963  loadData(is, myUseprimuvwattrib);
964  loadData(is, myPrimuvwattrib);
965  loadData(is, myGetptattribs);
966  loadData(is, myPtattribnames);
967  loadData(is, myVertexattribnames);
968  loadData(is, myPrimitiveattribnames);
969  loadData(is, myDetailattribnames);
970 
971  return true;
972  }
973 
974  const UT_StringHolder & getGroup() const { return myGroup; }
975  void setGroup(const UT_StringHolder & val) { myGroup = val; }
977  {
978  SOP_Node *thissop = cookparms.getNode();
979  if (!thissop) return getGroup();
981  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
982  return result;
983  }
984  Entity getEntity() const { return Entity(myEntity); }
985  void setEntity(Entity val) { myEntity = int64(val); }
986  Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
987  {
988  SOP_Node *thissop = cookparms.getNode();
989  if (!thissop) return getEntity();
990  int64 result;
991  OP_Utils::evalOpParm(result, thissop, "entity", cookparms.getCookTime(), 0);
992  return Entity(result);
993  }
994  const UT_StringHolder & getCollision() const { return myCollision; }
995  void setCollision(const UT_StringHolder & val) { myCollision = val; }
997  {
998  SOP_Node *thissop = cookparms.getNode();
999  if (!thissop) return getCollision();
1001  OP_Utils::evalOpParm(result, thissop, "collision", cookparms.getCookTime(), 0);
1002  return result;
1003  }
1004  Method getMethod() const { return Method(myMethod); }
1005  void setMethod(Method val) { myMethod = int64(val); }
1006  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
1007  {
1008  SOP_Node *thissop = cookparms.getNode();
1009  if (!thissop) return getMethod();
1010  int64 result;
1011  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
1012  return Method(result);
1013  }
1014  DirMethod getDirMethod() const { return DirMethod(myDirMethod); }
1015  void setDirMethod(DirMethod val) { myDirMethod = int64(val); }
1017  {
1018  SOP_Node *thissop = cookparms.getNode();
1019  if (!thissop) return getDirMethod();
1020  int64 result;
1021  OP_Utils::evalOpParm(result, thissop, "dirmethod", cookparms.getCookTime(), 0);
1022  return DirMethod(result);
1023  }
1024  UT_Vector3D getDir() const { return myDir; }
1025  void setDir(UT_Vector3D val) { myDir = val; }
1027  {
1028  SOP_Node *thissop = cookparms.getNode();
1029  if (!thissop) return getDir();
1031  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
1032  return result;
1033  }
1034  const UT_StringHolder & getDirAttrib() const { return myDirAttrib; }
1035  void setDirAttrib(const UT_StringHolder & val) { myDirAttrib = val; }
1037  {
1038  SOP_Node *thissop = cookparms.getNode();
1039  if (!thissop) return getDirAttrib();
1041  OP_Utils::evalOpParm(result, thissop, "dirattrib", cookparms.getCookTime(), 0);
1042  return result;
1043  }
1044  bool getShowguide() const { return myShowguide; }
1045  void setShowguide(bool val) { myShowguide = val; }
1046  bool opShowguide(const SOP_NodeVerb::CookParms &cookparms) const
1047  {
1048  SOP_Node *thissop = cookparms.getNode();
1049  if (!thissop) return getShowguide();
1050  bool result;
1051  OP_Utils::evalOpParm(result, thissop, "showguide", cookparms.getCookTime(), 0);
1052  return result;
1053  }
1054  bool getDotrans() const { return myDotrans; }
1055  void setDotrans(bool val) { myDotrans = val; }
1056  bool opDotrans(const SOP_NodeVerb::CookParms &cookparms) const
1057  {
1058  SOP_Node *thissop = cookparms.getNode();
1059  if (!thissop) return getDotrans();
1060  bool result;
1061  OP_Utils::evalOpParm(result, thissop, "dotrans", cookparms.getCookTime(), 0);
1062  return result;
1063  }
1064  bool getLookfar() const { return myLookfar; }
1065  void setLookfar(bool val) { myLookfar = val; }
1066  bool opLookfar(const SOP_NodeVerb::CookParms &cookparms) const
1067  {
1068  SOP_Node *thissop = cookparms.getNode();
1069  if (!thissop) return getLookfar();
1070  bool result;
1071  OP_Utils::evalOpParm(result, thissop, "lookfar", cookparms.getCookTime(), 0);
1072  return result;
1073  }
1074  bool getPutnml() const { return myPutnml; }
1075  void setPutnml(bool val) { myPutnml = val; }
1076  bool opPutnml(const SOP_NodeVerb::CookParms &cookparms) const
1077  {
1078  SOP_Node *thissop = cookparms.getNode();
1079  if (!thissop) return getPutnml();
1080  bool result;
1081  OP_Utils::evalOpParm(result, thissop, "putnml", cookparms.getCookTime(), 0);
1082  return result;
1083  }
1084  bool getPutdist() const { return myPutdist; }
1085  void setPutdist(bool val) { myPutdist = val; }
1086  bool opPutdist(const SOP_NodeVerb::CookParms &cookparms) const
1087  {
1088  SOP_Node *thissop = cookparms.getNode();
1089  if (!thissop) return getPutdist();
1090  bool result;
1091  OP_Utils::evalOpParm(result, thissop, "putdist", cookparms.getCookTime(), 0);
1092  return result;
1093  }
1094  bool getReverserays() const { return myReverserays; }
1095  void setReverserays(bool val) { myReverserays = val; }
1096  bool opReverserays(const SOP_NodeVerb::CookParms &cookparms) const
1097  {
1098  SOP_Node *thissop = cookparms.getNode();
1099  if (!thissop) return getReverserays();
1100  bool result;
1101  OP_Utils::evalOpParm(result, thissop, "reverserays", cookparms.getCookTime(), 0);
1102  return result;
1103  }
1104  fpreal64 getRtolerance() const { return myRtolerance; }
1105  void setRtolerance(fpreal64 val) { myRtolerance = val; }
1107  {
1108  SOP_Node *thissop = cookparms.getNode();
1109  if (!thissop) return getRtolerance();
1110  fpreal64 result;
1111  OP_Utils::evalOpParm(result, thissop, "rtolerance", cookparms.getCookTime(), 0);
1112  return result;
1113  }
1114  fpreal64 getScale() const { return myScale; }
1115  void setScale(fpreal64 val) { myScale = val; }
1116  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
1117  {
1118  SOP_Node *thissop = cookparms.getNode();
1119  if (!thissop) return getScale();
1120  fpreal64 result;
1121  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
1122  return result;
1123  }
1124  fpreal64 getLift() const { return myLift; }
1125  void setLift(fpreal64 val) { myLift = val; }
1126  fpreal64 opLift(const SOP_NodeVerb::CookParms &cookparms) const
1127  {
1128  SOP_Node *thissop = cookparms.getNode();
1129  if (!thissop) return getLift();
1130  fpreal64 result;
1131  OP_Utils::evalOpParm(result, thissop, "lift", cookparms.getCookTime(), 0);
1132  return result;
1133  }
1134  fpreal64 getBias() const { return myBias; }
1135  void setBias(fpreal64 val) { myBias = val; }
1136  fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
1137  {
1138  SOP_Node *thissop = cookparms.getNode();
1139  if (!thissop) return getBias();
1140  fpreal64 result;
1141  OP_Utils::evalOpParm(result, thissop, "bias", cookparms.getCookTime(), 0);
1142  return result;
1143  }
1144  bool getMaxraydistcheck() const { return myMaxraydistcheck; }
1145  void setMaxraydistcheck(bool val) { myMaxraydistcheck = val; }
1146  bool opMaxraydistcheck(const SOP_NodeVerb::CookParms &cookparms) const
1147  {
1148  SOP_Node *thissop = cookparms.getNode();
1149  if (!thissop) return getMaxraydistcheck();
1150  bool result;
1151  OP_Utils::evalOpParm(result, thissop, "maxraydistcheck", cookparms.getCookTime(), 0);
1152  return result;
1153  }
1154  fpreal64 getMaxraydist() const { return myMaxraydist; }
1155  void setMaxraydist(fpreal64 val) { myMaxraydist = val; }
1157  {
1158  SOP_Node *thissop = cookparms.getNode();
1159  if (!thissop) return getMaxraydist();
1160  fpreal64 result;
1161  OP_Utils::evalOpParm(result, thissop, "maxraydist", cookparms.getCookTime(), 0);
1162  return result;
1163  }
1164  int64 getSample() const { return mySample; }
1165  void setSample(int64 val) { mySample = val; }
1166  int64 opSample(const SOP_NodeVerb::CookParms &cookparms) const
1167  {
1168  SOP_Node *thissop = cookparms.getNode();
1169  if (!thissop) return getSample();
1170  int64 result;
1171  OP_Utils::evalOpParm(result, thissop, "sample", cookparms.getCookTime(), 0);
1172  return result;
1173  }
1174  fpreal64 getJitter() const { return myJitter; }
1175  void setJitter(fpreal64 val) { myJitter = val; }
1177  {
1178  SOP_Node *thissop = cookparms.getNode();
1179  if (!thissop) return getJitter();
1180  fpreal64 result;
1181  OP_Utils::evalOpParm(result, thissop, "jitter", cookparms.getCookTime(), 0);
1182  return result;
1183  }
1184  Combinetype getCombinetype() const { return Combinetype(myCombinetype); }
1185  void setCombinetype(Combinetype val) { myCombinetype = int64(val); }
1187  {
1188  SOP_Node *thissop = cookparms.getNode();
1189  if (!thissop) return getCombinetype();
1190  int64 result;
1191  OP_Utils::evalOpParm(result, thissop, "combinetype", cookparms.getCookTime(), 0);
1192  return Combinetype(result);
1193  }
1194  int64 getSeed() const { return mySeed; }
1195  void setSeed(int64 val) { mySeed = val; }
1196  int64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
1197  {
1198  SOP_Node *thissop = cookparms.getNode();
1199  if (!thissop) return getSeed();
1200  int64 result;
1201  OP_Utils::evalOpParm(result, thissop, "seed", cookparms.getCookTime(), 0);
1202  return result;
1203  }
1204  bool getNewgrp() const { return myNewgrp; }
1205  void setNewgrp(bool val) { myNewgrp = val; }
1206  bool opNewgrp(const SOP_NodeVerb::CookParms &cookparms) const
1207  {
1208  SOP_Node *thissop = cookparms.getNode();
1209  if (!thissop) return getNewgrp();
1210  bool result;
1211  OP_Utils::evalOpParm(result, thissop, "newgrp", cookparms.getCookTime(), 0);
1212  return result;
1213  }
1214  const UT_StringHolder & getHitgrp() const { return myHitgrp; }
1215  void setHitgrp(const UT_StringHolder & val) { myHitgrp = val; }
1217  {
1218  SOP_Node *thissop = cookparms.getNode();
1219  if (!thissop) return getHitgrp();
1221  OP_Utils::evalOpParm(result, thissop, "hitgrp", cookparms.getCookTime(), 0);
1222  return result;
1223  }
1224  bool getUseprimnumattrib() const { return myUseprimnumattrib; }
1225  void setUseprimnumattrib(bool val) { myUseprimnumattrib = val; }
1226  bool opUseprimnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
1227  {
1228  SOP_Node *thissop = cookparms.getNode();
1229  if (!thissop) return getUseprimnumattrib();
1230  bool result;
1231  OP_Utils::evalOpParm(result, thissop, "useprimnumattrib", cookparms.getCookTime(), 0);
1232  return result;
1233  }
1234  const UT_StringHolder & getPrimnumattrib() const { return myPrimnumattrib; }
1235  void setPrimnumattrib(const UT_StringHolder & val) { myPrimnumattrib = val; }
1237  {
1238  SOP_Node *thissop = cookparms.getNode();
1239  if (!thissop) return getPrimnumattrib();
1241  OP_Utils::evalOpParm(result, thissop, "primnumattrib", cookparms.getCookTime(), 0);
1242  return result;
1243  }
1244  bool getUseprimuvwattrib() const { return myUseprimuvwattrib; }
1245  void setUseprimuvwattrib(bool val) { myUseprimuvwattrib = val; }
1246  bool opUseprimuvwattrib(const SOP_NodeVerb::CookParms &cookparms) const
1247  {
1248  SOP_Node *thissop = cookparms.getNode();
1249  if (!thissop) return getUseprimuvwattrib();
1250  bool result;
1251  OP_Utils::evalOpParm(result, thissop, "useprimuvwattrib", cookparms.getCookTime(), 0);
1252  return result;
1253  }
1254  const UT_StringHolder & getPrimuvwattrib() const { return myPrimuvwattrib; }
1255  void setPrimuvwattrib(const UT_StringHolder & val) { myPrimuvwattrib = val; }
1257  {
1258  SOP_Node *thissop = cookparms.getNode();
1259  if (!thissop) return getPrimuvwattrib();
1261  OP_Utils::evalOpParm(result, thissop, "primuvwattrib", cookparms.getCookTime(), 0);
1262  return result;
1263  }
1264  bool getGetptattribs() const { return myGetptattribs; }
1265  void setGetptattribs(bool val) { myGetptattribs = val; }
1266  bool opGetptattribs(const SOP_NodeVerb::CookParms &cookparms) const
1267  {
1268  SOP_Node *thissop = cookparms.getNode();
1269  if (!thissop) return getGetptattribs();
1270  bool result;
1271  OP_Utils::evalOpParm(result, thissop, "getptattribs", cookparms.getCookTime(), 0);
1272  return result;
1273  }
1274  const UT_StringHolder & getPtattribnames() const { return myPtattribnames; }
1275  void setPtattribnames(const UT_StringHolder & val) { myPtattribnames = val; }
1277  {
1278  SOP_Node *thissop = cookparms.getNode();
1279  if (!thissop) return getPtattribnames();
1281  OP_Utils::evalOpParm(result, thissop, "ptattribnames", cookparms.getCookTime(), 0);
1282  return result;
1283  }
1284  const UT_StringHolder & getVertexattribnames() const { return myVertexattribnames; }
1285  void setVertexattribnames(const UT_StringHolder & val) { myVertexattribnames = val; }
1287  {
1288  SOP_Node *thissop = cookparms.getNode();
1289  if (!thissop) return getVertexattribnames();
1291  OP_Utils::evalOpParm(result, thissop, "vertexattribnames", cookparms.getCookTime(), 0);
1292  return result;
1293  }
1294  const UT_StringHolder & getPrimitiveattribnames() const { return myPrimitiveattribnames; }
1295  void setPrimitiveattribnames(const UT_StringHolder & val) { myPrimitiveattribnames = val; }
1297  {
1298  SOP_Node *thissop = cookparms.getNode();
1299  if (!thissop) return getPrimitiveattribnames();
1301  OP_Utils::evalOpParm(result, thissop, "primitiveattribnames", cookparms.getCookTime(), 0);
1302  return result;
1303  }
1304  const UT_StringHolder & getDetailattribnames() const { return myDetailattribnames; }
1305  void setDetailattribnames(const UT_StringHolder & val) { myDetailattribnames = val; }
1307  {
1308  SOP_Node *thissop = cookparms.getNode();
1309  if (!thissop) return getDetailattribnames();
1311  OP_Utils::evalOpParm(result, thissop, "detailattribnames", cookparms.getCookTime(), 0);
1312  return result;
1313  }
1314 
1315 private:
1316  UT_StringHolder myGroup;
1317  int64 myEntity;
1318  UT_StringHolder myCollision;
1319  int64 myMethod;
1320  int64 myDirMethod;
1321  UT_Vector3D myDir;
1322  UT_StringHolder myDirAttrib;
1323  bool myShowguide;
1324  bool myDotrans;
1325  bool myLookfar;
1326  bool myPutnml;
1327  bool myPutdist;
1328  bool myReverserays;
1329  fpreal64 myRtolerance;
1330  fpreal64 myScale;
1331  fpreal64 myLift;
1332  fpreal64 myBias;
1333  bool myMaxraydistcheck;
1334  fpreal64 myMaxraydist;
1335  int64 mySample;
1336  fpreal64 myJitter;
1337  int64 myCombinetype;
1338  int64 mySeed;
1339  bool myNewgrp;
1340  UT_StringHolder myHitgrp;
1341  bool myUseprimnumattrib;
1342  UT_StringHolder myPrimnumattrib;
1343  bool myUseprimuvwattrib;
1344  UT_StringHolder myPrimuvwattrib;
1345  bool myGetptattribs;
1346  UT_StringHolder myPtattribnames;
1347  UT_StringHolder myVertexattribnames;
1348  UT_StringHolder myPrimitiveattribnames;
1349  UT_StringHolder myDetailattribnames;
1350 
1351 };
static void saveData(std::ostream &os, int64 v)
fpreal64 getBias() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setPrimitiveattribnames(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool getUseprimnumattrib() const
void setLift(fpreal64 val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setHitgrp(const UT_StringHolder &val)
UT_StringHolder opCollision(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const UT_StringHolder & getDetailattribnames() const
fpreal64 getJitter() const
bool opLookfar(const SOP_NodeVerb::CookParms &cookparms) const
void setVertexattribnames(const UT_StringHolder &val)
UT_StringHolder opPrimuvwattrib(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, int64 &v)
void setCombinetype(Combinetype val)
DirMethod opDirMethod(const SOP_NodeVerb::CookParms &cookparms) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setBias(fpreal64 val)
void setPutdist(bool val)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opShowguide(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
DirMethod getDirMethod() const
void setMaxraydist(fpreal64 val)
fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
An output stream object that owns its own string buffer storage.
**But if you need a result
Definition: thread.h:613
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setDotrans(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool getShowguide() const
UT_StringHolder opPtattribnames(const SOP_NodeVerb::CookParms &cookparms) const
bool getReverserays() const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_StringHolder & getDirAttrib() const
fpreal64 getScale() const
bool operator==(const SOP_RayParms &src) const
void setDirMethod(DirMethod val)
void setGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
Combinetype getCombinetype() const
const UT_StringHolder & getHitgrp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
double fpreal64
Definition: SYS_Types.h:201
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void setSample(int64 val)
bool getDotrans() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setLookfar(bool val)
UT_StringHolder opPrimnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opMaxraydist(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
Entity getEntity() const
void setNewgrp(bool val)
fpreal64 getLift() const
Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
const UT_StringHolder & getVertexattribnames() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint length() const
void setCollision(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE const char * buffer() const
void setMaxraydistcheck(bool val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setMethod(Method val)
void setRtolerance(fpreal64 val)
Combinetype opCombinetype(const SOP_NodeVerb::CookParms &cookparms) const
bool opDotrans(const SOP_NodeVerb::CookParms &cookparms) const
int64 getSeed() const
fpreal64 opRtolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Vector3D v)
bool opNewgrp(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseprimuvwattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setUseprimnumattrib(bool val)
void setPutnml(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opPrimitiveattribnames(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getDir() const
const UT_StringHolder & getPrimitiveattribnames() const
Method getMethod() const
long long int64
Definition: SYS_Types.h:116
void loadFromOpSubclass(const LoadParms &loadparms) override
void setDetailattribnames(const UT_StringHolder &val)
void setUseprimuvwattrib(bool val)
int64 getSample() const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector3T< fpreal64 > UT_Vector3D
void setEntity(Entity val)
bool getLookfar() const
SYS_FORCE_INLINE UT_StringHolder getToken(Entity enum_value)
Definition: SOP_Ray.proto.h:32
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getUseprimuvwattrib() const
void setGetptattribs(bool val)
void setShowguide(bool val)
bool opGetptattribs(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void setReverserays(bool val)
static void saveData(std::ostream &os, UT_Vector4D v)
GT_API const UT_StringHolder version
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool opMaxraydistcheck(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
void setDirAttrib(const UT_StringHolder &val)
void setJitter(fpreal64 val)
void setScale(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 opJitter(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getMaxraydist() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setPrimuvwattrib(const UT_StringHolder &val)
bool isParmColorRamp(exint idx) const override
void setSeed(int64 val)
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setPrimnumattrib(const UT_StringHolder &val)
fpreal64 fpreal
Definition: SYS_Types.h:277
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 opLift(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
bool getNewgrp() const
exint getNestNumParms(TempIndex idx) const override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void setDir(UT_Vector3D val)
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static int version()
GLuint GLfloat * val
Definition: glcorearb.h:1608
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:633
UT_StringHolder opDetailattribnames(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opVertexattribnames(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opHitgrp(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, bool &v)
const UT_StringHolder & getPtattribnames() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
void setPtattribnames(const UT_StringHolder &val)
bool opReverserays(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool getMaxraydistcheck() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getGroup() const
fpreal64 getRtolerance() const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
UT_StringHolder opDirAttrib(const SOP_NodeVerb::CookParms &cookparms) const
Definition: core.h:1131
bool getGetptattribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void copyFrom(const OP_NodeParms *src) override
GLboolean r
Definition: glcorearb.h:1222
bool getPutnml() const
const UT_StringHolder & getCollision() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
static void saveData(std::ostream &os, UT_Vector2D v)
bool getPutdist() const
type
Definition: core.h:1059
static void saveData(std::ostream &os, fpreal64 v)
const UT_StringHolder & getPrimuvwattrib() const
bool operator!=(const SOP_RayParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool opUseprimnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, fpreal64 &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool opPutnml(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
bool opPutdist(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
const UT_StringHolder & getPrimnumattrib() const
int64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
int64 opSample(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663