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