HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Remesh.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  myHard_edges = ""_sh;
31  myIterations = 1;
32  myRecompute_normals = false;
33  mySmoothing_level = 0;
34  myTarget_edge = 0.2;
35  myInput_pts_only = false;
36  myElement_sizing = 0;
37  myGradation = 0.25;
38  myDensity = 1;
39  myLimit_below = false;
40  myMin_edge_length = 1e-05;
41  myLimit_above = false;
42  myMax_edge_length = 10000;
43  myLfs_only = false;
44  myVisualize_lfs = false;
45  myLfs_ramp = UT_SharedPtr<UT_Ramp>(0);
46 
47  }
48 
49  explicit SOP_RemeshParms(const SOP_RemeshParms &) = default;
50 
51  virtual ~SOP_RemeshParms() {}
52 
53  bool operator==(const SOP_RemeshParms &src) const
54  {
55  if (myGroup != src.myGroup) return false;
56  if (myHard_edges != src.myHard_edges) return false;
57  if (myIterations != src.myIterations) return false;
58  if (myRecompute_normals != src.myRecompute_normals) return false;
59  if (mySmoothing_level != src.mySmoothing_level) return false;
60  if (myTarget_edge != src.myTarget_edge) return false;
61  if (myInput_pts_only != src.myInput_pts_only) return false;
62  if (myElement_sizing != src.myElement_sizing) return false;
63  if (myGradation != src.myGradation) return false;
64  if (myDensity != src.myDensity) return false;
65  if (myLimit_below != src.myLimit_below) return false;
66  if (myMin_edge_length != src.myMin_edge_length) return false;
67  if (myLimit_above != src.myLimit_above) return false;
68  if (myMax_edge_length != src.myMax_edge_length) return false;
69  if (myLfs_only != src.myLfs_only) return false;
70  if (myVisualize_lfs != src.myVisualize_lfs) return false;
71  if (myLfs_ramp != src.myLfs_ramp) return false;
72 
73  return true;
74  }
75  bool operator!=(const SOP_RemeshParms &src) const
76  {
77  return !operator==(src);
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(myHard_edges, node, "hard_edges", time, 0);
89  else myHard_edges = ""_sh;
90  if (true)
91  OP_Utils::evalOpParm(myIterations, node, "iterations", time, 0);
92  else myIterations = 1;
93  if (true)
94  OP_Utils::evalOpParm(myRecompute_normals, node, "recompute_normals", time, 0);
95  else myRecompute_normals = false;
96  if (true)
97  OP_Utils::evalOpParm(mySmoothing_level, node, "smoothing_level", time, 0);
98  else mySmoothing_level = 0;
99  if (true)
100  OP_Utils::evalOpParm(myTarget_edge, node, "target_edge", time, 0);
101  else myTarget_edge = 0.2;
102  if (true)
103  OP_Utils::evalOpParm(myInput_pts_only, node, "input_pts_only", time, 0);
104  else myInput_pts_only = false;
105  if (true)
106  OP_Utils::evalOpParm(myElement_sizing, node, "element_sizing", time, 0);
107  else myElement_sizing = 0;
108  if (true)
109  OP_Utils::evalOpParm(myGradation, node, "gradation", time, 0);
110  else myGradation = 0.25;
111  if (true)
112  OP_Utils::evalOpParm(myDensity, node, "density", time, 0);
113  else myDensity = 1;
114  if (true)
115  OP_Utils::evalOpParm(myLimit_below, node, "limit_below", time, 0);
116  else myLimit_below = false;
117  if (true && ( (!(((getLimit_below()==0)))) ) )
118  OP_Utils::evalOpParm(myMin_edge_length, node, "min_edge_length", time, 0);
119  else myMin_edge_length = 1e-05;
120  if (true)
121  OP_Utils::evalOpParm(myLimit_above, node, "limit_above", time, 0);
122  else myLimit_above = false;
123  if (true && ( (!(((getLimit_above()==0)))) ) )
124  OP_Utils::evalOpParm(myMax_edge_length, node, "max_edge_length", time, 0);
125  else myMax_edge_length = 10000;
126  if (true)
127  OP_Utils::evalOpParm(myLfs_only, node, "lfs_only", time, 0);
128  else myLfs_only = false;
129  if (true)
130  OP_Utils::evalOpParm(myVisualize_lfs, node, "visualize_lfs", time, 0);
131  else myVisualize_lfs = false;
132  if (true && ( (!(((getVisualize_lfs()==0)))) ) )
133  OP_Utils::evalOpParm(myLfs_ramp, node, "lfs_ramp", time, 0);
134  else myLfs_ramp = UT_SharedPtr<UT_Ramp>(0);
135 
136  }
137 
138 
139  virtual void loadFromOpSubclass(const LoadParms &loadparms)
140  {
141  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
142  }
143 
144 
145  virtual void copyFrom(const SOP_NodeParms *src)
146  {
147  *this = *((const SOP_RemeshParms *)src);
148  }
149 
150  template <typename T>
151  void
152  doGetParmValue(exint idx, T &value) const
153  {
154  switch (idx)
155  {
156  case 0:
157  coerceValue(value, myGroup);
158  break;
159  case 1:
160  coerceValue(value, myHard_edges);
161  break;
162  case 2:
163  coerceValue(value, myIterations);
164  break;
165  case 3:
166  coerceValue(value, myRecompute_normals);
167  break;
168  case 4:
169  coerceValue(value, mySmoothing_level);
170  break;
171  case 5:
172  coerceValue(value, myTarget_edge);
173  break;
174  case 6:
175  coerceValue(value, myInput_pts_only);
176  break;
177  case 7:
178  coerceValue(value, myElement_sizing);
179  break;
180  case 8:
181  coerceValue(value, myGradation);
182  break;
183  case 9:
184  coerceValue(value, myDensity);
185  break;
186  case 10:
187  coerceValue(value, myLimit_below);
188  break;
189  case 11:
190  coerceValue(value, myMin_edge_length);
191  break;
192  case 12:
193  coerceValue(value, myLimit_above);
194  break;
195  case 13:
196  coerceValue(value, myMax_edge_length);
197  break;
198  case 14:
199  coerceValue(value, myLfs_only);
200  break;
201  case 15:
202  coerceValue(value, myVisualize_lfs);
203  break;
204  case 16:
205  coerceValue(value, myLfs_ramp);
206  break;
207 
208  }
209  }
210 
211  void getParmValue(exint idx, exint &value) const
212  { doGetParmValue(idx, value); }
213  void getParmValue(exint idx, fpreal &value) const
214  { doGetParmValue(idx, value); }
216  { doGetParmValue(idx, value); }
218  { doGetParmValue(idx, value); }
220  { doGetParmValue(idx, value); }
222  { doGetParmValue(idx, value); }
224  { doGetParmValue(idx, value); }
226  { doGetParmValue(idx, value); }
228  { doGetParmValue(idx, value); }
230  { doGetParmValue(idx, value); }
232  { doGetParmValue(idx, value); }
233 
234  template <typename T>
235  void
236  doSetParmValue(exint idx, const T &value)
237  {
238  switch (idx)
239  {
240  case 0:
241  coerceValue(myGroup, value);
242  break;
243  case 1:
244  coerceValue(myHard_edges, value);
245  break;
246  case 2:
247  coerceValue(myIterations, value);
248  break;
249  case 3:
250  coerceValue(myRecompute_normals, value);
251  break;
252  case 4:
253  coerceValue(mySmoothing_level, value);
254  break;
255  case 5:
256  coerceValue(myTarget_edge, value);
257  break;
258  case 6:
259  coerceValue(myInput_pts_only, value);
260  break;
261  case 7:
262  coerceValue(myElement_sizing, value);
263  break;
264  case 8:
265  coerceValue(myGradation, value);
266  break;
267  case 9:
268  coerceValue(myDensity, value);
269  break;
270  case 10:
271  coerceValue(myLimit_below, value);
272  break;
273  case 11:
274  coerceValue(myMin_edge_length, value);
275  break;
276  case 12:
277  coerceValue(myLimit_above, value);
278  break;
279  case 13:
280  coerceValue(myMax_edge_length, value);
281  break;
282  case 14:
283  coerceValue(myLfs_only, value);
284  break;
285  case 15:
286  coerceValue(myVisualize_lfs, value);
287  break;
288  case 16:
289  coerceValue(myLfs_ramp, value);
290  break;
291 
292  }
293  }
294 
295  void setParmValue(exint idx, const exint &value)
296  { doSetParmValue(idx, value); }
297  void setParmValue(exint idx, const fpreal &value)
298  { doSetParmValue(idx, value); }
299  void setParmValue(exint idx, const UT_Vector2D &value)
300  { doSetParmValue(idx, value); }
301  void setParmValue(exint idx, const UT_Vector3D &value)
302  { doSetParmValue(idx, value); }
303  void setParmValue(exint idx, const UT_Vector4D &value)
304  { doSetParmValue(idx, value); }
305  void setParmValue(exint idx, const UT_Matrix2D &value)
306  { doSetParmValue(idx, value); }
307  void setParmValue(exint idx, const UT_Matrix3D &value)
308  { doSetParmValue(idx, value); }
309  void setParmValue(exint idx, const UT_Matrix4D &value)
310  { doSetParmValue(idx, value); }
312  { doSetParmValue(idx, value); }
314  { doSetParmValue(idx, value); }
316  { doSetParmValue(idx, value); }
317 
318  virtual exint getNumParms() const
319  {
320  return 17;
321  }
322 
323  virtual const char *getParmName(exint fieldnum) const
324  {
325  switch (fieldnum)
326  {
327  case 0:
328  return "group";
329  case 1:
330  return "hard_edges";
331  case 2:
332  return "iterations";
333  case 3:
334  return "recompute_normals";
335  case 4:
336  return "smoothing_level";
337  case 5:
338  return "target_edge";
339  case 6:
340  return "input_pts_only";
341  case 7:
342  return "element_sizing";
343  case 8:
344  return "gradation";
345  case 9:
346  return "density";
347  case 10:
348  return "limit_below";
349  case 11:
350  return "min_edge_length";
351  case 12:
352  return "limit_above";
353  case 13:
354  return "max_edge_length";
355  case 14:
356  return "lfs_only";
357  case 15:
358  return "visualize_lfs";
359  case 16:
360  return "lfs_ramp";
361 
362  }
363  return 0;
364  }
365 
366  virtual ParmType getParmType(exint fieldnum) const
367  {
368  switch (fieldnum)
369  {
370  case 0:
371  return PARM_STRING;
372  case 1:
373  return PARM_STRING;
374  case 2:
375  return PARM_INTEGER;
376  case 3:
377  return PARM_INTEGER;
378  case 4:
379  return PARM_FLOAT;
380  case 5:
381  return PARM_FLOAT;
382  case 6:
383  return PARM_INTEGER;
384  case 7:
385  return PARM_INTEGER;
386  case 8:
387  return PARM_FLOAT;
388  case 9:
389  return PARM_FLOAT;
390  case 10:
391  return PARM_INTEGER;
392  case 11:
393  return PARM_FLOAT;
394  case 12:
395  return PARM_INTEGER;
396  case 13:
397  return PARM_FLOAT;
398  case 14:
399  return PARM_INTEGER;
400  case 15:
401  return PARM_INTEGER;
402  case 16:
403  return PARM_RAMP;
404 
405  }
406  return PARM_UNSUPPORTED;
407  }
408 
409  // Boiler plate to load individual types.
410  static void loadData(UT_IStream &is, int64 &v)
411  { is.bread(&v, 1); }
412  static void loadData(UT_IStream &is, bool &v)
413  { int64 iv; is.bread(&iv, 1); v = iv; }
414  static void loadData(UT_IStream &is, fpreal64 &v)
415  { is.bread<fpreal64>(&v, 1); }
416  static void loadData(UT_IStream &is, UT_Vector2D &v)
417  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
418  static void loadData(UT_IStream &is, UT_Vector3D &v)
419  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
420  is.bread<fpreal64>(&v.z(), 1); }
421  static void loadData(UT_IStream &is, UT_Vector4D &v)
422  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
423  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
424  static void loadData(UT_IStream &is, UT_Matrix2D &v)
425  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
426  static void loadData(UT_IStream &is, UT_Matrix3D &v)
427  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
428  static void loadData(UT_IStream &is, UT_Matrix4D &v)
429  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
430  static void loadData(UT_IStream &is, UT_Vector2I &v)
431  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
432  static void loadData(UT_IStream &is, UT_Vector3I &v)
433  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
434  is.bread<int64>(&v.z(), 1); }
435  static void loadData(UT_IStream &is, UT_Vector4I &v)
436  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
437  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
439  { is.bread(v); }
441  { UT_StringHolder rampdata;
442  loadData(is, rampdata);
443  if (rampdata.isstring())
444  {
445  v.reset(new UT_Ramp());
446  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
447  v->load(istr);
448  }
449  else v.reset();
450  }
453  loadData(is, data);
454  if (data.isstring())
455  {
456  // Find the data type.
457  char *colon = UT_StringWrap(data).findChar(':');
458  if (colon)
459  {
460  int typelen = colon - data.buffer();
462  type.strncpy(data.buffer(), typelen);
463  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
464 
465  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
466  }
467  }
468  else v.reset();
469  }
470 
471  static void saveData(std::ostream &os, int64 v)
472  { UTwrite(os, &v); }
473  static void saveData(std::ostream &os, bool v)
474  { int64 iv = v; UTwrite(os, &iv); }
475  static void saveData(std::ostream &os, fpreal64 v)
476  { UTwrite<fpreal64>(os, &v); }
477  static void saveData(std::ostream &os, UT_Vector2D v)
478  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
479  static void saveData(std::ostream &os, UT_Vector3D v)
480  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
481  UTwrite<fpreal64>(os, &v.z()); }
482  static void saveData(std::ostream &os, UT_Vector4D v)
483  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
484  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
485  static void saveData(std::ostream &os, UT_Matrix2D v)
487  static void saveData(std::ostream &os, UT_Matrix3D v)
489  static void saveData(std::ostream &os, UT_Matrix4D v)
491  static void saveData(std::ostream &os, UT_StringHolder s)
492  { UT_StringWrap(s).saveBinary(os); }
493  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
494  { UT_StringHolder result;
495  UT_OStringStream ostr;
496  if (s) s->save(ostr);
497  result = ostr.str();
498  saveData(os, result);
499  }
500  static void saveData(std::ostream &os, PRM_DataItemHandle s)
501  { UT_StringHolder result;
502  UT_OStringStream ostr;
503  if (s)
504  {
505  ostr << s->getDataTypeToken();
506  ostr << ":";
507  s->saveBinary(ostr);
508  }
509  result = ostr.str();
510  saveData(os, result);
511  }
512 
513 
514  void save(std::ostream &os) const
515  {
516  int32 v = version();
517  UTwrite(os, &v);
518  saveData(os, myGroup);
519  saveData(os, myHard_edges);
520  saveData(os, myIterations);
521  saveData(os, myRecompute_normals);
522  saveData(os, mySmoothing_level);
523  saveData(os, myTarget_edge);
524  saveData(os, myInput_pts_only);
525  saveData(os, myElement_sizing);
526  saveData(os, myGradation);
527  saveData(os, myDensity);
528  saveData(os, myLimit_below);
529  saveData(os, myMin_edge_length);
530  saveData(os, myLimit_above);
531  saveData(os, myMax_edge_length);
532  saveData(os, myLfs_only);
533  saveData(os, myVisualize_lfs);
534  saveData(os, myLfs_ramp);
535 
536  }
537 
538  bool load(UT_IStream &is)
539  {
540  int32 v;
541  is.bread(&v, 1);
542  if (version() != v)
543  {
544  // Fail incompatible versions
545  return false;
546  }
547  loadData(is, myGroup);
548  loadData(is, myHard_edges);
549  loadData(is, myIterations);
550  loadData(is, myRecompute_normals);
551  loadData(is, mySmoothing_level);
552  loadData(is, myTarget_edge);
553  loadData(is, myInput_pts_only);
554  loadData(is, myElement_sizing);
555  loadData(is, myGradation);
556  loadData(is, myDensity);
557  loadData(is, myLimit_below);
558  loadData(is, myMin_edge_length);
559  loadData(is, myLimit_above);
560  loadData(is, myMax_edge_length);
561  loadData(is, myLfs_only);
562  loadData(is, myVisualize_lfs);
563  loadData(is, myLfs_ramp);
564 
565  return true;
566  }
567 
568  const UT_StringHolder & getGroup() const { return myGroup; }
569  void setGroup(const UT_StringHolder & val) { myGroup = val; }
571  {
572  SOP_Node *thissop = cookparms.getNode();
573  if (!thissop) return getGroup();
574  UT_StringHolder result;
575  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
576  return result;
577  }
578  const UT_StringHolder & getHard_edges() const { return myHard_edges; }
579  void setHard_edges(const UT_StringHolder & val) { myHard_edges = val; }
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return getHard_edges();
584  UT_StringHolder result;
585  OP_Utils::evalOpParm(result, thissop, "hard_edges", cookparms.getCookTime(), 0);
586  return result;
587  }
588  int64 getIterations() const { return myIterations; }
589  void setIterations(int64 val) { myIterations = val; }
591  {
592  SOP_Node *thissop = cookparms.getNode();
593  if (!thissop) return getIterations();
594  int64 result;
595  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
596  return result;
597  }
598  bool getRecompute_normals() const { return myRecompute_normals; }
599  void setRecompute_normals(bool val) { myRecompute_normals = val; }
600  bool opRecompute_normals(const SOP_NodeVerb::CookParms &cookparms) const
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getRecompute_normals();
604  bool result;
605  OP_Utils::evalOpParm(result, thissop, "recompute_normals", cookparms.getCookTime(), 0);
606  return result;
607  }
608  fpreal64 getSmoothing_level() const { return mySmoothing_level; }
609  void setSmoothing_level(fpreal64 val) { mySmoothing_level = val; }
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getSmoothing_level();
614  fpreal64 result;
615  OP_Utils::evalOpParm(result, thissop, "smoothing_level", cookparms.getCookTime(), 0);
616  return result;
617  }
618  fpreal64 getTarget_edge() const { return myTarget_edge; }
619  void setTarget_edge(fpreal64 val) { myTarget_edge = val; }
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getTarget_edge();
624  fpreal64 result;
625  OP_Utils::evalOpParm(result, thissop, "target_edge", cookparms.getCookTime(), 0);
626  return result;
627  }
628  bool getInput_pts_only() const { return myInput_pts_only; }
629  void setInput_pts_only(bool val) { myInput_pts_only = val; }
630  bool opInput_pts_only(const SOP_NodeVerb::CookParms &cookparms) const
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getInput_pts_only();
634  bool result;
635  OP_Utils::evalOpParm(result, thissop, "input_pts_only", cookparms.getCookTime(), 0);
636  return result;
637  }
638  int64 getElement_sizing() const { return myElement_sizing; }
639  void setElement_sizing(int64 val) { myElement_sizing = val; }
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getElement_sizing();
644  int64 result;
645  OP_Utils::evalOpParm(result, thissop, "element_sizing", cookparms.getCookTime(), 0);
646  return result;
647  }
648  fpreal64 getGradation() const { return myGradation; }
649  void setGradation(fpreal64 val) { myGradation = val; }
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getGradation();
654  fpreal64 result;
655  OP_Utils::evalOpParm(result, thissop, "gradation", cookparms.getCookTime(), 0);
656  return result;
657  }
658  fpreal64 getDensity() const { return myDensity; }
659  void setDensity(fpreal64 val) { myDensity = val; }
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getDensity();
664  fpreal64 result;
665  OP_Utils::evalOpParm(result, thissop, "density", cookparms.getCookTime(), 0);
666  return result;
667  }
668  bool getLimit_below() const { return myLimit_below; }
669  void setLimit_below(bool val) { myLimit_below = val; }
670  bool opLimit_below(const SOP_NodeVerb::CookParms &cookparms) const
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getLimit_below();
674  bool result;
675  OP_Utils::evalOpParm(result, thissop, "limit_below", cookparms.getCookTime(), 0);
676  return result;
677  }
678  fpreal64 getMin_edge_length() const { return myMin_edge_length; }
679  void setMin_edge_length(fpreal64 val) { myMin_edge_length = val; }
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getMin_edge_length();
684  fpreal64 result;
685  OP_Utils::evalOpParm(result, thissop, "min_edge_length", cookparms.getCookTime(), 0);
686  return result;
687  }
688  bool getLimit_above() const { return myLimit_above; }
689  void setLimit_above(bool val) { myLimit_above = val; }
690  bool opLimit_above(const SOP_NodeVerb::CookParms &cookparms) const
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getLimit_above();
694  bool result;
695  OP_Utils::evalOpParm(result, thissop, "limit_above", cookparms.getCookTime(), 0);
696  return result;
697  }
698  fpreal64 getMax_edge_length() const { return myMax_edge_length; }
699  void setMax_edge_length(fpreal64 val) { myMax_edge_length = val; }
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getMax_edge_length();
704  fpreal64 result;
705  OP_Utils::evalOpParm(result, thissop, "max_edge_length", cookparms.getCookTime(), 0);
706  return result;
707  }
708  bool getLfs_only() const { return myLfs_only; }
709  void setLfs_only(bool val) { myLfs_only = val; }
710  bool opLfs_only(const SOP_NodeVerb::CookParms &cookparms) const
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getLfs_only();
714  bool result;
715  OP_Utils::evalOpParm(result, thissop, "lfs_only", cookparms.getCookTime(), 0);
716  return result;
717  }
718  bool getVisualize_lfs() const { return myVisualize_lfs; }
719  void setVisualize_lfs(bool val) { myVisualize_lfs = val; }
720  bool opVisualize_lfs(const SOP_NodeVerb::CookParms &cookparms) const
721  {
722  SOP_Node *thissop = cookparms.getNode();
723  if (!thissop) return getVisualize_lfs();
724  bool result;
725  OP_Utils::evalOpParm(result, thissop, "visualize_lfs", cookparms.getCookTime(), 0);
726  return result;
727  }
728  UT_SharedPtr<UT_Ramp> getLfs_ramp() const { return myLfs_ramp; }
729  void setLfs_ramp(UT_SharedPtr<UT_Ramp> val) { myLfs_ramp = val; }
731  {
732  SOP_Node *thissop = cookparms.getNode();
733  if (!thissop) return getLfs_ramp();
734  UT_SharedPtr<UT_Ramp> result;
735  OP_Utils::evalOpParm(result, thissop, "lfs_ramp", cookparms.getCookTime(), 0);
736  return result;
737  }
738 
739 private:
740  UT_StringHolder myGroup;
741  UT_StringHolder myHard_edges;
742  int64 myIterations;
743  bool myRecompute_normals;
744  fpreal64 mySmoothing_level;
745  fpreal64 myTarget_edge;
746  bool myInput_pts_only;
747  int64 myElement_sizing;
748  fpreal64 myGradation;
749  fpreal64 myDensity;
750  bool myLimit_below;
751  fpreal64 myMin_edge_length;
752  bool myLimit_above;
753  fpreal64 myMax_edge_length;
754  bool myLfs_only;
755  bool myVisualize_lfs;
756  UT_SharedPtr<UT_Ramp> myLfs_ramp;
757 
758 };
void setRecompute_normals(bool val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
virtual const char * getParmName(exint fieldnum) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getParmValue(exint idx, UT_StringHolder &value) const
void getParmValue(exint idx, exint &value) const
void setParmValue(exint idx, const fpreal &value)
bool getRecompute_normals() const
fpreal64 opSmoothing_level(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
T & z(void)
Definition: UT_Vector4.h:379
void doGetParmValue(exint idx, T &value) const
void setLimit_above(bool val)
int64 getIterations() const
bool opVisualize_lfs(const SOP_NodeVerb::CookParms &cookparms) const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
const GLdouble * v
Definition: glcorearb.h:836
void setParmValue(exint idx, const exint &value)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setElement_sizing(int64 val)
fpreal64 getGradation() const
void setLimit_below(bool val)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
void getParmValue(exint idx, UT_Matrix4D &value) const
bool operator==(const SOP_RemeshParms &src) 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.
void setVisualize_lfs(bool val)
void setParmValue(exint idx, const UT_Matrix4D &value)
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
int64 getElement_sizing() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void save(std::ostream &os) const
static void saveData(std::ostream &os, bool v)
virtual void copyFrom(const SOP_NodeParms *src)
bool opLimit_above(const SOP_NodeVerb::CookParms &cookparms) const
virtual exint getNumParms() const
UT_StringHolder opHard_edges(const SOP_NodeVerb::CookParms &cookparms) const
void setMax_edge_length(fpreal64 val)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
void setHard_edges(const UT_StringHolder &val)
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, int64 &v)
void setSmoothing_level(fpreal64 val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setParmValue(exint idx, const UT_Vector2D &value)
fpreal64 getTarget_edge() const
void getParmValue(exint idx, UT_Vector4D &value) const
void setGradation(fpreal64 val)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
void getParmValue(exint idx, UT_Matrix3D &value) const
bool getLimit_above() const
int64 exint
Definition: SYS_Types.h:116
void setIterations(int64 val)
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
virtual ~SOP_RemeshParms()
fpreal64 getDensity() const
fpreal64 getMin_edge_length() const
void setGroup(const UT_StringHolder &val)
UT_SharedPtr< UT_Ramp > getLfs_ramp() const
void setLfs_only(bool val)
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, fpreal64 v)
int64 opElement_sizing(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setLfs_ramp(UT_SharedPtr< UT_Ramp > val)
static void loadData(UT_IStream &is, fpreal64 &v)
void setParmValue(exint idx, const UT_Vector3D &value)
GLboolean * data
Definition: glcorearb.h:130
static void saveData(std::ostream &os, int64 v)
void doSetParmValue(exint idx, const T &value)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opMin_edge_length(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getMax_edge_length() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
fpreal64 opGradation(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opLimit_below(const SOP_NodeVerb::CookParms &cookparms) const
virtual ParmType getParmType(exint fieldnum) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Vector3D &value) const
void getParmValue(exint idx, UT_Vector2D &value) const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
bool opLfs_only(const SOP_NodeVerb::CookParms &cookparms) const
void setTarget_edge(fpreal64 val)
fpreal64 opDensity(const SOP_NodeVerb::CookParms &cookparms) const
bool getInput_pts_only() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setDensity(fpreal64 val)
fpreal64 opMax_edge_length(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, fpreal &value) const
void setMin_edge_length(fpreal64 val)
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal64 opTarget_edge(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setInput_pts_only(bool val)
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void saveData(std::ostream &os, UT_Matrix4D v)
#define SOP_API
Definition: SOP_API.h:10
void setParmValue(exint idx, const UT_StringHolder &value)
void setParmValue(exint idx, const UT_Matrix3D &value)
bool getVisualize_lfs() const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
bool operator!=(const SOP_RemeshParms &src) const
T & x(void)
Definition: UT_Vector4.h:375
static void saveData(std::ostream &os, UT_Vector3D v)
bool getLfs_only() const
static int version()
UT_SharedPtr< UT_Ramp > opLfs_ramp(const SOP_NodeVerb::CookParms &cookparms) const
T & y(void)
Definition: UT_Vector2.h:287
static void loadData(UT_IStream &is, bool &v)
const UT_StringHolder & getHard_edges() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
GLboolean r
Definition: glcorearb.h:1221
void getParmValue(exint idx, UT_Matrix2D &value) const
void setParmValue(exint idx, const UT_Vector4D &value)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
T & w(void)
Definition: UT_Vector4.h:381
bool getLimit_below() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setParmValue(exint idx, const UT_Matrix2D &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
void getParmValue(exint idx, PRM_DataItemHandle &value) const
SYS_FORCE_INLINE bool isstring() const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
bool opInput_pts_only(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opRecompute_normals(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmoothing_level() const
GLenum src
Definition: glcorearb.h:1792