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