HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_CarveParms.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 
23 {
24 public:
25  static int version() { return 1; }
26 
28  {
29  myGroup = ""_sh;
30  myFirstU = true;
31  myDomainU1 = 0.25;
32  mySecondU = false;
33  myDomainU2 = 0.75;
34  myFirstV = false;
35  myDomainV1 = 0.25;
36  mySecondV = false;
37  myDomainV2 = 0.75;
38  myOnlyBreakpoints = 0;
39  myDivsU = 2;
40  myDivsV = 2;
41  myAllUBreakpoints = false;
42  myAllVBreakpoints = false;
43  myFunction = 0;
44  myKeepIn = true;
45  myKeepOut = false;
46  myExtractOp = 0;
47  myKeepOriginal = false;
48 
49  }
50 
51  explicit SOP_CarveParms(const SOP_CarveParms &) = default;
52 
53  virtual ~SOP_CarveParms() {}
54 
55  bool operator==(const SOP_CarveParms &src) const
56  {
57  if (myGroup != src.myGroup) return false;
58  if (myFirstU != src.myFirstU) return false;
59  if (myDomainU1 != src.myDomainU1) return false;
60  if (mySecondU != src.mySecondU) return false;
61  if (myDomainU2 != src.myDomainU2) return false;
62  if (myFirstV != src.myFirstV) return false;
63  if (myDomainV1 != src.myDomainV1) return false;
64  if (mySecondV != src.mySecondV) return false;
65  if (myDomainV2 != src.myDomainV2) return false;
66  if (myOnlyBreakpoints != src.myOnlyBreakpoints) return false;
67  if (myDivsU != src.myDivsU) return false;
68  if (myDivsV != src.myDivsV) return false;
69  if (myAllUBreakpoints != src.myAllUBreakpoints) return false;
70  if (myAllVBreakpoints != src.myAllVBreakpoints) return false;
71  if (myFunction != src.myFunction) return false;
72  if (myKeepIn != src.myKeepIn) return false;
73  if (myKeepOut != src.myKeepOut) return false;
74  if (myExtractOp != src.myExtractOp) return false;
75  if (myKeepOriginal != src.myKeepOriginal) return false;
76 
77  return true;
78  }
79 
80 
81 
82  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
83  {
84  if (true)
85  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
86  else myGroup = ""_sh;
87  if (true)
88  OP_Utils::evalOpParm(myFirstU, node, "firstu", time, 0);
89  else myFirstU = true;
90  if (true)
91  OP_Utils::evalOpParm(myDomainU1, node, "domainu1", time, 0);
92  else myDomainU1 = 0.25;
93  if (true)
94  OP_Utils::evalOpParm(mySecondU, node, "secondu", time, 0);
95  else mySecondU = false;
96  if (true)
97  OP_Utils::evalOpParm(myDomainU2, node, "domainu2", time, 0);
98  else myDomainU2 = 0.75;
99  if (true)
100  OP_Utils::evalOpParm(myFirstV, node, "firstv", time, 0);
101  else myFirstV = false;
102  if (true)
103  OP_Utils::evalOpParm(myDomainV1, node, "domainv1", time, 0);
104  else myDomainV1 = 0.25;
105  if (true)
106  OP_Utils::evalOpParm(mySecondV, node, "secondv", time, 0);
107  else mySecondV = false;
108  if (true)
109  OP_Utils::evalOpParm(myDomainV2, node, "domainv2", time, 0);
110  else myDomainV2 = 0.75;
111  if (true)
112  OP_Utils::evalOpParm(myOnlyBreakpoints, node, "onlybreakpoints", time, 0);
113  else myOnlyBreakpoints = 0;
114  if (true && ( (getOnlyBreakpoints()==0) ) )
115  OP_Utils::evalOpParm(myDivsU, node, "divsu", time, 0);
116  else myDivsU = 2;
117  if (true && ( (getOnlyBreakpoints()==0) ) )
118  OP_Utils::evalOpParm(myDivsV, node, "divsv", time, 0);
119  else myDivsV = 2;
120  if (true && ( (getOnlyBreakpoints()==1) ) )
121  OP_Utils::evalOpParm(myAllUBreakpoints, node, "allubreakpoints", time, 0);
122  else myAllUBreakpoints = false;
123  if (true && ( (getOnlyBreakpoints()==1) ) )
124  OP_Utils::evalOpParm(myAllVBreakpoints, node, "allvbreakpoints", time, 0);
125  else myAllVBreakpoints = false;
126  if (true)
127  OP_Utils::evalOpParm(myFunction, node, "stdswitcher", time, 0);
128  else myFunction = 0;
129  if (true && ( (getFunction()==0) ) )
130  OP_Utils::evalOpParm(myKeepIn, node, "keepin", time, 0);
131  else myKeepIn = true;
132  if (true && ( (getFunction()==0) ) )
133  OP_Utils::evalOpParm(myKeepOut, node, "keepout", time, 0);
134  else myKeepOut = false;
135  if (true && ( (getFunction()==1) ) )
136  OP_Utils::evalOpParm(myExtractOp, node, "extractop", time, 0);
137  else myExtractOp = 0;
138  if (true && ( (getFunction()==1) ) )
139  OP_Utils::evalOpParm(myKeepOriginal, node, "keepOriginal", time, 0);
140  else myKeepOriginal = false;
141 
142  }
143 
144 
145  virtual void loadFromOpSubclass(const LoadParms &loadparms)
146  {
147  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
148  }
149 
150 
151  virtual void copyFrom(const SOP_NodeParms *src)
152  {
153  *this = *((const SOP_CarveParms *)src);
154  }
155 
156  template <typename T>
157  void
158  doGetParmValue(exint idx, T &value) const
159  {
160  switch (idx)
161  {
162  case 0:
163  coerceValue(value, myGroup);
164  break;
165  case 1:
166  coerceValue(value, myFirstU);
167  break;
168  case 2:
169  coerceValue(value, myDomainU1);
170  break;
171  case 3:
172  coerceValue(value, mySecondU);
173  break;
174  case 4:
175  coerceValue(value, myDomainU2);
176  break;
177  case 5:
178  coerceValue(value, myFirstV);
179  break;
180  case 6:
181  coerceValue(value, myDomainV1);
182  break;
183  case 7:
184  coerceValue(value, mySecondV);
185  break;
186  case 8:
187  coerceValue(value, myDomainV2);
188  break;
189  case 9:
190  coerceValue(value, myOnlyBreakpoints);
191  break;
192  case 10:
193  coerceValue(value, myDivsU);
194  break;
195  case 11:
196  coerceValue(value, myDivsV);
197  break;
198  case 12:
199  coerceValue(value, myAllUBreakpoints);
200  break;
201  case 13:
202  coerceValue(value, myAllVBreakpoints);
203  break;
204  case 14:
205  coerceValue(value, myFunction);
206  break;
207  case 15:
208  coerceValue(value, myKeepIn);
209  break;
210  case 16:
211  coerceValue(value, myKeepOut);
212  break;
213  case 17:
214  coerceValue(value, myExtractOp);
215  break;
216  case 18:
217  coerceValue(value, myKeepOriginal);
218  break;
219 
220  }
221  }
222 
223  void getParmValue(exint idx, exint &value) const
224  { doGetParmValue(idx, value); }
225  void getParmValue(exint idx, fpreal &value) const
226  { doGetParmValue(idx, value); }
228  { doGetParmValue(idx, value); }
230  { doGetParmValue(idx, value); }
232  { doGetParmValue(idx, value); }
234  { doGetParmValue(idx, value); }
236  { doGetParmValue(idx, value); }
238  { doGetParmValue(idx, value); }
240  { doGetParmValue(idx, value); }
242  { doGetParmValue(idx, value); }
244  { doGetParmValue(idx, value); }
245 
246  template <typename T>
247  void
248  doSetParmValue(exint idx, const T &value)
249  {
250  switch (idx)
251  {
252  case 0:
253  coerceValue(myGroup, value);
254  break;
255  case 1:
256  coerceValue(myFirstU, value);
257  break;
258  case 2:
259  coerceValue(myDomainU1, value);
260  break;
261  case 3:
262  coerceValue(mySecondU, value);
263  break;
264  case 4:
265  coerceValue(myDomainU2, value);
266  break;
267  case 5:
268  coerceValue(myFirstV, value);
269  break;
270  case 6:
271  coerceValue(myDomainV1, value);
272  break;
273  case 7:
274  coerceValue(mySecondV, value);
275  break;
276  case 8:
277  coerceValue(myDomainV2, value);
278  break;
279  case 9:
280  coerceValue(myOnlyBreakpoints, value);
281  break;
282  case 10:
283  coerceValue(myDivsU, value);
284  break;
285  case 11:
286  coerceValue(myDivsV, value);
287  break;
288  case 12:
289  coerceValue(myAllUBreakpoints, value);
290  break;
291  case 13:
292  coerceValue(myAllVBreakpoints, value);
293  break;
294  case 14:
295  coerceValue(myFunction, value);
296  break;
297  case 15:
298  coerceValue(myKeepIn, value);
299  break;
300  case 16:
301  coerceValue(myKeepOut, value);
302  break;
303  case 17:
304  coerceValue(myExtractOp, value);
305  break;
306  case 18:
307  coerceValue(myKeepOriginal, value);
308  break;
309 
310  }
311  }
312 
313  void setParmValue(exint idx, const exint &value)
314  { doSetParmValue(idx, value); }
315  void setParmValue(exint idx, const fpreal &value)
316  { doSetParmValue(idx, value); }
317  void setParmValue(exint idx, const UT_Vector2D &value)
318  { doSetParmValue(idx, value); }
319  void setParmValue(exint idx, const UT_Vector3D &value)
320  { doSetParmValue(idx, value); }
321  void setParmValue(exint idx, const UT_Vector4D &value)
322  { doSetParmValue(idx, value); }
323  void setParmValue(exint idx, const UT_Matrix2D &value)
324  { doSetParmValue(idx, value); }
325  void setParmValue(exint idx, const UT_Matrix3D &value)
326  { doSetParmValue(idx, value); }
327  void setParmValue(exint idx, const UT_Matrix4D &value)
328  { doSetParmValue(idx, value); }
330  { doSetParmValue(idx, value); }
332  { doSetParmValue(idx, value); }
334  { doSetParmValue(idx, value); }
335 
336  virtual exint getNumParms() const
337  {
338  return 19;
339  }
340 
341  virtual const char *getParmName(exint fieldnum) const
342  {
343  switch (fieldnum)
344  {
345  case 0:
346  return "group";
347  case 1:
348  return "firstu";
349  case 2:
350  return "domainu1";
351  case 3:
352  return "secondu";
353  case 4:
354  return "domainu2";
355  case 5:
356  return "firstv";
357  case 6:
358  return "domainv1";
359  case 7:
360  return "secondv";
361  case 8:
362  return "domainv2";
363  case 9:
364  return "onlybreakpoints";
365  case 10:
366  return "divsu";
367  case 11:
368  return "divsv";
369  case 12:
370  return "allubreakpoints";
371  case 13:
372  return "allvbreakpoints";
373  case 14:
374  return "stdswitcher";
375  case 15:
376  return "keepin";
377  case 16:
378  return "keepout";
379  case 17:
380  return "extractop";
381  case 18:
382  return "keepOriginal";
383 
384  }
385  return 0;
386  }
387 
388  virtual ParmType getParmType(exint fieldnum) const
389  {
390  switch (fieldnum)
391  {
392  case 0:
393  return PARM_STRING;
394  case 1:
395  return PARM_INTEGER;
396  case 2:
397  return PARM_FLOAT;
398  case 3:
399  return PARM_INTEGER;
400  case 4:
401  return PARM_FLOAT;
402  case 5:
403  return PARM_INTEGER;
404  case 6:
405  return PARM_FLOAT;
406  case 7:
407  return PARM_INTEGER;
408  case 8:
409  return PARM_FLOAT;
410  case 9:
411  return PARM_INTEGER;
412  case 10:
413  return PARM_INTEGER;
414  case 11:
415  return PARM_INTEGER;
416  case 12:
417  return PARM_INTEGER;
418  case 13:
419  return PARM_INTEGER;
420  case 14:
421  return PARM_INTEGER;
422  case 15:
423  return PARM_INTEGER;
424  case 16:
425  return PARM_INTEGER;
426  case 17:
427  return PARM_INTEGER;
428  case 18:
429  return PARM_INTEGER;
430 
431  }
432  return PARM_UNSUPPORTED;
433  }
434 
435  // Boiler plate to load individual types.
436  static void loadData(UT_IStream &is, int64 &v)
437  { is.bread(&v, 1); }
438  static void loadData(UT_IStream &is, bool &v)
439  { int64 iv; is.bread(&iv, 1); v = iv; }
440  static void loadData(UT_IStream &is, fpreal64 &v)
441  { is.bread<fpreal64>(&v, 1); }
442  static void loadData(UT_IStream &is, UT_Vector2D &v)
443  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
444  static void loadData(UT_IStream &is, UT_Vector3D &v)
445  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
446  is.bread<fpreal64>(&v.z(), 1); }
447  static void loadData(UT_IStream &is, UT_Vector4D &v)
448  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
449  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
450  static void loadData(UT_IStream &is, UT_Matrix2D &v)
451  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
452  static void loadData(UT_IStream &is, UT_Matrix3D &v)
453  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
454  static void loadData(UT_IStream &is, UT_Matrix4D &v)
455  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
456  static void loadData(UT_IStream &is, UT_Vector2I &v)
457  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector3I &v)
459  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
460  is.bread<int64>(&v.z(), 1); }
461  static void loadData(UT_IStream &is, UT_Vector4I &v)
462  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
463  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
465  { is.bread(v); }
467  { UT_StringHolder rampdata;
468  loadData(is, rampdata);
469  if (rampdata.isstring())
470  {
471  v.reset(new UT_Ramp());
472  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
473  v->load(istr);
474  }
475  else v.reset();
476  }
479  loadData(is, data);
480  if (data.isstring())
481  {
482  // Find the data type.
483  char *colon = UT_StringWrap(data).findChar(':');
484  if (colon)
485  {
486  int typelen = colon - data.buffer();
488  type.strncpy(data.buffer(), typelen);
489  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
490 
491  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
492  }
493  }
494  else v.reset();
495  }
496 
497  static void saveData(std::ostream &os, int64 v)
498  { UTwrite(os, &v); }
499  static void saveData(std::ostream &os, bool v)
500  { int64 iv = v; UTwrite(os, &iv); }
501  static void saveData(std::ostream &os, fpreal64 v)
502  { UTwrite<fpreal64>(os, &v); }
503  static void saveData(std::ostream &os, UT_Vector2D v)
504  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
505  static void saveData(std::ostream &os, UT_Vector3D v)
506  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
507  UTwrite<fpreal64>(os, &v.z()); }
508  static void saveData(std::ostream &os, UT_Vector4D v)
509  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
510  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
511  static void saveData(std::ostream &os, UT_Matrix2D v)
513  static void saveData(std::ostream &os, UT_Matrix3D v)
515  static void saveData(std::ostream &os, UT_Matrix4D v)
517  static void saveData(std::ostream &os, UT_StringHolder s)
518  { UT_StringWrap(s).saveBinary(os); }
519  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
520  { UT_StringHolder result;
521  UT_OStringStream ostr;
522  if (s) s->save(ostr);
523  result = ostr.str();
524  saveData(os, result);
525  }
526  static void saveData(std::ostream &os, PRM_DataItemHandle s)
527  { UT_StringHolder result;
528  UT_OStringStream ostr;
529  if (s)
530  {
531  ostr << s->getDataTypeToken();
532  ostr << ":";
533  s->saveBinary(ostr);
534  }
535  result = ostr.str();
536  saveData(os, result);
537  }
538 
539 
540  void save(std::ostream &os) const
541  {
542  int32 v = version();
543  UTwrite(os, &v);
544  saveData(os, myGroup);
545  saveData(os, myFirstU);
546  saveData(os, myDomainU1);
547  saveData(os, mySecondU);
548  saveData(os, myDomainU2);
549  saveData(os, myFirstV);
550  saveData(os, myDomainV1);
551  saveData(os, mySecondV);
552  saveData(os, myDomainV2);
553  saveData(os, myOnlyBreakpoints);
554  saveData(os, myDivsU);
555  saveData(os, myDivsV);
556  saveData(os, myAllUBreakpoints);
557  saveData(os, myAllVBreakpoints);
558  saveData(os, myFunction);
559  saveData(os, myKeepIn);
560  saveData(os, myKeepOut);
561  saveData(os, myExtractOp);
562  saveData(os, myKeepOriginal);
563 
564  }
565 
566  bool load(UT_IStream &is)
567  {
568  int32 v;
569  is.bread(&v, 1);
570  if (version() != v)
571  {
572  // Fail incompatible versions
573  return false;
574  }
575  loadData(is, myGroup);
576  loadData(is, myFirstU);
577  loadData(is, myDomainU1);
578  loadData(is, mySecondU);
579  loadData(is, myDomainU2);
580  loadData(is, myFirstV);
581  loadData(is, myDomainV1);
582  loadData(is, mySecondV);
583  loadData(is, myDomainV2);
584  loadData(is, myOnlyBreakpoints);
585  loadData(is, myDivsU);
586  loadData(is, myDivsV);
587  loadData(is, myAllUBreakpoints);
588  loadData(is, myAllVBreakpoints);
589  loadData(is, myFunction);
590  loadData(is, myKeepIn);
591  loadData(is, myKeepOut);
592  loadData(is, myExtractOp);
593  loadData(is, myKeepOriginal);
594 
595  return true;
596  }
597 
598  const UT_StringHolder & getGroup() const { return myGroup; }
599  void setGroup(const UT_StringHolder & val) { myGroup = val; }
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getGroup();
604  UT_StringHolder result;
605  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
606  return result;
607  }
608  bool getFirstU() const { return myFirstU; }
609  void setFirstU(bool val) { myFirstU = val; }
610  bool opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getFirstU();
614  bool result;
615  OP_Utils::evalOpParm(result, thissop, "firstu", cookparms.getCookTime(), 0);
616  return result;
617  }
618  fpreal64 getDomainU1() const { return myDomainU1; }
619  void setDomainU1(fpreal64 val) { myDomainU1 = val; }
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getDomainU1();
624  fpreal64 result;
625  OP_Utils::evalOpParm(result, thissop, "domainu1", cookparms.getCookTime(), 0);
626  return result;
627  }
628  bool getSecondU() const { return mySecondU; }
629  void setSecondU(bool val) { mySecondU = val; }
630  bool opSecondU(const SOP_NodeVerb::CookParms &cookparms) const
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getSecondU();
634  bool result;
635  OP_Utils::evalOpParm(result, thissop, "secondu", cookparms.getCookTime(), 0);
636  return result;
637  }
638  fpreal64 getDomainU2() const { return myDomainU2; }
639  void setDomainU2(fpreal64 val) { myDomainU2 = val; }
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getDomainU2();
644  fpreal64 result;
645  OP_Utils::evalOpParm(result, thissop, "domainu2", cookparms.getCookTime(), 0);
646  return result;
647  }
648  bool getFirstV() const { return myFirstV; }
649  void setFirstV(bool val) { myFirstV = val; }
650  bool opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getFirstV();
654  bool result;
655  OP_Utils::evalOpParm(result, thissop, "firstv", cookparms.getCookTime(), 0);
656  return result;
657  }
658  fpreal64 getDomainV1() const { return myDomainV1; }
659  void setDomainV1(fpreal64 val) { myDomainV1 = val; }
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getDomainV1();
664  fpreal64 result;
665  OP_Utils::evalOpParm(result, thissop, "domainv1", cookparms.getCookTime(), 0);
666  return result;
667  }
668  bool getSecondV() const { return mySecondV; }
669  void setSecondV(bool val) { mySecondV = val; }
670  bool opSecondV(const SOP_NodeVerb::CookParms &cookparms) const
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getSecondV();
674  bool result;
675  OP_Utils::evalOpParm(result, thissop, "secondv", cookparms.getCookTime(), 0);
676  return result;
677  }
678  fpreal64 getDomainV2() const { return myDomainV2; }
679  void setDomainV2(fpreal64 val) { myDomainV2 = val; }
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getDomainV2();
684  fpreal64 result;
685  OP_Utils::evalOpParm(result, thissop, "domainv2", cookparms.getCookTime(), 0);
686  return result;
687  }
688  int64 getOnlyBreakpoints() const { return myOnlyBreakpoints; }
689  void setOnlyBreakpoints(int64 val) { myOnlyBreakpoints = val; }
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getOnlyBreakpoints();
694  int64 result;
695  OP_Utils::evalOpParm(result, thissop, "onlybreakpoints", cookparms.getCookTime(), 0);
696  return result;
697  }
698  int64 getDivsU() const { return myDivsU; }
699  void setDivsU(int64 val) { myDivsU = val; }
700  int64 opDivsU(const SOP_NodeVerb::CookParms &cookparms) const
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getDivsU();
704  int64 result;
705  OP_Utils::evalOpParm(result, thissop, "divsu", cookparms.getCookTime(), 0);
706  return result;
707  }
708  int64 getDivsV() const { return myDivsV; }
709  void setDivsV(int64 val) { myDivsV = val; }
710  int64 opDivsV(const SOP_NodeVerb::CookParms &cookparms) const
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getDivsV();
714  int64 result;
715  OP_Utils::evalOpParm(result, thissop, "divsv", cookparms.getCookTime(), 0);
716  return result;
717  }
718  bool getAllUBreakpoints() const { return myAllUBreakpoints; }
719  void setAllUBreakpoints(bool val) { myAllUBreakpoints = val; }
720  bool opAllUBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
721  {
722  SOP_Node *thissop = cookparms.getNode();
723  if (!thissop) return getAllUBreakpoints();
724  bool result;
725  OP_Utils::evalOpParm(result, thissop, "allubreakpoints", cookparms.getCookTime(), 0);
726  return result;
727  }
728  bool getAllVBreakpoints() const { return myAllVBreakpoints; }
729  void setAllVBreakpoints(bool val) { myAllVBreakpoints = val; }
730  bool opAllVBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
731  {
732  SOP_Node *thissop = cookparms.getNode();
733  if (!thissop) return getAllVBreakpoints();
734  bool result;
735  OP_Utils::evalOpParm(result, thissop, "allvbreakpoints", cookparms.getCookTime(), 0);
736  return result;
737  }
738  int64 getFunction() const { return myFunction; }
739  void setFunction(int64 val) { myFunction = val; }
740  int64 opFunction(const SOP_NodeVerb::CookParms &cookparms) const
741  {
742  SOP_Node *thissop = cookparms.getNode();
743  if (!thissop) return getFunction();
744  int64 result;
745  OP_Utils::evalOpParm(result, thissop, "stdswitcher", cookparms.getCookTime(), 0);
746  return result;
747  }
748  bool getKeepIn() const { return myKeepIn; }
749  void setKeepIn(bool val) { myKeepIn = val; }
750  bool opKeepIn(const SOP_NodeVerb::CookParms &cookparms) const
751  {
752  SOP_Node *thissop = cookparms.getNode();
753  if (!thissop) return getKeepIn();
754  bool result;
755  OP_Utils::evalOpParm(result, thissop, "keepin", cookparms.getCookTime(), 0);
756  return result;
757  }
758  bool getKeepOut() const { return myKeepOut; }
759  void setKeepOut(bool val) { myKeepOut = val; }
760  bool opKeepOut(const SOP_NodeVerb::CookParms &cookparms) const
761  {
762  SOP_Node *thissop = cookparms.getNode();
763  if (!thissop) return getKeepOut();
764  bool result;
765  OP_Utils::evalOpParm(result, thissop, "keepout", cookparms.getCookTime(), 0);
766  return result;
767  }
768  int64 getExtractOp() const { return myExtractOp; }
769  void setExtractOp(int64 val) { myExtractOp = val; }
770  int64 opExtractOp(const SOP_NodeVerb::CookParms &cookparms) const
771  {
772  SOP_Node *thissop = cookparms.getNode();
773  if (!thissop) return getExtractOp();
774  int64 result;
775  OP_Utils::evalOpParm(result, thissop, "extractop", cookparms.getCookTime(), 0);
776  return result;
777  }
778  bool getKeepOriginal() const { return myKeepOriginal; }
779  void setKeepOriginal(bool val) { myKeepOriginal = val; }
780  bool opKeepOriginal(const SOP_NodeVerb::CookParms &cookparms) const
781  {
782  SOP_Node *thissop = cookparms.getNode();
783  if (!thissop) return getKeepOriginal();
784  bool result;
785  OP_Utils::evalOpParm(result, thissop, "keepOriginal", cookparms.getCookTime(), 0);
786  return result;
787  }
788 
789 private:
790  UT_StringHolder myGroup;
791  bool myFirstU;
792  fpreal64 myDomainU1;
793  bool mySecondU;
794  fpreal64 myDomainU2;
795  bool myFirstV;
796  fpreal64 myDomainV1;
797  bool mySecondV;
798  fpreal64 myDomainV2;
799  int64 myOnlyBreakpoints;
800  int64 myDivsU;
801  int64 myDivsV;
802  bool myAllUBreakpoints;
803  bool myAllVBreakpoints;
804  int64 myFunction;
805  bool myKeepIn;
806  bool myKeepOut;
807  int64 myExtractOp;
808  bool myKeepOriginal;
809 
810 };
fpreal64 getDomainU1() const
void setFirstV(bool val)
bool opKeepOriginal(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix3D &value) const
int64 opDivsV(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void setFunction(int64 val)
virtual ParmType getParmType(exint fieldnum) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
void doGetParmValue(exint idx, T &value) const
T & z(void)
Definition: UT_Vector4.h:372
bool operator==(const SOP_CarveParms &src) const
void setDivsU(int64 val)
bool getSecondU() const
exint bread(int32 *buffer, exint asize=1)
int64 getExtractOp() const
fpreal getTime() const
Definition: OP_Context.h:34
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opKeepOut(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
int64 opFunction(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Vector2D v)
T & x(void)
Definition: UT_Vector2.h:284
void setExtractOp(int64 val)
void getParmValue(exint idx, UT_Vector3D &value) const
void setKeepOriginal(bool val)
void setParmValue(exint idx, const UT_Matrix4D &value)
static int version()
An output stream object that owns its own string buffer storage.
int64 opExtractOp(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector4D &value)
void getParmValue(exint idx, UT_Vector2D &value) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
fpreal64 getDomainV1() const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
void getParmValue(exint idx, UT_Matrix4D &value) const
bool getFirstU() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
int64 getDivsU() const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, bool &v)
void setParmValue(exint idx, const exint &value)
bool opSecondV(const SOP_NodeVerb::CookParms &cookparms) const
bool getSecondV() const
void doSetParmValue(exint idx, const T &value)
bool load(UT_IStream &is)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
void setDomainU1(fpreal64 val)
long long int64
Definition: SYS_Types.h:106
void setGroup(const UT_StringHolder &val)
void setKeepIn(bool val)
void setOnlyBreakpoints(int64 val)
int64 getDivsV() const
bool getKeepOriginal() const
bool opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)
virtual const char * getParmName(exint fieldnum) const
void setDivsV(int64 val)
virtual exint getNumParms() const
static void saveData(std::ostream &os, UT_Matrix3D v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
fpreal64 getDomainU2() const
SYS_FORCE_INLINE const char * buffer() const
int64 exint
Definition: SYS_Types.h:115
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:191
bool opSecondU(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
void setSecondV(bool val)
int64 getFunction() const
void setAllUBreakpoints(bool val)
bool opAllVBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_StringHolder &value) const
void getParmValue(exint idx, exint &value) const
void setSecondU(bool val)
GLboolean * data
Definition: glcorearb.h:130
int int32
Definition: SYS_Types.h:34
T & y(void)
Definition: UT_Vector4.h:370
void getParmValue(exint idx, fpreal &value) const
void setDomainV2(fpreal64 val)
void setParmValue(exint idx, const UT_Vector2D &value)
void setParmValue(exint idx, const UT_StringHolder &value)
bool opAllUBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
int64 getOnlyBreakpoints() const
void setKeepOut(bool val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, UT_Vector3D &v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void setDomainV1(fpreal64 val)
void setParmValue(exint idx, const UT_Matrix2D &value)
fpreal64 getDomainV2() const
bool getKeepIn() const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:269
void strncpy(const char *src, exint maxlen)
bool getFirstV() const
void setParmValue(exint idx, const fpreal &value)
void setAllVBreakpoints(bool val)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getParmValue(exint idx, UT_Vector4D &value) const
bool getKeepOut() const
int64 opDivsU(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 opDomainV2(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, int64 &v)
const char * buffer() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector3D &value)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
bool getAllVBreakpoints() const
int64 opOnlyBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
T & x(void)
Definition: UT_Vector4.h:368
fpreal64 opDomainV1(const SOP_NodeVerb::CookParms &cookparms) const
bool getAllUBreakpoints() const
T & y(void)
Definition: UT_Vector2.h:286
void setFirstU(bool val)
bool opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
GLboolean r
Definition: glcorearb.h:1221
fpreal64 opDomainU2(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
T & w(void)
Definition: UT_Vector4.h:374
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setDomainU2(fpreal64 val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 opDomainU1(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
SYS_FORCE_INLINE bool isstring() const
bool opKeepIn(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setParmValue(exint idx, const UT_Matrix3D &value)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Vector4D v)
GLenum src
Definition: glcorearb.h:1792
void save(std::ostream &os) const