HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Geometry.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_Geometry_h__
10 #define __HOM_Geometry_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_BinaryString.h"
14 #include "HOM_Defines.h"
15 #include "HOM_Errors.h"
16 #include "HOM_IterableList.h"
17 #include "HOM_BoundingBox.h"
18 #include "HOM_Attrib.h"
19 #include "HOM_LopNode.h"
20 #include "HOM_LopSelectionRule.h"
21 #include <UT/UT_Tuple.h>
22 #include <vector>
23 #include <string>
24 
25 class HOM_AttribDataId;
26 class HOM_Edge;
27 class HOM_EdgeGroup;
28 class HOM_Face;
29 class HOM_GUDetailHandle;
30 class HOM_LopLockedStage;
31 class HOM_Matrix4;
32 class HOM_PackedGeometry;
33 class HOM_PackedPrim;
34 class HOM_Point;
35 class HOM_PointGroup;
36 class HOM_Polygon;
37 class HOM_Prim;
38 class HOM_PrimGroup;
39 class HOM_Selection;
40 class HOM_SopNode;
41 class HOM_Surface;
42 class HOM_VDB;
43 class HOM_Vector2;
44 class HOM_Vector3;
45 class HOM_Vertex;
46 class HOM_VertexGroup;
47 class HOM_Volume;
48 class HOMF_GeometryHandle;
49 
50 SWIGOUT(%rename(Geometry) HOM_Geometry;)
51 // Force SWIG to output an __init__ method even though it determines this
52 // class is abstract.
53 SWIGOUT(%feature("notabstract") HOM_Geometry;)
54 
56 {
57 public:
58 #ifdef SWIG
59 %extend
60 {
61  HOM_Geometry(HOM_Geometry *geo=nullptr, bool clone_data_ids=false)
62  { return HOM().newGeometry(geo, clone_data_ids); }
63 }
64 #else
66  { HOM_CONSTRUCT_OBJECT(this) }
68  { HOM_CONSTRUCT_OBJECT(this) }
69 #endif
70  virtual ~HOM_Geometry()
71  { HOM_DESTRUCT_OBJECT(this) }
72 
73  virtual std::string __repr__() = 0;
74 
75  SWIGOUT(%newobject sopNode;)
76  virtual HOM_SopNode *sopNode() = 0;
77  virtual int sopNodeOutputIndex() = 0;
78 
79  SWIGOUT(%newobject freeze;)
80  virtual HOM_Geometry *freeze(bool read_only=false,
81  bool clone_data_ids=false) = 0;
82 
83  SWIGOUT(%newobject iterPoints;)
84  virtual HOM_IterableList<HOM_Point> *iterPoints() = 0;
85 
86  virtual std::vector<HOM_ElemPtr<HOM_Point> > points() = 0;
87 
88  SWIGOUT(%newobject point;)
89  virtual HOM_Point *point(int index) = 0;
90 
91  SWIGOUT(%newobject iterPrims;)
92  virtual HOM_IterableList<HOM_Prim> *iterPrims() = 0;
93 
94  virtual std::vector<HOM_ElemPtr<HOM_Prim> > prims() = 0;
95 
96  SWIGOUT(%newobject prim;)
97  virtual HOM_Prim *prim(int index) = 0;
98 
99  virtual bool containsPrimType(const char *type_name) = 0;
100  virtual bool containsPrimType(HOM_EnumValue &prim_type) = 0;
101  virtual int64 countPrimType(const char *type_name) = 0;
102  virtual int64 countPrimType(HOM_EnumValue &prim_type) = 0;
103 
104  virtual int64 preferredPrecision() = 0;
105  virtual void setPreferredPrecision(int64 prec) = 0;
106 
107  virtual double averageMinDistance(
108  const HOM_Matrix4& local_transform,
109  HOM_Geometry& geometry,
110  const HOM_Matrix4& geometry_transform) = 0;
111 
112  virtual double averageEdgeLength() = 0;
113 
114  virtual std::vector<HOM_ElemPtr<HOM_Point> > globPoints(const char *pattern) = 0;
115 
116  //Allows for the points to be returned in the order they were added to the group.
117  virtual std::vector<HOM_ElemPtr<HOM_Point> > globPoints(const char *pattern, bool ordered) = 0;
118 
119  virtual std::vector<HOM_ElemPtr<HOM_Prim> > globPrims(const char *pattern) = 0;
120 
121  virtual std::vector<HOM_ElemPtr<HOM_Vertex> > globVertices(
122  const char *pattern) = 0;
123 
124  virtual std::vector<HOM_ElemPtr<HOM_Edge> > globEdges(const char *pattern) = 0;
125 
126  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > pointAttribs() = 0;
127 
128  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > primAttribs() = 0;
129 
130  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > vertexAttribs() = 0;
131 
132  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > globalAttribs() = 0;
133 
134 
135  SWIGOUT(%newobject findPointAttrib;)
136  virtual HOM_Attrib *findPointAttrib(const char *name) = 0;
137 
138  SWIGOUT(%newobject findPrimAttrib;)
139  virtual HOM_Attrib *findPrimAttrib(const char *name) = 0;
140 
141  SWIGOUT(%newobject findVertexAttrib;)
142  virtual HOM_Attrib *findVertexAttrib(const char *name) = 0;
143 
144  SWIGOUT(%newobject findGlobalAttrib;)
145  virtual HOM_Attrib *findGlobalAttrib(const char *name) = 0;
146 
147  virtual HOM_EnumValue& attribType() = 0;
148 
149 
150  // These methods return global (detail) attribute values.
151  virtual double floatAttribValue(const char *name) = 0;
152 
153  virtual double floatAttribValue(HOM_Attrib &attrib) = 0;
154 
155  virtual std::vector<double> floatListAttribValue(const char *name) = 0;
156 
157  virtual std::vector<double> floatListAttribValue(HOM_Attrib &attrib) = 0;
158 
159  virtual int64 intAttribValue(const char *name) = 0;
160 
161  virtual int64 intAttribValue(HOM_Attrib &attrib) = 0;
162 
163  virtual std::vector<int64> intListAttribValue(const char *name) = 0;
164 
165  virtual std::vector<int64> intListAttribValue(HOM_Attrib &attrib) = 0;
166 
167  virtual std::string stringAttribValue(const char *name) = 0;
168 
169  virtual std::string stringAttribValue(HOM_Attrib &attrib) = 0;
170 
171  virtual std::vector<std::string> stringListAttribValue(const char *name) = 0;
172 
173  virtual std::vector<std::string> stringListAttribValue(HOM_Attrib &attrib) = 0;
174 
175 
176  // These methods return/set arrays of point/primitive attribute values.
177  virtual std::vector<double> pointFloatAttribValues(const char *name) = 0;
178  SWIGOUT(%kwargs pointFloatAttribValuesAsString;)
179  virtual HOM_BinaryString pointFloatAttribValuesAsString(const char *name,
180  HOM_EnumValue &float_type = HOM_numericData::Float32) = 0;
181  virtual std::vector<double> primFloatAttribValues(const char *name) = 0;
182  SWIGOUT(%kwargs primFloatAttribValuesAsString;)
183  virtual HOM_BinaryString primFloatAttribValuesAsString(const char *name,
184  HOM_EnumValue &float_type = HOM_numericData::Float32) = 0;
185  virtual std::vector<double> vertexFloatAttribValues(const char *name) = 0;
186  SWIGOUT(%kwargs vertexFloatAttribValuesAsString;)
187  virtual HOM_BinaryString vertexFloatAttribValuesAsString(const char *name,
188  HOM_EnumValue &float_type = HOM_numericData::Float32) = 0;
189 
190  virtual std::vector<int64> pointIntAttribValues(const char *name) = 0;
191  SWIGOUT(%kwargs pointIntAttribValuesAsString;)
192  virtual HOM_BinaryString pointIntAttribValuesAsString(const char *name,
194  virtual std::vector<int64> primIntAttribValues(const char *name) = 0;
195  SWIGOUT(%kwargs primIntAttribValuesAsString;)
196  virtual HOM_BinaryString primIntAttribValuesAsString(const char *name,
198  virtual std::vector<int64> vertexIntAttribValues(const char *name) = 0;
199  SWIGOUT(%kwargs vertexIntAttribValuesAsString;)
200  virtual HOM_BinaryString vertexIntAttribValuesAsString(const char *name,
202 
203  virtual std::vector<std::string> pointStringAttribValues(const char *name) = 0;
204  virtual std::vector<std::string> primStringAttribValues(const char *name) = 0;
205  virtual std::vector<std::string> vertexStringAttribValues(const char *name) = 0;
206 
207  virtual void setPointFloatAttribValues(
208  const char *name, const std::vector<double> &values) = 0;
209  virtual void setPrimFloatAttribValues(
210  const char *name, const std::vector<double> &values) = 0;
211  virtual void setVertexFloatAttribValues(
212  const char *name, const std::vector<double> &values) = 0;
213 
214  SWIGOUT(%ignore opaqueSetPointFloatAttribValuesFromString);
215  virtual void opaqueSetPointFloatAttribValuesFromString(
216  const char *name, const char *values, int64 length,
217  HOM_EnumValue &float_type) = 0;
218  SWIGOUT(%ignore opaqueSetPrimFloatAttribValuesFromString);
219  virtual void opaqueSetPrimFloatAttribValuesFromString(
220  const char *name, const char *values, int64 length,
221  HOM_EnumValue &float_type) = 0;
222  SWIGOUT(%ignore opaqueSetVertexFloatAttribValuesFromString);
223  virtual void opaqueSetVertexFloatAttribValuesFromString(
224  const char *name, const char *values, int64 length,
225  HOM_EnumValue &float_type) = 0;
226 
227 #ifdef SWIG
228 %extend
229 {
230  %kwargs setPointFloatAttribValuesFromString;
231  void setPointFloatAttribValuesFromString(
232  const char *name, InterpreterObject values,
233  HOM_EnumValue &float_type = HOM_numericData::Float32)
234  {
235  HOM_PyBuffer buffer(values);
236  self->opaqueSetPointFloatAttribValuesFromString(
237  name, (const char *)buffer.myData, buffer.myLength, float_type);
238  }
239 
240  %kwargs setPrimFloatAttribValuesFromString;
241  void setPrimFloatAttribValuesFromString(
242  const char *name, InterpreterObject values,
243  HOM_EnumValue &float_type = HOM_numericData::Float32)
244  {
245  HOM_PyBuffer buffer(values);
246  self->opaqueSetPrimFloatAttribValuesFromString(
247  name, (const char *)buffer.myData, buffer.myLength, float_type);
248  }
249 
250  %kwargs setVertexFloatAttribValuesFromString;
251  void setVertexFloatAttribValuesFromString(
252  const char *name, InterpreterObject values,
253  HOM_EnumValue &float_type = HOM_numericData::Float32)
254  {
255  HOM_PyBuffer buffer(values);
256  self->opaqueSetVertexFloatAttribValuesFromString(
257  name, (const char *)buffer.myData, buffer.myLength, float_type);
258  }
259 }
260 #endif
261 
262  virtual void setPointIntAttribValues(
263  const char *name, const std::vector<int64> &values) = 0;
264  virtual void setPrimIntAttribValues(
265  const char *name, const std::vector<int64> &values) = 0;
266  virtual void setVertexIntAttribValues(
267  const char *name, const std::vector<int64> &values) = 0;
268 
269  SWIGOUT(%ignore opaqueSetPointIntAttribValuesFromString);
270  virtual void opaqueSetPointIntAttribValuesFromString(
271  const char *name, const char *values, int64 length,
272  HOM_EnumValue &int_type) = 0;
273  SWIGOUT(%ignore opaqueSetPrimIntAttribValuesFromString);
274  virtual void opaqueSetPrimIntAttribValuesFromString(
275  const char *name, const char *values, int64 length,
276  HOM_EnumValue &int_type) = 0;
277  SWIGOUT(%ignore opaqueSetVertexIntAttribValuesFromString);
278  virtual void opaqueSetVertexIntAttribValuesFromString(
279  const char *name, const char *values, int64 length,
280  HOM_EnumValue &int_type) = 0;
281 
282 #ifdef SWIG
283 %extend
284 {
285  %kwargs setPointIntAttribValuesFromString;
286  void setPointIntAttribValuesFromString(
287  const char *name, InterpreterObject values,
289  {
290  HOM_PyBuffer buffer(values);
291  self->opaqueSetPointIntAttribValuesFromString(
292  name, (const char *)buffer.myData, buffer.myLength, int_type);
293  }
294 
295  %kwargs setPrimIntAttribValuesFromString;
296  void setPrimIntAttribValuesFromString(
297  const char *name, InterpreterObject values,
299  {
300  HOM_PyBuffer buffer(values);
301  self->opaqueSetPrimIntAttribValuesFromString(
302  name, (const char *)buffer.myData, buffer.myLength, int_type);
303  }
304 
305  %kwargs setVertexIntAttribValuesFromString;
306  void setVertexIntAttribValuesFromString(
307  const char *name, InterpreterObject values,
309  {
310  HOM_PyBuffer buffer(values);
311  self->opaqueSetVertexIntAttribValuesFromString(
312  name, (const char *)buffer.myData, buffer.myLength, int_type);
313  }
314 }
315 #endif
316 
317  virtual void setPointStringAttribValues(
318  const char *name, const std::vector<std::string> &values) = 0;
319  virtual void setPrimStringAttribValues(
320  const char *name, const std::vector<std::string> &values) = 0;
321  virtual void setVertexStringAttribValues(
322  const char *name, const std::vector<std::string> &values) = 0;
323 
324  virtual void renamePointAttrib(const char *old_name, const char *new_name) = 0;
325  virtual void renamePrimAttrib(const char *old_name, const char *new_name) = 0;
326  virtual void renameVertexAttrib(const char *old_name, const char *new_name) = 0;
327  virtual void renameGlobalAttrib(const char *old_name, const char *new_name) = 0;
328 
329  SWIGOUT(%newobject createPoint;)
330  virtual HOM_Point *createPoint() = 0;
331  virtual std::vector<HOM_ElemPtr<HOM_Point> >createPoints(
332  const std::vector<std::vector<double> > &point_positions) = 0;
333  virtual std::vector<HOM_ElemPtr<HOM_Point> >createPoints(
334  const std::vector<HOM_Vector3 *> &point_positions) = 0;
335 
336  SWIGOUT(%newobject createPolygon;)
337  virtual HOM_Polygon *createPolygon(bool is_closed=true) = 0;
338  virtual std::vector<HOM_ElemPtr<HOM_Polygon> >createPolygons(
339  const std::vector<std::vector<HOM_Point *> > &points,
340  bool is_closed=true) = 0;
341  virtual std::vector<HOM_ElemPtr<HOM_Polygon> >createPolygons(
342  const std::vector<std::vector<int> > &point_numbers,
343  bool is_closed=true) = 0;
344 
345  SWIGOUT(%newobject createPacked;)
346  virtual HOM_PackedPrim *createPacked(
347  const char *packed_type,
348  HOM_Point *point = nullptr) = 0;
349 
350  SWIGOUT(%newobject createTetrahedron;)
351  virtual HOM_Prim *createTetrahedron() = 0;
352 
353  SWIGOUT(%newobject createTetrahedronInPlace;)
354  virtual HOM_Prim *createTetrahedronInPlace(HOM_Point *p0, HOM_Point *p1,
355  HOM_Point *p2, HOM_Point *p3) = 0;
356 
357  SWIGOUT(%newobject createNURBSCurve;)
358  SWIGOUT(%kwargs createNURBSCurve;)
359  virtual HOM_Face *createNURBSCurve(int num_points=4, bool is_closed=false,
360  int order=4) = 0;
361 
362  SWIGOUT(%newobject createBezierCurve;)
363  SWIGOUT(%kwargs createBezierCurve;)
364  virtual HOM_Face *createBezierCurve(int num_points=4, bool is_closed=false,
365  int order=4) = 0;
366 
367  SWIGOUT(%newobject createNURBSSurface;)
368  SWIGOUT(%kwargs createNURBSSurface;)
369  virtual HOM_Surface *createNURBSSurface(
370  int rows, int cols,
371  bool is_closed_in_u=false, bool is_closed_in_v=false,
372  int order_u=4, int order_v=4) = 0;
373 
374  SWIGOUT(%newobject createBezierSurface;)
375  SWIGOUT(%kwargs createBezierSurface;)
376  virtual HOM_Surface *createBezierSurface(
377  int rows, int cols,
378  bool is_closed_in_u=false, bool is_closed_in_v=false,
379  int order_u=4, int order_v=4) = 0;
380 
381  SWIGOUT(%newobject createMeshSurface;)
382  SWIGOUT(%kwargs createMeshSurface;)
383  virtual HOM_Surface *createMeshSurface(
384  int rows, int cols,
385  bool is_closed_in_u=false, bool is_closed_in_v=false) = 0;
386 
387  SWIGOUT(%newobject createVolume;)
388  SWIGOUT(%kwargs createVolume;)
389  virtual HOM_Volume *createVolume(
390  int xres, int yres, int zres, HOM_BoundingBox *bounding_box=NULL) = 0;
391 
392 
393  virtual void transform(HOM_Matrix4 &matrix) = 0;
394 
395  virtual void transformPrims(
396  const std::vector<HOM_Prim *> &prims, HOM_Matrix4 &matrix) = 0;
397 
398  SWIGOUT(%kwargs deletePrims;)
399  virtual void deletePrims(
400  const std::vector<HOM_Prim *> &prims, bool keep_points=false) = 0;
401 
402  SWIGOUT(%kwargs deletePrimsOutsideBoundingBox;)
403  virtual void deletePrimsOutsideBoundingBox(
404  const HOM_BoundingBox &bbox) = 0;
405 
406  virtual void deletePoints(const std::vector<HOM_Point *> &points) = 0;
407 
408 
409  // Swig does not allow keyword arguments for overloaded functions, so
410  // addAttrib is wrapped in houpythonportion.py to enable keyword
411  // arguments. If you want to change the signature of addAttrib, you must
412  // also edit houpythonportion.py.
413  SWIGOUT(%newobject addAttrib;)
414  virtual HOM_Attrib *addAttrib(
415  HOM_EnumValue &type, const char *name,
416  int64 default_value,
417  bool transform_as_normal,
418  bool create_local_variable) = 0;
419 
420  virtual HOM_Attrib *addAttrib(
421  HOM_EnumValue &type, const char *name,
422  double default_value,
423  bool transform_as_normal,
424  bool create_local_variable) = 0;
425 
426  virtual HOM_Attrib *addAttrib(
427  HOM_EnumValue &type, const char *name,
428  const char *default_value,
429  bool transform_as_normal,
430  bool create_local_variable) = 0;
431 
432  virtual HOM_Attrib *addAttrib(
434  const char *name,
435  const std::vector<int64> &default_value,
436  bool transform_as_normal,
437  bool create_local_variable) = 0;
438 
439  virtual HOM_Attrib *addAttrib(
441  const char *name,
442  const std::vector<double> &default_value,
443  bool transform_as_normal,
444  bool create_local_variable) = 0;
445 
446  virtual HOM_Attrib *addAttrib(
448  const char *name,
449  const std::vector<std::string> &default_value,
450  bool transform_as_normal,
451  bool create_local_variable) = 0;
452 
453  SWIGOUT(%kwargs addArrayAttrib;)
454  SWIGOUT(%newobject addArrayAttrib;)
455  virtual HOM_Attrib *addArrayAttrib(
456  HOM_EnumValue &type, const char *name,
457  HOM_EnumValue &data_type,
458  int64 tuple_size = 1) = 0;
459 
460 
461  virtual void setGlobalAttribValue(
462  HOM_Attrib &attrib, int64 attrib_value) = 0;
463  virtual void setGlobalAttribValue(
464  HOM_Attrib &attrib, double attrib_value) = 0;
465  virtual void setGlobalAttribValue(
466  HOM_Attrib &attrib, const char *attrib_value) = 0;
467  virtual void setGlobalAttribValue(
468  HOM_Attrib &attrib, const std::vector<int64> &attrib_value) = 0;
469  virtual void setGlobalAttribValue(
470  HOM_Attrib &attrib, const std::vector<double> &attrib_value) = 0;
471  virtual void setGlobalAttribValue(
472  HOM_Attrib &attrib, const std::vector<std::string> &attrib_value) = 0;
473 
474  virtual void setGlobalAttribValue(
475  const char *attrib_name, int64 attrib_value) = 0;
476  virtual void setGlobalAttribValue(
477  const char *attrib_name, double attrib_value) = 0;
478  virtual void setGlobalAttribValue(
479  const char *attrib_name, const char *attrib_value) = 0;
480  // Note that, because of strangess the with way swig works when deciding
481  // which overloaded method to call, it's very important that we list the
482  // vector of ints before the vector of doubles. Otherwise, swig will call
483  // the double version when you pass in a vector of ints.
484  virtual void setGlobalAttribValue(
485  const char *attrib_name, const std::vector<int64> &attrib_value) = 0;
486  virtual void setGlobalAttribValue(
487  const char *attrib_name, const std::vector<double> &attrib_value) = 0;
488  virtual void setGlobalAttribValue(
489  const char *attrib_name,
490  const std::vector<std::string> &attrib_value) = 0;
491 
492 #ifdef SWIG
493 %extend
494 {
495  InterpreterObject attribValue(const char *name)
496  { return HOMattribValue(*self, name); }
497 
498  InterpreterObject attribValue(HOM_Attrib &attrib)
499  { return HOMattribValue(*self, attrib); }
500 }
501 #endif
502 
503  virtual std::vector<std::string> attributeCaptureRegions() = 0;
504  virtual std::vector<std::string> attributeCaptureObjectPaths() = 0;
505 
506 
507  virtual std::vector<std::string> intrinsicNames() = 0;
508 
509  virtual hboost::any intrinsicValue(
510  const char *intrinsic_name) = 0;
511  virtual size_t intrinsicSize(const char *intrinsic_name) = 0;
512  virtual bool intrinsicReadOnly(const char *intrinsic_name) = 0;
513 
514  virtual void setIntrinsicValue(const char *intrinsic_name, double value) = 0;
515  virtual void setIntrinsicValue(const char *intrinsic_name, int value) = 0;
516  virtual void setIntrinsicValue(const char *intrinsic_name, int64 value) = 0;
517  virtual void setIntrinsicValue(
518  const char *intrinsic_name, const char *value) = 0;
519  virtual void setIntrinsicValue(
520  const char *intrinsic_name, const std::vector<double> &value) = 0;
521  virtual void setIntrinsicValue(
522  const char *intrinsic_name, const std::vector<int> &value) = 0;
523  virtual void setIntrinsicValue(
524  const char *intrinsic_name, const std::vector<int64> &value) = 0;
525  virtual void setIntrinsicValue(
526  const char *intrinsic_name, const std::vector<std::string> &value) = 0;
527 
528  virtual HOM_BinaryString data() = 0;
529 
530  virtual void saveToFile(const char *file_name) = 0;
531 
532  virtual void loadFromFile(const char *file_name) = 0;
533 
534  virtual void merge(HOM_Geometry &geometry, bool clone_data_ids=false) = 0;
535 
536  virtual void clear() = 0;
537 
538  SWIGOUT(%kwargs intersect;)
539  virtual int intersect(
540  const HOM_Vector3 &rayorig, const HOM_Vector3 &dir,
542  const char *pattern = nullptr, float min_hit=1e-2f, float max_hit=1e18f,
543  float tolerance=1e-2F) = 0;
544 
545  virtual std::vector<int> _orderedPoints(
546  const char *groupname,
547  const char *corner_groupname,
548  HOM_Vector2 &dimensions) = 0;
549 
550  virtual std::vector<HOM_ElemPtr<HOM_PointGroup> > pointGroups() = 0;
551 
552  SWIGOUT(%newobject findPointGroup;)
553  virtual HOM_PointGroup *findPointGroup(const char *name) = 0;
554 
555  SWIGOUT(%newobject createPointGroup;)
556  virtual HOM_PointGroup *createPointGroup(
557  const char *name, bool is_ordered=false) = 0;
558 
559 
560  virtual std::vector<HOM_ElemPtr<HOM_PrimGroup> > primGroups() = 0;
561 
562  SWIGOUT(%newobject findPrimGroup;)
563  virtual HOM_PrimGroup *findPrimGroup(const char *name) = 0;
564 
565  SWIGOUT(%newobject createPrimGroup;)
566  virtual HOM_PrimGroup *createPrimGroup(
567  const char *name, bool is_ordered=false) = 0;
568 
569  virtual std::vector<HOM_ElemPtr<HOM_EdgeGroup> > edgeGroups() = 0;
570 
571  SWIGOUT(%newobject findEdgeGroup;)
572  virtual HOM_EdgeGroup *findEdgeGroup(const char *name) = 0;
573 
574  SWIGOUT(%newobject createEdgeGroup;)
575  virtual HOM_EdgeGroup *createEdgeGroup(
576  const char *name) = 0;
577 
578  virtual std::vector<HOM_ElemPtr<HOM_VertexGroup> > vertexGroups() = 0;
579 
580  SWIGOUT(%newobject findVertexGroup;)
581  virtual HOM_VertexGroup *findVertexGroup(const char *name) = 0;
582 
583  SWIGOUT(%newobject createVertexGroup;)
584  virtual HOM_VertexGroup *createVertexGroup(
585  const char *name, bool is_ordered=false) = 0;
586 
587  SWIGOUT(%newobject findEdge;)
588  virtual HOM_Edge *findEdge(HOM_Point * p0, HOM_Point * p1) = 0;
589 
590  virtual HOM_BoundingBox boundingBox(HOM_Matrix4* transform = nullptr) = 0;
591  virtual HOM_BoundingBox pointBoundingBox(const char *ptgroup) = 0;
592  virtual HOM_BoundingBox primBoundingBox(const char *primgroup) = 0;
593 
594  virtual UT_Tuple<HOM_ElemPtr<HOM_Prim>, double, double, double>
595  nearestPrim(const std::vector<double> &position) = 0;
596 
597  SWIGOUT(%newobject nearestPoint;)
598  SWIGOUT(%kwargs nearestPoint;)
599  virtual HOM_Point *
600  nearestPoint(const std::vector<double> &position,
601  const char *ptgroup = nullptr,
602  double max_radius = 1e+18f) = 0;
603 
604  SWIGOUT(%kwargs nearestPoints;)
605  virtual std::vector<HOM_ElemPtr<HOM_Point> >
606  nearestPoints(const std::vector<double> &position,
607  int64 max_points,
608  const char *ptgroup = nullptr,
609  double max_radius = 1e+18f) = 0;
610 
611  SWIGOUT(%kwargs primLoop;)
612  virtual std::vector<HOM_ElemPtr<HOM_Prim> >
613  primLoop(std::vector<HOM_Prim *> prims,
614  HOM_EnumValue &loop_type = HOM_componentLoopType::Partial) = 0;
615  SWIGOUT(%kwargs pointLoop;)
616  virtual std::vector<HOM_ElemPtr<HOM_Point> >
617  pointLoop(std::vector<HOM_Point *> points,
618  HOM_EnumValue &loop_type = HOM_componentLoopType::Partial) = 0;
619  SWIGOUT(%kwargs edgeLoop;)
620  virtual std::vector<HOM_ElemPtr<HOM_Edge> >
621  edgeLoop(std::vector<HOM_Edge *> edges,
622  HOM_EnumValue &loop_type = HOM_componentLoopType::Partial,
623  bool full_loop_per_edge = true,
624  bool force_ring = false,
625  bool allow_ring = true) = 0;
626 
627  virtual std::vector<HOM_Vector3>
628  pointNormals(const std::vector<HOM_Point *> &points) = 0;
629 
630  SWIGOUT(%newobject importLop;)
631  SWIGOUT(%kwargs importLop;)
632  virtual HOM_LopLockedStage *
633  importLop(
634  HOM_LopNode &lopnode,
635  HOM_LopSelectionRule &selection_rule,
636  const char *purpose = NULL,
637  const char *traversal = NULL,
638  const char *path_attrib_name = NULL,
639  const char *name_attrib_name = NULL,
640  bool strip_layers = false) = 0;
641 
642 
643  SWIGOUT(%newobject selection;)
644  virtual HOM_Selection *selection() = 0;
645 
646  // This method is not documented in the user documentation. See
647  // the comments in HOMF_Geometry.C for what it does.
648  SWIGOUT(%newobject _guDetailHandle;)
649  virtual HOM_GUDetailHandle *_guDetailHandle() = 0;
650 
651  // This method is not documented in the user documentation. See the
652  // comments in HOMF_Geometry.C for what it does.
653  virtual HOMF_GeometryHandle& _geometryHandle() = 0;
654 
655  virtual std::vector<int> vexAttribDataId() = 0;
656 
657  virtual int64 modificationCounter() = 0;
658  virtual void incrementModificationCounter() = 0;
659 
660  virtual void incrementAllDataIds() = 0;
661 
662  SWIGOUT(%kwargs incrementDataIdsForAddOrRemove;)
663  virtual void incrementDataIdsForAddOrRemove(
664  bool for_points=true, bool for_prims=true) = 0;
665 
666  SWIGOUT(%newobject primitiveIntrinsicsDataId;)
667  virtual HOM_AttribDataId *primitiveIntrinsicsDataId() = 0;
668  virtual void incrementPrimitiveIntrinsicsDataId() = 0;
669 
670  SWIGOUT(%newobject topologyDataId;)
671  virtual HOM_AttribDataId *topologyDataId() = 0;
672  virtual void incrementTopologyDataId() = 0;
673 
674  SWIGOUT(%kwargs generateAttribMenu;)
675  virtual std::vector<std::string> generateAttribMenu(
676  HOM_EnumValue *attrib_type = nullptr,
677  HOM_EnumValue *data_type = nullptr,
678  int min_size = 1,
679  int max_size = -1,
680  bool array_type = true,
681  bool scalar_type = true,
682  bool case_sensitive = true,
683  const char *pattern = "*") = 0;
684 
685  // Wrapped in houpythonportion to handle kwargs for an overloaded method.
686  virtual std::vector<std::string> _generateGroupMenu(
687  const std::vector<HOM_EnumValue *> &group_types,
688  bool include_selection,
689  bool include_name_attrib,
690  bool case_sensitive,
691  const char *pattern) = 0;
692 };
693 
694 #endif
GT_API const UT_StringHolder selection
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1133
GLuint const GLchar * name
Definition: glew.h:1814
GLuint GLenum GLenum transform
Definition: glew.h:14742
GLuint index
Definition: glew.h:1814
OIIO_API bool rename(string_view from, string_view to, std::string &err)
GLint GLsizei const GLuint64 * values
Definition: glew.h:3612
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
std::tuple< Types...> UT_Tuple
Definition: UT_Tuple.h:53
virtual HOM_Geometry * newGeometry(HOM_Geometry *geo=nullptr, bool clone_data_ids=false)=0
GLuint GLdouble GLdouble GLint GLint order
Definition: glew.h:3446
long long int64
Definition: SYS_Types.h:111
bool intersect(const Line3< T > &line, const Vec3< T > &v0, const Vec3< T > &v1, const Vec3< T > &v2, Vec3< T > &pt, Vec3< T > &barycentric, bool &front)
GLclampf f
Definition: glew.h:3499
bool any(const vbool4 &v)
Definition: simd.h:3372
#define HOM_API
Definition: HOM_API.h:13
HOM_Geometry(const HOM_Geometry &)
Definition: HOM_Geometry.h:67
GLuint buffer
Definition: glew.h:1680
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1132
GLsizei n
Definition: glew.h:4040
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1253
GLfloat GLfloat p
Definition: glew.h:16321
GLsizei const GLchar *const * string
Definition: glew.h:1844
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glew.h:3446
virtual ~HOM_Geometry()
Definition: HOM_Geometry.h:70
GLubyte * pattern
Definition: glew.h:5711
HOM_API HOM_Module & HOM()
GLsizei const GLfloat * value
Definition: glew.h:1849
GLuint GLenum matrix
Definition: glew.h:14742