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 <UT/UT_Tuple.h>
20 #include <vector>
21 #include <string>
22 
23 class HOM_Point;
24 class HOM_Vertex;
25 class HOM_Prim;
26 class HOM_Edge;
27 class HOM_Face;
28 class HOM_Polygon;
29 class HOM_Surface;
30 class HOM_PackedPrim;
31 class HOM_Volume;
32 class HOM_VDB;
33 class HOM_PointGroup;
34 class HOM_PrimGroup;
35 class HOM_EdgeGroup;
36 class HOM_SopNode;
37 class HOM_Vector2;
38 class HOM_Vector3;
39 class HOM_Matrix4;
40 class HOM_GUDetailHandle;
41 class HOM_Selection;
42 
43 SWIGOUT(%rename(Geometry) HOM_Geometry;)
44 // Force SWIG to output an __init__ method even though it determines this
45 // class is abstract.
46 SWIGOUT(%feature("notabstract") HOM_Geometry;)
47 
49 {
50 public:
51 #ifdef SWIG
52 %extend
53 {
54  HOM_Geometry()
55  { return HOM().newGeometry(); }
57  { return HOM().newGeometry(geo); }
58 }
59 #else
61  { HOM_CONSTRUCT_OBJECT(this) }
63  { HOM_CONSTRUCT_OBJECT(this) }
64 #endif
65  virtual ~HOM_Geometry()
66  { HOM_DESTRUCT_OBJECT(this) }
67 
68  virtual std::string __repr__() = 0;
69 
70  SWIGOUT(%newobject sopNode;)
71  virtual HOM_SopNode *sopNode() = 0;
72  virtual int sopNodeOutputIndex() = 0;
73 
74  SWIGOUT(%newobject freeze;)
75  virtual HOM_Geometry *freeze(bool read_only=false) = 0;
76 
77  SWIGOUT(%newobject iterPoints;)
78  virtual HOM_IterableList<HOM_Point> *iterPoints() = 0;
79 
80  virtual std::vector<HOM_ElemPtr<HOM_Point> > points() = 0;
81 
82  SWIGOUT(%newobject point;)
83  virtual HOM_Point *point(int index) = 0;
84 
85  SWIGOUT(%newobject iterPrims;)
86  virtual HOM_IterableList<HOM_Prim> *iterPrims() = 0;
87 
88  virtual std::vector<HOM_ElemPtr<HOM_Prim> > prims() = 0;
89 
90  SWIGOUT(%newobject prim;)
91  virtual HOM_Prim *prim(int index) = 0;
92 
93  virtual bool containsPrimType(const char *type_name) = 0;
94  virtual bool containsPrimType(HOM_EnumValue &prim_type) = 0;
95  virtual int64 countPrimType(const char *type_name) = 0;
96  virtual int64 countPrimType(HOM_EnumValue &prim_type) = 0;
97 
98  virtual double averageMinDistance(
99  const HOM_Matrix4& local_transform,
100  HOM_Geometry& geometry,
101  const HOM_Matrix4& geometry_transform) = 0;
102 
103  virtual double averageEdgeLength() = 0;
104 
105  virtual std::vector<HOM_ElemPtr<HOM_Point> > globPoints(const char *pattern) = 0;
106 
107  virtual std::vector<HOM_ElemPtr<HOM_Prim> > globPrims(const char *pattern) = 0;
108 
109  virtual std::vector<HOM_ElemPtr<HOM_Vertex> > globVertices(
110  const char *pattern) = 0;
111 
112  virtual std::vector<HOM_ElemPtr<HOM_Edge> > globEdges(const char *pattern) = 0;
113 
114  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > pointAttribs() = 0;
115 
116  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > primAttribs() = 0;
117 
118  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > vertexAttribs() = 0;
119 
120  virtual std::vector<HOM_ElemPtr<HOM_Attrib> > globalAttribs() = 0;
121 
122 
123  SWIGOUT(%newobject findPointAttrib;)
124  virtual HOM_Attrib *findPointAttrib(const char *name) = 0;
125 
126  SWIGOUT(%newobject findPrimAttrib;)
127  virtual HOM_Attrib *findPrimAttrib(const char *name) = 0;
128 
129  SWIGOUT(%newobject findVertexAttrib;)
130  virtual HOM_Attrib *findVertexAttrib(const char *name) = 0;
131 
132  SWIGOUT(%newobject findGlobalAttrib;)
133  virtual HOM_Attrib *findGlobalAttrib(const char *name) = 0;
134 
135  virtual HOM_EnumValue& attribType() = 0;
136 
137 
138  // These methods return global (detail) attribute values.
139  virtual double floatAttribValue(const char *name) = 0;
140 
141  virtual double floatAttribValue(HOM_Attrib &attrib) = 0;
142 
143  virtual std::vector<double> floatListAttribValue(const char *name) = 0;
144 
145  virtual std::vector<double> floatListAttribValue(HOM_Attrib &attrib) = 0;
146 
147  virtual int64 intAttribValue(const char *name) = 0;
148 
149  virtual int64 intAttribValue(HOM_Attrib &attrib) = 0;
150 
151  virtual std::vector<int64> intListAttribValue(const char *name) = 0;
152 
153  virtual std::vector<int64> intListAttribValue(HOM_Attrib &attrib) = 0;
154 
155  virtual std::string stringAttribValue(const char *name) = 0;
156 
157  virtual std::string stringAttribValue(HOM_Attrib &attrib) = 0;
158 
159  virtual std::vector<std::string> stringListAttribValue(const char *name) = 0;
160 
161  virtual std::vector<std::string> stringListAttribValue(HOM_Attrib &attrib) = 0;
162 
163 
164  // These methods return/set arrays of point/primitive attribute values.
165  virtual std::vector<double> pointFloatAttribValues(const char *name) = 0;
166  SWIGOUT(%kwargs pointFloatAttribValuesAsString;)
167  virtual HOM_BinaryString pointFloatAttribValuesAsString(const char *name,
168  HOM_EnumValue &float_type = HOM_numericData::Float32) = 0;
169  virtual std::vector<double> primFloatAttribValues(const char *name) = 0;
170  SWIGOUT(%kwargs primFloatAttribValuesAsString;)
171  virtual HOM_BinaryString primFloatAttribValuesAsString(const char *name,
172  HOM_EnumValue &float_type = HOM_numericData::Float32) = 0;
173  virtual std::vector<double> vertexFloatAttribValues(const char *name) = 0;
174  SWIGOUT(%kwargs vertexFloatAttribValuesAsString;)
175  virtual HOM_BinaryString vertexFloatAttribValuesAsString(const char *name,
176  HOM_EnumValue &float_type = HOM_numericData::Float32) = 0;
177 
178  virtual std::vector<int64> pointIntAttribValues(const char *name) = 0;
179  SWIGOUT(%kwargs pointIntAttribValuesAsString;)
180  virtual HOM_BinaryString pointIntAttribValuesAsString(const char *name,
181  HOM_EnumValue &int_type = HOM_numericData::Int32) = 0;
182  virtual std::vector<int64> primIntAttribValues(const char *name) = 0;
183  SWIGOUT(%kwargs primIntAttribValuesAsString;)
184  virtual HOM_BinaryString primIntAttribValuesAsString(const char *name,
185  HOM_EnumValue &int_type = HOM_numericData::Int32) = 0;
186  virtual std::vector<int64> vertexIntAttribValues(const char *name) = 0;
187  SWIGOUT(%kwargs vertexIntAttribValuesAsString;)
188  virtual HOM_BinaryString vertexIntAttribValuesAsString(const char *name,
189  HOM_EnumValue &int_type = HOM_numericData::Int32) = 0;
190 
191  virtual std::vector<std::string> pointStringAttribValues(const char *name) = 0;
192  virtual std::vector<std::string> primStringAttribValues(const char *name) = 0;
193  virtual std::vector<std::string> vertexStringAttribValues(const char *name) = 0;
194 
195  virtual void setPointFloatAttribValues(
196  const char *name, const std::vector<double> &values) = 0;
197  virtual void setPrimFloatAttribValues(
198  const char *name, const std::vector<double> &values) = 0;
199  virtual void setVertexFloatAttribValues(
200  const char *name, const std::vector<double> &values) = 0;
201 
202  SWIGOUT(%ignore opaqueSetPointFloatAttribValuesFromString);
203  virtual void opaqueSetPointFloatAttribValuesFromString(
204  const char *name, const char *values, int64 length,
205  HOM_EnumValue &float_type) = 0;
206  SWIGOUT(%ignore opaqueSetPrimFloatAttribValuesFromString);
207  virtual void opaqueSetPrimFloatAttribValuesFromString(
208  const char *name, const char *values, int64 length,
209  HOM_EnumValue &float_type) = 0;
210  SWIGOUT(%ignore opaqueSetVertexFloatAttribValuesFromString);
211  virtual void opaqueSetVertexFloatAttribValuesFromString(
212  const char *name, const char *values, int64 length,
213  HOM_EnumValue &float_type) = 0;
214 
215 #ifdef SWIG
216 %extend
217 {
218  %kwargs setPointFloatAttribValuesFromString;
219  void setPointFloatAttribValuesFromString(
220  const char *name, InterpreterObject values,
221  HOM_EnumValue &float_type = HOM_numericData::Float32)
222  {
223  HOM_PyBuffer buffer(values);
224  self->opaqueSetPointFloatAttribValuesFromString(
225  name, (const char *)buffer.myData, buffer.myLength, float_type);
226  }
227 
228  %kwargs setPrimFloatAttribValuesFromString;
229  void setPrimFloatAttribValuesFromString(
230  const char *name, InterpreterObject values,
231  HOM_EnumValue &float_type = HOM_numericData::Float32)
232  {
233  HOM_PyBuffer buffer(values);
234  self->opaqueSetPrimFloatAttribValuesFromString(
235  name, (const char *)buffer.myData, buffer.myLength, float_type);
236  }
237 
238  %kwargs setVertexFloatAttribValuesFromString;
239  void setVertexFloatAttribValuesFromString(
240  const char *name, InterpreterObject values,
241  HOM_EnumValue &float_type = HOM_numericData::Float32)
242  {
243  HOM_PyBuffer buffer(values);
244  self->opaqueSetVertexFloatAttribValuesFromString(
245  name, (const char *)buffer.myData, buffer.myLength, float_type);
246  }
247 }
248 #endif
249 
250  virtual void setPointIntAttribValues(
251  const char *name, const std::vector<int64> &values) = 0;
252  virtual void setPrimIntAttribValues(
253  const char *name, const std::vector<int64> &values) = 0;
254  virtual void setVertexIntAttribValues(
255  const char *name, const std::vector<int64> &values) = 0;
256 
257  SWIGOUT(%ignore opaqueSetPointIntAttribValuesFromString);
258  virtual void opaqueSetPointIntAttribValuesFromString(
259  const char *name, const char *values, int64 length,
260  HOM_EnumValue &int_type) = 0;
261  SWIGOUT(%ignore opaqueSetPrimIntAttribValuesFromString);
262  virtual void opaqueSetPrimIntAttribValuesFromString(
263  const char *name, const char *values, int64 length,
264  HOM_EnumValue &int_type) = 0;
265  SWIGOUT(%ignore opaqueSetVertexIntAttribValuesFromString);
266  virtual void opaqueSetVertexIntAttribValuesFromString(
267  const char *name, const char *values, int64 length,
268  HOM_EnumValue &int_type) = 0;
269 
270 #ifdef SWIG
271 %extend
272 {
273  %kwargs setPointIntAttribValuesFromString;
274  void setPointIntAttribValuesFromString(
275  const char *name, InterpreterObject values,
277  {
278  HOM_PyBuffer buffer(values);
279  self->opaqueSetPointIntAttribValuesFromString(
280  name, (const char *)buffer.myData, buffer.myLength, int_type);
281  }
282 
283  %kwargs setPrimIntAttribValuesFromString;
284  void setPrimIntAttribValuesFromString(
285  const char *name, InterpreterObject values,
287  {
288  HOM_PyBuffer buffer(values);
289  self->opaqueSetPrimIntAttribValuesFromString(
290  name, (const char *)buffer.myData, buffer.myLength, int_type);
291  }
292 
293  %kwargs setVertexIntAttribValuesFromString;
294  void setVertexIntAttribValuesFromString(
295  const char *name, InterpreterObject values,
297  {
298  HOM_PyBuffer buffer(values);
299  self->opaqueSetVertexIntAttribValuesFromString(
300  name, (const char *)buffer.myData, buffer.myLength, int_type);
301  }
302 }
303 #endif
304 
305  virtual void setPointStringAttribValues(
306  const char *name, const std::vector<std::string> &values) = 0;
307  virtual void setPrimStringAttribValues(
308  const char *name, const std::vector<std::string> &values) = 0;
309  virtual void setVertexStringAttribValues(
310  const char *name, const std::vector<std::string> &values) = 0;
311 
312  virtual void renamePointAttrib(const char *old_name, const char *new_name) = 0;
313  virtual void renamePrimAttrib(const char *old_name, const char *new_name) = 0;
314  virtual void renameVertexAttrib(const char *old_name, const char *new_name) = 0;
315  virtual void renameGlobalAttrib(const char *old_name, const char *new_name) = 0;
316 
317  SWIGOUT(%newobject createPoint;)
318  virtual HOM_Point *createPoint() = 0;
319  virtual std::vector<HOM_ElemPtr<HOM_Point> >createPoints(
320  const std::vector<std::vector<double> > &point_positions) = 0;
321  virtual std::vector<HOM_ElemPtr<HOM_Point> >createPoints(
322  const std::vector<HOM_Vector3 *> &point_positions) = 0;
323 
324  SWIGOUT(%newobject createPolygon;)
325  virtual HOM_Polygon *createPolygon() = 0;
326  virtual std::vector<HOM_ElemPtr<HOM_Polygon> >createPolygons(
327  const std::vector<std::vector<HOM_Point *> > &points) = 0;
328  virtual std::vector<HOM_ElemPtr<HOM_Polygon> >createPolygons(
329  const std::vector<std::vector<int> > &point_numbers) = 0;
330 
331  SWIGOUT(%newobject createPacked;)
332  virtual HOM_PackedPrim *createPacked(const char *packed_type) = 0;
333 
334  SWIGOUT(%newobject createTetrahedron;)
335  virtual HOM_Prim *createTetrahedron() = 0;
336 
337  SWIGOUT(%newobject createTetrahedronInPlace;)
338  virtual HOM_Prim *createTetrahedronInPlace(HOM_Point *p0, HOM_Point *p1,
339  HOM_Point *p2, HOM_Point *p3) = 0;
340 
341  SWIGOUT(%newobject createNURBSCurve;)
342  SWIGOUT(%kwargs createNURBSCurve;)
343  virtual HOM_Face *createNURBSCurve(int num_points=4, bool is_closed=false,
344  int order=4) = 0;
345 
346  SWIGOUT(%newobject createBezierCurve;)
347  SWIGOUT(%kwargs createBezierCurve;)
348  virtual HOM_Face *createBezierCurve(int num_points=4, bool is_closed=false,
349  int order=4) = 0;
350 
351  SWIGOUT(%newobject createNURBSSurface;)
352  SWIGOUT(%kwargs createNURBSSurface;)
353  virtual HOM_Surface *createNURBSSurface(
354  int rows, int cols,
355  bool is_closed_in_u=false, bool is_closed_in_v=false,
356  int order_u=4, int order_v=4) = 0;
357 
358  SWIGOUT(%newobject createBezierSurface;)
359  SWIGOUT(%kwargs createBezierSurface;)
360  virtual HOM_Surface *createBezierSurface(
361  int rows, int cols,
362  bool is_closed_in_u=false, bool is_closed_in_v=false,
363  int order_u=4, int order_v=4) = 0;
364 
365  SWIGOUT(%newobject createMeshSurface;)
366  SWIGOUT(%kwargs createMeshSurface;)
367  virtual HOM_Surface *createMeshSurface(
368  int rows, int cols,
369  bool is_closed_in_u=false, bool is_closed_in_v=false) = 0;
370 
371  SWIGOUT(%newobject createVolume;)
372  SWIGOUT(%kwargs createVolume;)
373  virtual HOM_Volume *createVolume(
374  int xres, int yres, int zres, HOM_BoundingBox *bounding_box=NULL) = 0;
375 
376 
377  virtual void transform(HOM_Matrix4 &matrix) = 0;
378 
379  virtual void transformPrims(
380  const std::vector<HOM_Prim *> &prims, HOM_Matrix4 &matrix) = 0;
381 
382  SWIGOUT(%kwargs deletePrims;)
383  virtual void deletePrims(
384  const std::vector<HOM_Prim *> &prims, bool keep_points=false) = 0;
385 
386  virtual void deletePoints(const std::vector<HOM_Point *> &points) = 0;
387 
388 
389  // Swig does not allow keyword arguments for overloaded functions, so
390  // addAttrib is wrapped in houpythonportion.py to enable keyword
391  // arguments. If you want to change the signature of addAttrib, you must
392  // also edit houpythonportion.py.
393  SWIGOUT(%newobject addAttrib;)
394  virtual HOM_Attrib *addAttrib(
395  HOM_EnumValue &type, const char *name,
396  int64 default_value,
397  bool transform_as_normal,
398  bool create_local_variable) = 0;
399 
400  virtual HOM_Attrib *addAttrib(
401  HOM_EnumValue &type, const char *name,
402  double default_value,
403  bool transform_as_normal,
404  bool create_local_variable) = 0;
405 
406  virtual HOM_Attrib *addAttrib(
407  HOM_EnumValue &type, const char *name,
408  const char *default_value,
409  bool transform_as_normal,
410  bool create_local_variable) = 0;
411 
412  virtual HOM_Attrib *addAttrib(
414  const char *name,
415  const std::vector<int64> &default_value,
416  bool transform_as_normal,
417  bool create_local_variable) = 0;
418 
419  virtual HOM_Attrib *addAttrib(
421  const char *name,
422  const std::vector<double> &default_value,
423  bool transform_as_normal,
424  bool create_local_variable) = 0;
425 
426  virtual HOM_Attrib *addAttrib(
428  const char *name,
429  const std::vector<std::string> &default_value,
430  bool transform_as_normal,
431  bool create_local_variable) = 0;
432 
433  SWIGOUT(%kwargs addArrayAttrib;)
434  SWIGOUT(%newobject addArrayAttrib;)
435  virtual HOM_Attrib *addArrayAttrib(
436  HOM_EnumValue &type, const char *name,
437  HOM_EnumValue &data_type,
438  int64 tuple_size = 1) = 0;
439 
440 
441  virtual void setGlobalAttribValue(
442  HOM_Attrib &attrib, int64 attrib_value) = 0;
443  virtual void setGlobalAttribValue(
444  HOM_Attrib &attrib, double attrib_value) = 0;
445  virtual void setGlobalAttribValue(
446  HOM_Attrib &attrib, const char *attrib_value) = 0;
447  virtual void setGlobalAttribValue(
448  HOM_Attrib &attrib, const std::vector<int64> &attrib_value) = 0;
449  virtual void setGlobalAttribValue(
450  HOM_Attrib &attrib, const std::vector<double> &attrib_value) = 0;
451  virtual void setGlobalAttribValue(
452  HOM_Attrib &attrib, const std::vector<std::string> &attrib_value) = 0;
453 
454  virtual void setGlobalAttribValue(
455  const char *attrib_name, int64 attrib_value) = 0;
456  virtual void setGlobalAttribValue(
457  const char *attrib_name, double attrib_value) = 0;
458  virtual void setGlobalAttribValue(
459  const char *attrib_name, const char *attrib_value) = 0;
460  // Note that, because of strangess the with way swig works when deciding
461  // which overloaded method to call, it's very important that we list the
462  // vector of ints before the vector of doubles. Otherwise, swig will call
463  // the double version when you pass in a vector of ints.
464  virtual void setGlobalAttribValue(
465  const char *attrib_name, const std::vector<int64> &attrib_value) = 0;
466  virtual void setGlobalAttribValue(
467  const char *attrib_name, const std::vector<double> &attrib_value) = 0;
468  virtual void setGlobalAttribValue(
469  const char *attrib_name,
470  const std::vector<std::string> &attrib_value) = 0;
471 
472 #ifdef SWIG
473 %extend
474 {
475  InterpreterObject attribValue(const char *name)
476  { return HOMattribValue(*self, name); }
477 
478  InterpreterObject attribValue(HOM_Attrib &attrib)
479  { return HOMattribValue(*self, attrib); }
480 }
481 #endif
482 
483  virtual std::vector<std::string> attributeCaptureRegions() = 0;
484  virtual std::vector<std::string> attributeCaptureObjectPaths() = 0;
485 
486 
487  virtual std::vector<std::string> intrinsicNames() = 0;
488 
489  virtual hboost::any intrinsicValue(
490  const char *intrinsic_name) = 0;
491  virtual size_t intrinsicSize(const char *intrinsic_name) = 0;
492  virtual bool intrinsicReadOnly(const char *intrinsic_name) = 0;
493 
494  virtual void setIntrinsicValue(const char *intrinsic_name, double value) = 0;
495  virtual void setIntrinsicValue(const char *intrinsic_name, int value) = 0;
496  virtual void setIntrinsicValue(const char *intrinsic_name, int64 value) = 0;
497  virtual void setIntrinsicValue(
498  const char *intrinsic_name, const char *value) = 0;
499  virtual void setIntrinsicValue(
500  const char *intrinsic_name, const std::vector<double> &value) = 0;
501  virtual void setIntrinsicValue(
502  const char *intrinsic_name, const std::vector<int> &value) = 0;
503  virtual void setIntrinsicValue(
504  const char *intrinsic_name, const std::vector<int64> &value) = 0;
505  virtual void setIntrinsicValue(
506  const char *intrinsic_name, const std::vector<std::string> &value) = 0;
507 
508  virtual HOM_BinaryString data() = 0;
509 
510  virtual void saveToFile(const char *file_name) = 0;
511 
512  virtual void loadFromFile(const char *file_name) = 0;
513 
514  virtual void merge(HOM_Geometry &geometry) = 0;
515 
516  virtual void clear() = 0;
517 
518  SWIGOUT(%kwargs intersect;)
519  virtual int intersect(
520  const HOM_Vector3 &rayorig, const HOM_Vector3 &dir,
522  const char *pattern = nullptr, float min_hit=1e-2f, float max_hit=1e18f) = 0;
523 
524  virtual std::vector<int> _orderedPoints(
525  const char *groupname,
526  const char *corner_groupname,
527  HOM_Vector2 &dimensions) = 0;
528 
529  virtual std::vector<HOM_ElemPtr<HOM_PointGroup> > pointGroups() = 0;
530 
531  SWIGOUT(%newobject findPointGroup;)
532  virtual HOM_PointGroup *findPointGroup(const char *name) = 0;
533 
534  SWIGOUT(%newobject createPointGroup;)
535  virtual HOM_PointGroup *createPointGroup(
536  const char *name, bool is_ordered=false) = 0;
537 
538 
539  virtual std::vector<HOM_ElemPtr<HOM_PrimGroup> > primGroups() = 0;
540 
541  SWIGOUT(%newobject findPrimGroup;)
542  virtual HOM_PrimGroup *findPrimGroup(const char *name) = 0;
543 
544  SWIGOUT(%newobject createPrimGroup;)
545  virtual HOM_PrimGroup *createPrimGroup(
546  const char *name, bool is_ordered=false) = 0;
547 
548  virtual std::vector<HOM_ElemPtr<HOM_EdgeGroup> > edgeGroups() = 0;
549 
550  SWIGOUT(%newobject findEdgeGroup;)
551  virtual HOM_EdgeGroup *findEdgeGroup(const char *name) = 0;
552 
553  SWIGOUT(%newobject createEdgeGroup;)
554  virtual HOM_EdgeGroup *createEdgeGroup(
555  const char *name) = 0;
556 
557  SWIGOUT(%newobject findEdge;)
558  virtual HOM_Edge *findEdge(HOM_Point * p0, HOM_Point * p1) = 0;
559 
560  virtual HOM_BoundingBox boundingBox() = 0;
561  virtual HOM_BoundingBox pointBoundingBox(const char *ptgroup) = 0;
562  virtual HOM_BoundingBox primBoundingBox(const char *primgroup) = 0;
563 
564  virtual UT_Tuple<HOM_ElemPtr<HOM_Prim>, double, double, double>
565  nearestPrim(const std::vector<double> &position) = 0;
566 
567  SWIGOUT(%kwargs primLoop;)
568  virtual std::vector<HOM_ElemPtr<HOM_Prim> >
569  primLoop(std::vector<HOM_Prim *> prims,
570  HOM_EnumValue &loop_type = HOM_componentLoopType::Partial) = 0;
571  SWIGOUT(%kwargs pointLoop;)
572  virtual std::vector<HOM_ElemPtr<HOM_Point> >
573  pointLoop(std::vector<HOM_Point *> points,
574  HOM_EnumValue &loop_type = HOM_componentLoopType::Partial) = 0;
575  SWIGOUT(%kwargs edgeLoop;)
576  virtual std::vector<HOM_ElemPtr<HOM_Edge> >
577  edgeLoop(std::vector<HOM_Edge *> edges,
578  HOM_EnumValue &loop_type = HOM_componentLoopType::Partial,
579  bool full_loop_per_edge = true,
580  bool force_ring = false,
581  bool allow_ring = true) = 0;
582 
583  virtual std::vector<HOM_Vector3>
584  pointNormals(const std::vector<HOM_Point *> &points) = 0;
585 
586  SWIGOUT(%newobject selection;)
587  virtual HOM_Selection *selection() = 0;
588 
589  // This method is not documented in the user documentation. See
590  // the comments in HOMF_Geometry.C for what it does.
591  virtual HOM_GUDetailHandle *_guDetailHandle() = 0;
592 };
593 
594 #endif
GT_API const UT_StringHolder selection
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1057
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
virtual std::vector< HOM_ElemPtr< HOM_Prim > > prims(HOM_Geometry &geo)=0
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:344
std::tuple< Types...> UT_Tuple
Definition: UT_Tuple.h:53
virtual void clear()=0
GLuint buffer
Definition: glcorearb.h:659
long long int64
Definition: SYS_Types.h:107
GLdouble n
Definition: glcorearb.h:2007
GLfloat f
Definition: glcorearb.h:1925
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)
#define HOM_API
Definition: HOM_API.h:13
HOM_Geometry(const HOM_Geometry &)
Definition: HOM_Geometry.h:62
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1056
virtual std::vector< HOM_ElemPtr< HOM_Edge > > edges(HOM_Geometry &geo)=0
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1601
virtual std::vector< HOM_ElemPtr< HOM_Point > > points(HOM_Geometry &geo)=0
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
GA_API const UT_StringHolder transform
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual HOM_Selection * freeze()=0
GLuint index
Definition: glcorearb.h:785
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
virtual ~HOM_Geometry()
Definition: HOM_Geometry.h:65
virtual HOM_Geometry * newGeometry()=0
HOM_API HOM_Module & HOM()
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794