HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_BoxParms.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myType = 0;
32  mySurfType = 4;
33  mySize = 1;
34  myScale = 1;
35  myCenter = 0;
36  myRotate = 0;
37  myDivRate = 4;
38  myOrder = 4;
39  myDoDivs = false;
40  myDivs = 3;
41  myRebar = false;
42  myConsolidatePoints = true;
43  myOrientedBoundingBox = false;
44  myVertexNormals = false;
45 
46  }
47 
48  explicit SOP_BoxParms(const SOP_BoxParms &) = default;
49 
50  ~SOP_BoxParms() override {}
51 
52  bool operator==(const SOP_BoxParms &src) const
53  {
54  if (myType != src.myType) return false;
55  if (mySurfType != src.mySurfType) return false;
56  if (mySize != src.mySize) return false;
57  if (myScale != src.myScale) return false;
58  if (myCenter != src.myCenter) return false;
59  if (myRotate != src.myRotate) return false;
60  if (myDivRate != src.myDivRate) return false;
61  if (myOrder != src.myOrder) return false;
62  if (myDoDivs != src.myDoDivs) return false;
63  if (myDivs != src.myDivs) return false;
64  if (myRebar != src.myRebar) return false;
65  if (myConsolidatePoints != src.myConsolidatePoints) return false;
66  if (myOrientedBoundingBox != src.myOrientedBoundingBox) return false;
67  if (myVertexNormals != src.myVertexNormals) return false;
68 
69  return true;
70  }
71  bool operator!=(const SOP_BoxParms &src) const
72  {
73  return !operator==(src);
74  }
75 
76 
77 
78  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
79  {
80  myType = 0;
81  if (true)
82  graph->evalOpParm(myType, nodeidx, "type", time, 0);
83  mySurfType = 4;
84  if (true)
85  graph->evalOpParm(mySurfType, nodeidx, "surftype", time, 0);
86  mySize = 1;
87  if (true)
88  graph->evalOpParm(mySize, nodeidx, "size", time, 0);
89  myScale = 1;
90  if (true)
91  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
92  myCenter = 0;
93  if (true)
94  graph->evalOpParm(myCenter, nodeidx, "t", time, 0);
95  myRotate = 0;
96  if (true)
97  graph->evalOpParm(myRotate, nodeidx, "r", time, 0);
98  myDivRate = 4;
99  if (true)
100  graph->evalOpParm(myDivRate, nodeidx, "divrate", time, 0);
101  myOrder = 4;
102  if (true)
103  graph->evalOpParm(myOrder, nodeidx, "orderrate", time, 0);
104  myDoDivs = false;
105  if (true)
106  graph->evalOpParm(myDoDivs, nodeidx, "dodivs", time, 0);
107  myDivs = 3;
108  if (true)
109  graph->evalOpParm(myDivs, nodeidx, "divs", time, 0);
110  myRebar = false;
111  if (true)
112  graph->evalOpParm(myRebar, nodeidx, "rebar", time, 0);
113  myConsolidatePoints = true;
114  if (true)
115  graph->evalOpParm(myConsolidatePoints, nodeidx, "consolidatepts", time, 0);
116  myOrientedBoundingBox = false;
117  if (true)
118  graph->evalOpParm(myOrientedBoundingBox, nodeidx, "orientedbbox", time, 0);
119  myVertexNormals = false;
120  if (true)
121  graph->evalOpParm(myVertexNormals, nodeidx, "vertexnormals", time, 0);
122 
123  }
124 
125 
126  void loadFromOpSubclass(const LoadParms &loadparms) override
127  {
128  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
129  }
130 
131 
132  void copyFrom(const SOP_NodeParms *src) override
133  {
134  *this = *((const SOP_BoxParms *)src);
135  }
136 
137  template <typename T>
138  void
139  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
140  {
141  if (idx.size() < 1)
142  return;
143  UT_ASSERT(idx.size() == instance.size()+1);
144  if (idx.size() != instance.size()+1)
145  return;
146  switch (idx[0])
147  {
148  case 0:
149  coerceValue(value, myType);
150  break;
151  case 1:
152  coerceValue(value, mySurfType);
153  break;
154  case 2:
155  coerceValue(value, mySize);
156  break;
157  case 3:
158  coerceValue(value, myScale);
159  break;
160  case 4:
161  coerceValue(value, myCenter);
162  break;
163  case 5:
164  coerceValue(value, myRotate);
165  break;
166  case 6:
167  coerceValue(value, myDivRate);
168  break;
169  case 7:
170  coerceValue(value, myOrder);
171  break;
172  case 8:
173  coerceValue(value, myDoDivs);
174  break;
175  case 9:
176  coerceValue(value, myDivs);
177  break;
178  case 10:
179  coerceValue(value, myRebar);
180  break;
181  case 11:
182  coerceValue(value, myConsolidatePoints);
183  break;
184  case 12:
185  coerceValue(value, myOrientedBoundingBox);
186  break;
187  case 13:
188  coerceValue(value, myVertexNormals);
189  break;
190 
191  }
192  }
193 
194  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
195  { doGetParmValue(idx, instance, value); }
196  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
197  { doGetParmValue(idx, instance, value); }
198  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
199  { doGetParmValue(idx, instance, value); }
200  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
201  { doGetParmValue(idx, instance, value); }
202  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
203  { doGetParmValue(idx, instance, value); }
204  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
205  { doGetParmValue(idx, instance, value); }
206  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
207  { doGetParmValue(idx, instance, value); }
208  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
209  { doGetParmValue(idx, instance, value); }
210  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
215  { doGetParmValue(idx, instance, value); }
216 
217  template <typename T>
218  void
219  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
220  {
221  if (idx.size() < 1)
222  return;
223  UT_ASSERT(idx.size() == instance.size()+1);
224  if (idx.size() != instance.size()+1)
225  return;
226  switch (idx[0])
227  {
228  case 0:
229  coerceValue(myType, value);
230  break;
231  case 1:
232  coerceValue(mySurfType, value);
233  break;
234  case 2:
235  coerceValue(mySize, value);
236  break;
237  case 3:
238  coerceValue(myScale, value);
239  break;
240  case 4:
241  coerceValue(myCenter, value);
242  break;
243  case 5:
244  coerceValue(myRotate, value);
245  break;
246  case 6:
247  coerceValue(myDivRate, value);
248  break;
249  case 7:
250  coerceValue(myOrder, value);
251  break;
252  case 8:
253  coerceValue(myDoDivs, value);
254  break;
255  case 9:
256  coerceValue(myDivs, value);
257  break;
258  case 10:
259  coerceValue(myRebar, value);
260  break;
261  case 11:
262  coerceValue(myConsolidatePoints, value);
263  break;
264  case 12:
265  coerceValue(myOrientedBoundingBox, value);
266  break;
267  case 13:
268  coerceValue(myVertexNormals, value);
269  break;
270 
271  }
272  }
273 
274  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
275  { doSetParmValue(idx, instance, value); }
276  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
277  { doSetParmValue(idx, instance, value); }
278  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
279  { doSetParmValue(idx, instance, value); }
280  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
281  { doSetParmValue(idx, instance, value); }
282  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
283  { doSetParmValue(idx, instance, value); }
284  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
285  { doSetParmValue(idx, instance, value); }
286  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
287  { doSetParmValue(idx, instance, value); }
288  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
295  { doSetParmValue(idx, instance, value); }
296 
297  exint getNestNumParms(TempIndex idx) const override
298  {
299  if (idx.size() == 0)
300  return 14;
301  switch (idx[0])
302  {
303 
304  }
305  // Invalid
306  return 0;
307  }
308 
309  const char *getNestParmName(TempIndex fieldnum) const override
310  {
311  if (fieldnum.size() < 1)
312  return 0;
313  switch (fieldnum[0])
314  {
315  case 0:
316  return "type";
317  case 1:
318  return "surftype";
319  case 2:
320  return "size";
321  case 3:
322  return "scale";
323  case 4:
324  return "t";
325  case 5:
326  return "r";
327  case 6:
328  return "divrate";
329  case 7:
330  return "orderrate";
331  case 8:
332  return "dodivs";
333  case 9:
334  return "divs";
335  case 10:
336  return "rebar";
337  case 11:
338  return "consolidatepts";
339  case 12:
340  return "orientedbbox";
341  case 13:
342  return "vertexnormals";
343 
344  }
345  return 0;
346  }
347 
348  ParmType getNestParmType(TempIndex fieldnum) const override
349  {
350  if (fieldnum.size() < 1)
351  return PARM_UNSUPPORTED;
352  switch (fieldnum[0])
353  {
354  case 0:
355  return PARM_INTEGER;
356  case 1:
357  return PARM_INTEGER;
358  case 2:
359  return PARM_VECTOR3;
360  case 3:
361  return PARM_FLOAT;
362  case 4:
363  return PARM_VECTOR3;
364  case 5:
365  return PARM_VECTOR3;
366  case 6:
367  return PARM_VECTOR3;
368  case 7:
369  return PARM_VECTOR3;
370  case 8:
371  return PARM_INTEGER;
372  case 9:
373  return PARM_VECTOR3;
374  case 10:
375  return PARM_INTEGER;
376  case 11:
377  return PARM_INTEGER;
378  case 12:
379  return PARM_INTEGER;
380  case 13:
381  return PARM_INTEGER;
382 
383  }
384  return PARM_UNSUPPORTED;
385  }
386 
387  // Boiler plate to load individual types.
388  static void loadData(UT_IStream &is, int64 &v)
389  { is.bread(&v, 1); }
390  static void loadData(UT_IStream &is, bool &v)
391  { int64 iv; is.bread(&iv, 1); v = iv; }
392  static void loadData(UT_IStream &is, fpreal64 &v)
393  { is.bread<fpreal64>(&v, 1); }
394  static void loadData(UT_IStream &is, UT_Vector2D &v)
395  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
396  static void loadData(UT_IStream &is, UT_Vector3D &v)
397  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
398  is.bread<fpreal64>(&v.z(), 1); }
399  static void loadData(UT_IStream &is, UT_Vector4D &v)
400  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
401  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
402  static void loadData(UT_IStream &is, UT_Matrix2D &v)
403  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
404  static void loadData(UT_IStream &is, UT_Matrix3D &v)
405  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
406  static void loadData(UT_IStream &is, UT_Matrix4D &v)
407  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
408  static void loadData(UT_IStream &is, UT_Vector2I &v)
409  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
410  static void loadData(UT_IStream &is, UT_Vector3I &v)
411  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
412  is.bread<int64>(&v.z(), 1); }
413  static void loadData(UT_IStream &is, UT_Vector4I &v)
414  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
415  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
417  { is.bread(v); }
419  { UT_StringHolder rampdata;
420  loadData(is, rampdata);
421  if (rampdata.isstring())
422  {
423  v.reset(new UT_Ramp());
424  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
425  v->load(istr);
426  }
427  else v.reset();
428  }
431  loadData(is, data);
432  if (data.isstring())
433  {
434  // Find the data type.
435  const char *colon = UT_StringWrap(data).findChar(':');
436  if (colon)
437  {
438  int typelen = colon - data.buffer();
440  type.strncpy(data.buffer(), typelen);
441  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
442 
443  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
444  }
445  }
446  else v.reset();
447  }
448 
449  static void saveData(std::ostream &os, int64 v)
450  { UTwrite(os, &v); }
451  static void saveData(std::ostream &os, bool v)
452  { int64 iv = v; UTwrite(os, &iv); }
453  static void saveData(std::ostream &os, fpreal64 v)
454  { UTwrite<fpreal64>(os, &v); }
455  static void saveData(std::ostream &os, UT_Vector2D v)
456  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
457  static void saveData(std::ostream &os, UT_Vector3D v)
458  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
459  UTwrite<fpreal64>(os, &v.z()); }
460  static void saveData(std::ostream &os, UT_Vector4D v)
461  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
462  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
463  static void saveData(std::ostream &os, UT_Matrix2D v)
465  static void saveData(std::ostream &os, UT_Matrix3D v)
467  static void saveData(std::ostream &os, UT_Matrix4D v)
469  static void saveData(std::ostream &os, UT_StringHolder s)
470  { UT_StringWrap(s).saveBinary(os); }
471  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
473  UT_OStringStream ostr;
474  if (s) s->save(ostr);
475  result = ostr.str();
476  saveData(os, result);
477  }
478  static void saveData(std::ostream &os, PRM_DataItemHandle s)
480  UT_OStringStream ostr;
481  if (s)
482  {
483  ostr << s->getDataTypeToken();
484  ostr << ":";
485  s->saveBinary(ostr);
486  }
487  result = ostr.str();
488  saveData(os, result);
489  }
490 
491 
492  void save(std::ostream &os) const
493  {
494  int32 v = version();
495  UTwrite(os, &v);
496  saveData(os, myType);
497  saveData(os, mySurfType);
498  saveData(os, mySize);
499  saveData(os, myScale);
500  saveData(os, myCenter);
501  saveData(os, myRotate);
502  saveData(os, myDivRate);
503  saveData(os, myOrder);
504  saveData(os, myDoDivs);
505  saveData(os, myDivs);
506  saveData(os, myRebar);
507  saveData(os, myConsolidatePoints);
508  saveData(os, myOrientedBoundingBox);
509  saveData(os, myVertexNormals);
510 
511  }
512 
513  bool load(UT_IStream &is)
514  {
515  int32 v;
516  is.bread(&v, 1);
517  if (version() != v)
518  {
519  // Fail incompatible versions
520  return false;
521  }
522  loadData(is, myType);
523  loadData(is, mySurfType);
524  loadData(is, mySize);
525  loadData(is, myScale);
526  loadData(is, myCenter);
527  loadData(is, myRotate);
528  loadData(is, myDivRate);
529  loadData(is, myOrder);
530  loadData(is, myDoDivs);
531  loadData(is, myDivs);
532  loadData(is, myRebar);
533  loadData(is, myConsolidatePoints);
534  loadData(is, myOrientedBoundingBox);
535  loadData(is, myVertexNormals);
536 
537  return true;
538  }
539 
540  int64 getType() const { return myType; }
541  void setType(int64 val) { myType = val; }
542  int64 opType(const SOP_NodeVerb::CookParms &cookparms) const
543  {
544  SOP_Node *thissop = cookparms.getNode();
545  if (!thissop) return getType();
546  int64 result;
547  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
548  return result;
549  }
550  int64 getSurfType() const { return mySurfType; }
551  void setSurfType(int64 val) { mySurfType = val; }
552  int64 opSurfType(const SOP_NodeVerb::CookParms &cookparms) const
553  {
554  SOP_Node *thissop = cookparms.getNode();
555  if (!thissop) return getSurfType();
556  int64 result;
557  OP_Utils::evalOpParm(result, thissop, "surftype", cookparms.getCookTime(), 0);
558  return result;
559  }
560  UT_Vector3D getSize() const { return mySize; }
561  void setSize(UT_Vector3D val) { mySize = val; }
563  {
564  SOP_Node *thissop = cookparms.getNode();
565  if (!thissop) return getSize();
567  OP_Utils::evalOpParm(result, thissop, "size", cookparms.getCookTime(), 0);
568  return result;
569  }
570  fpreal64 getScale() const { return myScale; }
571  void setScale(fpreal64 val) { myScale = val; }
572  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
573  {
574  SOP_Node *thissop = cookparms.getNode();
575  if (!thissop) return getScale();
577  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
578  return result;
579  }
580  UT_Vector3D getCenter() const { return myCenter; }
581  void setCenter(UT_Vector3D val) { myCenter = val; }
583  {
584  SOP_Node *thissop = cookparms.getNode();
585  if (!thissop) return getCenter();
587  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
588  return result;
589  }
590  UT_Vector3D getRotate() const { return myRotate; }
591  void setRotate(UT_Vector3D val) { myRotate = val; }
593  {
594  SOP_Node *thissop = cookparms.getNode();
595  if (!thissop) return getRotate();
597  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
598  return result;
599  }
600  UT_Vector3I getDivRate() const { return myDivRate; }
601  void setDivRate(UT_Vector3I val) { myDivRate = val; }
603  {
604  SOP_Node *thissop = cookparms.getNode();
605  if (!thissop) return getDivRate();
607  OP_Utils::evalOpParm(result, thissop, "divrate", cookparms.getCookTime(), 0);
608  return result;
609  }
610  UT_Vector3I getOrder() const { return myOrder; }
613  {
614  SOP_Node *thissop = cookparms.getNode();
615  if (!thissop) return getOrder();
617  OP_Utils::evalOpParm(result, thissop, "orderrate", cookparms.getCookTime(), 0);
618  return result;
619  }
620  bool getDoDivs() const { return myDoDivs; }
621  void setDoDivs(bool val) { myDoDivs = val; }
622  bool opDoDivs(const SOP_NodeVerb::CookParms &cookparms) const
623  {
624  SOP_Node *thissop = cookparms.getNode();
625  if (!thissop) return getDoDivs();
626  bool result;
627  OP_Utils::evalOpParm(result, thissop, "dodivs", cookparms.getCookTime(), 0);
628  return result;
629  }
630  UT_Vector3I getDivs() const { return myDivs; }
631  void setDivs(UT_Vector3I val) { myDivs = val; }
633  {
634  SOP_Node *thissop = cookparms.getNode();
635  if (!thissop) return getDivs();
637  OP_Utils::evalOpParm(result, thissop, "divs", cookparms.getCookTime(), 0);
638  return result;
639  }
640  bool getRebar() const { return myRebar; }
641  void setRebar(bool val) { myRebar = val; }
642  bool opRebar(const SOP_NodeVerb::CookParms &cookparms) const
643  {
644  SOP_Node *thissop = cookparms.getNode();
645  if (!thissop) return getRebar();
646  bool result;
647  OP_Utils::evalOpParm(result, thissop, "rebar", cookparms.getCookTime(), 0);
648  return result;
649  }
650  bool getConsolidatePoints() const { return myConsolidatePoints; }
651  void setConsolidatePoints(bool val) { myConsolidatePoints = val; }
652  bool opConsolidatePoints(const SOP_NodeVerb::CookParms &cookparms) const
653  {
654  SOP_Node *thissop = cookparms.getNode();
655  if (!thissop) return getConsolidatePoints();
656  bool result;
657  OP_Utils::evalOpParm(result, thissop, "consolidatepts", cookparms.getCookTime(), 0);
658  return result;
659  }
660  bool getOrientedBoundingBox() const { return myOrientedBoundingBox; }
661  void setOrientedBoundingBox(bool val) { myOrientedBoundingBox = val; }
662  bool opOrientedBoundingBox(const SOP_NodeVerb::CookParms &cookparms) const
663  {
664  SOP_Node *thissop = cookparms.getNode();
665  if (!thissop) return getOrientedBoundingBox();
666  bool result;
667  OP_Utils::evalOpParm(result, thissop, "orientedbbox", cookparms.getCookTime(), 0);
668  return result;
669  }
670  bool getVertexNormals() const { return myVertexNormals; }
671  void setVertexNormals(bool val) { myVertexNormals = val; }
672  bool opVertexNormals(const SOP_NodeVerb::CookParms &cookparms) const
673  {
674  SOP_Node *thissop = cookparms.getNode();
675  if (!thissop) return getVertexNormals();
676  bool result;
677  OP_Utils::evalOpParm(result, thissop, "vertexnormals", cookparms.getCookTime(), 0);
678  return result;
679  }
680 
681 private:
682  int64 myType;
683  int64 mySurfType;
684  UT_Vector3D mySize;
685  fpreal64 myScale;
686  UT_Vector3D myCenter;
687  UT_Vector3D myRotate;
688  UT_Vector3I myDivRate;
690  bool myDoDivs;
691  UT_Vector3I myDivs;
692  bool myRebar;
693  bool myConsolidatePoints;
694  bool myOrientedBoundingBox;
695  bool myVertexNormals;
696 
697 };
GLdouble s
Definition: glew.h:1390
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
void setCenter(UT_Vector3D val)
bool opRebar(const SOP_NodeVerb::CookParms &cookparms) const
bool opVertexNormals(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I getDivRate() const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
UT_Vector3D getSize() const
exint getNestNumParms(TempIndex idx) const override
void save(std::ostream &os) const
fpreal64 getScale() const
bool getOrientedBoundingBox() const
int64 getSurfType() const
void setSurfType(int64 val)
~SOP_BoxParms() override
int myOrder
Definition: GT_CurveEval.h:263
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
const char * getNestParmName(TempIndex fieldnum) const override
fpreal getTime() const
Definition: OP_Context.h:60
bool operator==(const SOP_BoxParms &src) const
UT_Vector3D opRotate(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
GLuint const GLfloat * val
Definition: glew.h:2794
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool operator!=(const SOP_BoxParms &src) const
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
bool getDoDivs() const
UT_Vector3D getCenter() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
An output stream object that owns its own string buffer storage.
void setType(int64 val)
static void saveData(std::ostream &os, int64 v)
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, UT_Vector2I &v)
int64 opSurfType(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setSize(UT_Vector3D val)
static void loadData(UT_IStream &is, int64 &v)
double fpreal64
Definition: SYS_Types.h:201
bool load(UT_IStream &is)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, fpreal64 v)
bool getVertexNormals() const
exint length() const
bool getConsolidatePoints() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void setRebar(bool val)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
static void loadData(UT_IStream &is, UT_Vector4D &v)
const GLfloat * c
Definition: glew.h:16296
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static int version()
int64 getType() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setDoDivs(bool val)
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opSize(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setScale(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setVertexNormals(bool val)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opOrientedBoundingBox(const SOP_NodeVerb::CookParms &cookparms) const
bool getRebar() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setConsolidatePoints(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool opConsolidatePoints(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getRotate() const
void setOrientedBoundingBox(bool val)
UT_Vector3D opCenter(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
static void loadData(UT_IStream &is, fpreal64 &v)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix2D v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
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:648
void setDivRate(UT_Vector3I val)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_Vector3I getOrder() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
void setOrder(UT_Vector3I val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
void setDivs(UT_Vector3I val)
GLuint64EXT * result
Definition: glew.h:14007
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
UT_Vector3I getDivs() const
void copyFrom(const SOP_NodeParms *src) override
bool opDoDivs(const SOP_NodeVerb::CookParms &cookparms) const
void setRotate(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
int64 opType(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3I opDivRate(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3I opDivs(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void loadFromOpSubclass(const LoadParms &loadparms) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
static void saveData(std::ostream &os, UT_Vector3D v)
UT_Vector3I opOrder(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)