HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_ExpandGroupUtils.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  * NAME: GEO_ExpandGroupUtils.h ( GU Library, C++)
7  *
8  * COMMENTS:
9  */
10 #ifndef __GEO_ExpandGroupUtils_h__
11 #define __GEO_ExpandGroupUtils_h__
12 
13 #include "GEO_API.h"
14 #include <UT/UT_Map.h>
15 #include <UT/UT_Array.h>
16 #include <UT/UT_IntArray.h>
17 #include <GA/GA_Edge.h>
18 #include <GA/GA_Types.h>
19 #include <GA/GA_Attribute.h>
20 #include <GA/GA_ATIGroupBool.h>
21 #include <GA/GA_AIFCompare.h>
22 #include <GA/GA_EdgeGroup.h>
23 #include <GA/GA_ElementGroup.h>
24 #include "GEO_Detail.h"
25 
27 {
28 public:
30  public:
31  ConnectAttribute(const GA_Attribute * attrib);
32 
33  ConnectAttribute(const GA_ElementGroup * group,
34  bool allow_touch = false,
35  const GA_EdgeGroup * edges = nullptr,
36  bool constrain_within_group = false);
37 
38  bool isValid() const
39  {
40  return myAttribOwner != GA_ATTRIB_INVALID;
41  }
43  {
44  return myAttribOwner;
45  }
46  bool constrainWithinGroup() const
47  {
48  return myConstrainWithinGroup;
49  }
50 
51  bool isGroup() const
52  {
53  return myGroup;
54  }
55 
56  bool allowTouch() const
57  {
58  return myAllowTouch;
59  }
60 
61  bool treatAsEdge() const
62  {
63  return myEdgeGroup;
64  }
65 
66  bool canGrowToPrim(GA_Offset prim0_v0,
67  GA_Offset prim0_v1,
68  GA_Offset prim1_v0,
69  GA_Offset prim1_v1,
70  const GEO_Detail & gdp) const;
71 
72  bool canGrowToVertex(GA_Offset v0,
73  GA_Offset v1,
74  const GEO_Detail & gdp,
75  GA_GroupType growth_type,
76  UT_Map<GA_Offset, GA_OffsetArray> & adj_map) const;
77 
78  bool isEdgeBound(GA_Offset prim0_v0, GA_Offset prim0_v1,
79  GA_Offset prim1_v0, GA_Offset prim1_v1,
80  const GEO_Detail & gdp) const;
81 
82  bool isEqual(GA_Offset x0, GA_Offset x1) const;
83 
84  bool groupContainsPrim(GA_Offset prim, const GEO_Detail & gdp) const;
85  bool groupContainsPoint(GA_Offset pt, const GEO_Detail & gdp) const
86  {
87  return groupContainsVertex(gdp.pointVertex(pt), gdp, GA_GROUP_POINT);
88  }
89 
90  bool groupContainsVertex(GA_Offset vtx, const GEO_Detail & gdp) const
91  {
92  return groupContainsVertex(vtx, gdp, GA_GROUP_VERTEX);
93  }
94 
95  bool groupContainsEdge(const GA_Edge & e, const GEO_Detail & gdp,
96  bool strict = true) const
97  {
98  if (treatAsEdge())
99  return myEdgeGroup->contains(e);
100 
101  if (strict)
102  return groupContainsPoint(e.p0(), gdp) &&
103  groupContainsPoint(e.p1(), gdp);
104 
105  return groupContainsPoint(e.p0(), gdp) ||
106  groupContainsPoint(e.p1(), gdp);
107  }
108  private:
109  bool groupContainsVertex(GA_Offset vtx,
110  const GEO_Detail & gdp,
111  GA_GroupType growth_type) const;
112 
113  const GA_Attribute * get() const
114  {
115  return myAttrib;
116  }
117 
118  const GA_AIFCompare * getCompare() const
119  {
120  return myCmpAttrib;
121  }
122 
123  const GA_Attribute * myAttrib = nullptr;
124  const GA_AIFCompare * myCmpAttrib = nullptr;
125  const GA_ElementGroup * myGroup = nullptr;
126  const GA_EdgeGroup * myEdgeGroup = nullptr;
127  GA_AttributeOwner myAttribOwner = GA_ATTRIB_INVALID;
128  bool myAllowTouch = false;
129  bool myConstrainWithinGroup = false;
130  };
131 
133 
134  // Three functions to find the connectivity in geometry,
135  // Split by several connectivity attributes
136  static void getPointConnectivity(
137  UT_Array<GA_OffsetArray> & ranges,
138  const GA_PointGroup & pts,
139  const GEO_Detail & gdp,
140  const ConnectAttribArray & attribs);
141 
142  static void getPrimitiveConnectivity(
143  UT_Array<GA_OffsetArray> & ranges,
144  const GA_PrimitiveGroup & prims,
145  const GEO_Detail & gdp,
146  const ConnectAttribArray & attribs);
147 
148  static void getVertexConnectivity(
149  UT_Array<GA_OffsetArray> & ranges,
150  const GA_VertexGroup & vtxs,
151  const GEO_Detail & gdp,
152  const ConnectAttribArray & attribs);
153 
154  // Helper function to help getting vertices on an edge
155  static void getVerticesOnEdge(
156  GA_OffsetArray & vtx_out,
157  const GA_Edge & edge,
158  const GEO_Detail & gdp,
159  GA_OffsetArray & tmp_vtx_1,
160  GA_OffsetArray & tmp_vtx_2);
161 
162  /// Functions for just flood filling the existing group.
163  /// group: the group to be grown
164  /// gdp: the detail
165  /// NOTE: this works as if require_share_edge is false.
166 
167  static void floodFillPrimGroup(
168  GA_PrimitiveGroup & prim_group,
169  const GEO_Detail & gdp);
170 
171  static void floodFillPointGroup(
172  GA_PointGroup & point_group,
173  const GEO_Detail & gdp);
174 
175  static void floodFillVertexGroup(
176  GA_VertexGroup & vtx_group,
177  const GEO_Detail & gdp);
178 
179  static void floodFillEdgeGroup(
180  GA_EdgeGroup & edge_group,
181  const GEO_Detail & gdp);
182 
183 
184  // Functions to grow a selection of elements N times
185  // group: the group to be grown, these functions will modify the group
186  // parameter to contain the resultant after growing N iterations
187  // gdp: the detail
188  // attrib: a connectivity attribute, if not nullptr, growth is
189  // contained to connected regions.
190  // If nullptr, connectivity is ignored.
191  // limit_iters: if true will only grow a maximum of _iters_ iterations
192  // if false, will grow as far as possible
193 
194  // Grow a collection of primitives by N iterations
195  static void growPrimGroupNIters(
196  GA_PrimitiveGroup & prim_group,
197  const GEO_Detail & gdp,
198  const ConnectAttribArray & attribs,
199  bool limit_iters,
200  exint iters,
201  UT_IntArray * prim_step_map = nullptr,
202  bool require_share_edge = false);
203 
204  // Grow a collection of points by N iterations
205  static void growPointGroupNIters(
206  GA_PointGroup & point_group,
207  const GEO_Detail & gdp,
208  const ConnectAttribArray & attribs,
209  bool limit_iters,
210  exint iters,
211  UT_IntArray * pt_step_map = nullptr);
212 
213  // Grow a collection of vertices by N iterations
214  static void growVertexGroupNIters(
215  GA_VertexGroup & vtx_group,
216  const GEO_Detail & gdp,
217  const ConnectAttribArray & attribs,
218  bool limit_iters,
219  exint iters,
220  UT_IntArray * vtx_step_map = nullptr);
221 
222  // Grow a collection of Edges by N iterations
223  static void growEdgeGroupNIters(
224  GA_EdgeGroup & edge_group,
225  const GEO_Detail & gdp,
226  const ConnectAttribArray & attribs,
227  bool limit_iters,
228  exint iters,
229  UT_IntArray * pt_step_map = nullptr);
230 
231  // The following interfaces allow providing 0 or 1 connectivity attributes.
232 
233  // Grow a collection of primitives by N iterations
234  static void growPrimGroupNIters(
235  GA_PrimitiveGroup & prim_group,
236  const GEO_Detail & gdp,
237  const GA_Attribute * attrib,
238  bool limit_iters,
239  exint iters,
240  UT_IntArray * prim_step_map = nullptr,
241  bool require_share_edge = false)
242  {
243  ConnectAttribArray con_arr;
244  if (attrib)
245  con_arr.append(attrib);
246 
247  growPrimGroupNIters(prim_group, gdp,
248  con_arr, limit_iters, iters,
249  prim_step_map, require_share_edge);
250  }
251 
252  // Grow a collection of points by N iterations
253  static void growPointGroupNIters(
254  GA_PointGroup & point_group,
255  const GEO_Detail & gdp,
256  const GA_Attribute * attrib,
257  bool limit_iters,
258  exint iters,
259  UT_IntArray * pt_step_map = nullptr)
260  {
261  ConnectAttribArray con_arr;
262  if (attrib)
263  con_arr.append(attrib);
264 
265  growPointGroupNIters(point_group, gdp,
266  con_arr, limit_iters, iters, pt_step_map);
267  }
268 
269  // Grow a collection of vertices by N iterations
271  GA_VertexGroup & vtx_group,
272  const GEO_Detail & gdp,
273  const GA_Attribute * attrib,
274  bool limit_iters,
275  exint iters,
276  UT_IntArray * vtx_step_map = nullptr)
277  {
278  ConnectAttribArray con_arr;
279  if (attrib)
280  con_arr.append(attrib);
281 
282  growVertexGroupNIters(vtx_group, gdp,
283  con_arr, limit_iters, iters, vtx_step_map);
284  }
285 
286  // Grow a collection of Edges by N iterations
287  static void growEdgeGroupNIters(
288  GA_EdgeGroup & edge_group,
289  const GEO_Detail & gdp,
290  const GA_Attribute * attrib,
291  bool limit_iters,
292  exint iters,
293  UT_IntArray * pt_step_map = nullptr)
294  {
295  ConnectAttribArray con_arr;
296  if (attrib)
297  con_arr.append(attrib);
298 
299  growEdgeGroupNIters(edge_group, gdp,
300  con_arr, limit_iters, iters, pt_step_map);
301  }
302 
303 
304  // The following functions will take in a seed group,
305  // and expand the seed group to all connected geometry
306  // ithin some curvature threshold specified by spread_angle
307  // hidden_prims is a group of primitives to avoid extending to
308 
309  // group: the input group, this is the group that will be grown
310  // modifies the group to contain the grown group.
311  // gdp: the detail
312  // spread_angle: the maximum allowed angle between components when growing
313  // limit_iters: if true will only grow a maximum of _iters_ iterations
314  // if false, will grow as far as possible
315  // pick_all_matching_normals: if true, will ignore connectivity and
316  // look at all components in the geometry.
317  // static_reference_normal: if true, will compare normals of elements
318  // to a single seed when growing the seed will
319  // be picked as the first element in src_prims.
320  // hidden_prims: a group of primitives to ignore
321  // attrib: a connectivity attribute, if not nullptr, growth is
322  // contained to connected regions.
323  // If nullptr, connectivity is ignored.
324  // normal_attr: the vector attribute to use as a normal
325  static void expandPrimsByNormal(
326  GA_PrimitiveGroup & prim_group,
327  const GEO_Detail & gdp,
328  fpreal spread_angle,
329  bool limit_iters,
330  exint iters,
331  bool pick_all_matching_normals,
332  bool static_reference_normal,
333  const GA_PrimitiveGroup * hidden_prims,
334  const ConnectAttribArray & attribs,
335  const GA_Attribute * normal_attr,
336  UT_IntArray * prim_step_map = nullptr,
337  bool require_share_edge = true);
338 
339  static void expandPointsByNormal(
340  GA_PointGroup & point_group,
341  const GEO_Detail & gdp,
342  fpreal spread_angle,
343  bool limit_iters,
344  exint iters,
345  bool pick_all_matching_normals,
346  bool static_reference_normal,
347  const GA_PrimitiveGroup * hidden_prims,
348  const ConnectAttribArray & attribs,
349  const GA_Attribute * normal_attrib,
350  UT_IntArray * pt_step_map = nullptr);
351 
352  static void expandVerticesByNormal(
353  GA_VertexGroup & vtx_group,
354  const GEO_Detail & gdp,
355  fpreal spread_angle,
356  bool limit_iters,
357  exint iters,
358  bool pick_all_matching_normals,
359  bool static_reference_normal,
360  const GA_PrimitiveGroup * hidden_prims,
361  const ConnectAttribArray & attribs,
362  const GA_Attribute * normal_attrib,
363  UT_IntArray * vtx_step_map = nullptr);
364 
365  static void expandEdgesByNormal(
366  GA_EdgeGroup & edge_group,
367  const GEO_Detail & gdp,
368  fpreal spread_angle,
369  bool limit_iters,
370  exint iters,
371  bool pick_all_matching_normals,
372  bool static_reference_normal,
373  const GA_PrimitiveGroup * hidden_prims,
374  const ConnectAttribArray & attribs,
375  const GA_Attribute * normal_attrib,
376  UT_IntArray * pt_step_map = nullptr);
377 
378  // Interfaces with only a uv_attribute
379  static void expandPrimsByNormal(
380  GA_PrimitiveGroup & prim_group,
381  const GEO_Detail & gdp,
382  fpreal spread_angle,
383  bool limit_iters,
384  exint iters,
385  bool pick_all_matching_normals,
386  bool static_reference_normal,
387  const GA_PrimitiveGroup * hidden_prims,
388  const GA_Attribute * attrib, // Can be a uv_attribute, but other types are also accepted.
389  const GA_Attribute * normal_attrib,
390  UT_IntArray * prim_step_map = nullptr,
391  bool require_share_edge = true)
392  {
393  ConnectAttribArray con_arr;
394  if (attrib)
395  con_arr.append(attrib);
396 
397  expandPrimsByNormal(prim_group, gdp, spread_angle, limit_iters, iters,
398  pick_all_matching_normals, static_reference_normal,
399  hidden_prims, con_arr, normal_attrib,
400  prim_step_map, require_share_edge);
401  }
402 
403  static void expandPointsByNormal(
404  GA_PointGroup & point_group,
405  const GEO_Detail & gdp,
406  fpreal spread_angle,
407  bool limit_iters,
408  exint iters,
409  bool pick_all_matching_normals,
410  bool static_reference_normal,
411  const GA_PrimitiveGroup * hidden_prims,
412  const GA_Attribute * attrib,
413  const GA_Attribute * normal_attrib,
414  UT_IntArray * pt_step_map = nullptr)
415  {
416  ConnectAttribArray con_arr;
417  if (attrib)
418  con_arr.append(attrib);
419 
420  expandPointsByNormal(point_group, gdp, spread_angle, limit_iters, iters,
421  pick_all_matching_normals, static_reference_normal,
422  hidden_prims, con_arr, normal_attrib, pt_step_map);
423  }
424 
426  GA_VertexGroup & vtx_group,
427  const GEO_Detail & gdp,
428  fpreal spread_angle,
429  bool limit_iters,
430  exint iters,
431  bool pick_all_matching_normals,
432  bool static_reference_normal,
433  const GA_PrimitiveGroup * hidden_prims,
434  const GA_Attribute * attrib,
435  const GA_Attribute * normal_attrib,
436  UT_IntArray * vtx_step_map = nullptr)
437  {
438  ConnectAttribArray con_arr;
439  if (attrib)
440  con_arr.append(attrib);
441 
442  expandVerticesByNormal(vtx_group, gdp, spread_angle, limit_iters, iters,
443  pick_all_matching_normals, static_reference_normal,
444  hidden_prims, con_arr, normal_attrib, vtx_step_map);
445  }
446 
447  static void expandEdgesByNormal(
448  GA_EdgeGroup & edge_group,
449  const GEO_Detail & gdp,
450  fpreal spread_angle,
451  bool limit_iters,
452  exint iters,
453  bool pick_all_matching_normals,
454  bool static_reference_normal,
455  const GA_PrimitiveGroup * hidden_prims,
456  const GA_Attribute * attrib,
457  const GA_Attribute * normal_attrib,
458  UT_IntArray * pt_step_map = nullptr)
459  {
460  ConnectAttribArray con_arr;
461  if (attrib)
462  con_arr.append(attrib);
463 
464  expandEdgesByNormal(edge_group, gdp, spread_angle, limit_iters, iters,
465  pick_all_matching_normals, static_reference_normal,
466  hidden_prims, con_arr, normal_attrib, pt_step_map);
467  }
468 
469  // Functions for shrinking collections of elements by N iterations
470  // group: the group to shrink, these functions will modifty the
471  // group parm to contain the resultant after shrinking
472  // gdp: the detail
473  // attrib: an attribute specifying connectivity, if nullptr will
474  // not be used. If not nullptr, elements will shrink away
475  // from connectivity boundaries.
476  // iters: number of iterations to shrink
477  static void shrinkPrimGroupNIters(
478  GA_PrimitiveGroup & prim_group,
479  const GEO_Detail & gdp,
480  const ConnectAttribArray & attribs,
481  exint iters,
482  UT_IntArray * prim_step_map = nullptr,
483  bool require_share_edge = false);
484 
485  static void shrinkPointGroupNIters(
486  GA_PointGroup & point_group,
487  const GEO_Detail & gdp,
488  const ConnectAttribArray & attribs,
489  exint iters,
490  UT_IntArray * pt_step_map = nullptr);
491 
492  static void shrinkVertexGroupNIters(
493  GA_VertexGroup & vtx_group,
494  const GEO_Detail & gdp,
495  const ConnectAttribArray & attribs,
496  exint iters,
497  UT_IntArray * vtx_step_map = nullptr);
498 
499  static void shrinkEdgeGroupNIters(
500  GA_EdgeGroup & edge_group,
501  const GEO_Detail & gdp,
502  const ConnectAttribArray & attribs,
503  exint iters,
504  UT_IntArray * pt_step_map = nullptr);
505 
506  // The following provide interfaces for working with 0 or 1 attributes.
507 
509  GA_PrimitiveGroup & prim_group,
510  const GEO_Detail & gdp,
511  const GA_Attribute * attrib,
512  exint iters,
513  UT_IntArray * prim_step_map = nullptr,
514  bool require_share_edge = false)
515  {
516  ConnectAttribArray con_arr;
517  if (attrib)
518  con_arr.append(attrib);
519 
520  shrinkPrimGroupNIters(prim_group, gdp, con_arr, iters, prim_step_map, require_share_edge);
521  }
522 
524  GA_PointGroup & point_group,
525  const GEO_Detail & gdp,
526  const GA_Attribute * attrib,
527  exint iters,
528  UT_IntArray * pt_step_map = nullptr)
529  {
530  ConnectAttribArray con_arr;
531  if (attrib)
532  con_arr.append(attrib);
533 
534  shrinkPointGroupNIters(point_group, gdp, con_arr, iters, pt_step_map);
535  }
536 
538  GA_VertexGroup & vtx_group,
539  const GEO_Detail & gdp,
540  const GA_Attribute * attrib,
541  exint iters,
542  UT_IntArray * vtx_step_map = nullptr)
543  {
544  ConnectAttribArray con_arr;
545  if (attrib)
546  con_arr.append(attrib);
547 
548  shrinkVertexGroupNIters(vtx_group, gdp, con_arr, iters, vtx_step_map);
549  }
550 
552  GA_EdgeGroup & edge_group,
553  const GEO_Detail & gdp,
554  const GA_Attribute * attrib,
555  exint iters,
556  UT_IntArray * pt_step_map = nullptr)
557  {
558  ConnectAttribArray con_arr;
559  if (attrib)
560  con_arr.append(attrib);
561 
562  shrinkEdgeGroupNIters(edge_group, gdp, con_arr, iters, pt_step_map);
563  }
564 
565 
566  // Functions for finding the boundary.
567  // group: the group of which to find the boundary, these functions will
568  // modify the group parameter to contain the resultant boundary.
569  // gdp: the detail that the group is on.
570  // attrib: a connectivity attribute specifying connected regions of
571  // geometry will not be used if nullptr.
572  static void findPrimGroupBoundary(
573  GA_PrimitiveGroup & prim_group,
574  const GEO_Detail & gdp,
575  const ConnectAttribArray & attribs,
576  bool consider_unshared_edges = true,
577  bool all_pt_boundary = false,
578  bool consider_unshared_curve_edges = true);
579 
580  static void findPointGroupBoundary(
581  GA_PointGroup & pt_group,
582  const GEO_Detail & gdp,
583  const ConnectAttribArray & attribs,
584  bool consider_unshared_edges = true,
585  bool consider_unshared_curve_edges = true);
586 
587  static void findVertexGroupBoundary(
588  GA_VertexGroup & vtx_group,
589  const GEO_Detail & gdp,
590  const ConnectAttribArray & attribs,
591  bool consider_unshared_edges = true,
592  bool consider_unshared_curve_edges = true);
593 
594  static void findEdgeGroupBoundary(
595  GA_EdgeGroup & edge_group,
596  const GEO_Detail & gdp,
597  const ConnectAttribArray & attribs,
598  bool consider_unshared_edges = true,
599  bool consider_unshared_curve_edges = true);
600 
601  // The following provide interfaces for working with 0 or 1 attributes.
602 
604  GA_PrimitiveGroup & prim_group,
605  const GEO_Detail & gdp,
606  const GA_Attribute * attrib,
607  bool consider_unshared_edges = true,
608  bool all_pt_boundary = false,
609  bool consider_unshared_curve_edges = true)
610  {
611  ConnectAttribArray con_arr;
612  if (attrib)
613  con_arr.append(attrib);
614 
615  findPrimGroupBoundary(prim_group, gdp, con_arr,
616  consider_unshared_edges, all_pt_boundary,
617  consider_unshared_curve_edges);
618  }
619 
621  GA_PointGroup & pt_group,
622  const GEO_Detail & gdp,
623  const GA_Attribute * attrib,
624  bool consider_unshared_edges = true,
625  bool consider_unshared_curve_edges = true)
626  {
627  ConnectAttribArray con_arr;
628  if (attrib)
629  con_arr.append(attrib);
630 
631  findPointGroupBoundary(pt_group, gdp, con_arr,
632  consider_unshared_edges,
633  consider_unshared_curve_edges);
634  }
635 
637  GA_VertexGroup & vtx_group,
638  const GEO_Detail & gdp,
639  const GA_Attribute * attrib,
640  bool consider_unshared_edges = true,
641  bool consider_unshared_curve_edges = true)
642  {
643  ConnectAttribArray con_arr;
644  if (attrib)
645  con_arr.append(attrib);
646 
647  findVertexGroupBoundary(vtx_group, gdp, con_arr,
648  consider_unshared_edges,
649  consider_unshared_curve_edges);
650  }
651 
653  GA_EdgeGroup & edge_group,
654  const GEO_Detail & gdp,
655  const GA_Attribute * attrib,
656  bool consider_unshared_edges = true,
657  bool consider_unshared_curve_edges = true)
658  {
659  ConnectAttribArray con_arr;
660  if (attrib)
661  con_arr.append(attrib);
662 
663  findEdgeGroupBoundary(edge_group, gdp, con_arr,
664  consider_unshared_edges,
665  consider_unshared_curve_edges);
666  }
667 };
668 
669 #endif
static void shrinkPointGroupNIters(GA_PointGroup &point_group, const GEO_Detail &gdp, const GA_Attribute *attrib, exint iters, UT_IntArray *pt_step_map=nullptr)
Definition of a geometry attribute.
Definition: GA_Attribute.h:198
Unsorted map container.
Definition: UT_Map.h:107
bool groupContainsVertex(GA_Offset vtx, const GEO_Detail &gdp) const
static void findPointGroupBoundary(GA_PointGroup &pt_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool consider_unshared_edges=true, bool consider_unshared_curve_edges=true)
static void growPrimGroupNIters(GA_PrimitiveGroup &prim_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool limit_iters, exint iters, UT_IntArray *prim_step_map=nullptr, bool require_share_edge=false)
static void growPointGroupNIters(GA_PointGroup &point_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool limit_iters, exint iters, UT_IntArray *pt_step_map=nullptr)
int64 exint
Definition: SYS_Types.h:125
static void expandEdgesByNormal(GA_EdgeGroup &edge_group, const GEO_Detail &gdp, fpreal spread_angle, bool limit_iters, exint iters, bool pick_all_matching_normals, bool static_reference_normal, const GA_PrimitiveGroup *hidden_prims, const GA_Attribute *attrib, const GA_Attribute *normal_attrib, UT_IntArray *pt_step_map=nullptr)
static void expandPrimsByNormal(GA_PrimitiveGroup &prim_group, const GEO_Detail &gdp, fpreal spread_angle, bool limit_iters, exint iters, bool pick_all_matching_normals, bool static_reference_normal, const GA_PrimitiveGroup *hidden_prims, const GA_Attribute *attrib, const GA_Attribute *normal_attrib, UT_IntArray *prim_step_map=nullptr, bool require_share_edge=true)
GA_Size GA_Offset
Definition: GA_Types.h:641
static void findVertexGroupBoundary(GA_VertexGroup &vtx_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool consider_unshared_edges=true, bool consider_unshared_curve_edges=true)
static void findEdgeGroupBoundary(GA_EdgeGroup &edge_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool consider_unshared_edges=true, bool consider_unshared_curve_edges=true)
static void shrinkEdgeGroupNIters(GA_EdgeGroup &edge_group, const GEO_Detail &gdp, const GA_Attribute *attrib, exint iters, UT_IntArray *pt_step_map=nullptr)
static void growVertexGroupNIters(GA_VertexGroup &vtx_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool limit_iters, exint iters, UT_IntArray *vtx_step_map=nullptr)
static void expandVerticesByNormal(GA_VertexGroup &vtx_group, const GEO_Detail &gdp, fpreal spread_angle, bool limit_iters, exint iters, bool pick_all_matching_normals, bool static_reference_normal, const GA_PrimitiveGroup *hidden_prims, const GA_Attribute *attrib, const GA_Attribute *normal_attrib, UT_IntArray *vtx_step_map=nullptr)
static void expandPointsByNormal(GA_PointGroup &point_group, const GEO_Detail &gdp, fpreal spread_angle, bool limit_iters, exint iters, bool pick_all_matching_normals, bool static_reference_normal, const GA_PrimitiveGroup *hidden_prims, const GA_Attribute *attrib, const GA_Attribute *normal_attrib, UT_IntArray *pt_step_map=nullptr)
static void growEdgeGroupNIters(GA_EdgeGroup &edge_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool limit_iters, exint iters, UT_IntArray *pt_step_map=nullptr)
SYS_FORCE_INLINE GA_Offset pointVertex(GA_Offset point) const
Definition: GA_Detail.h:559
#define GEO_API
Definition: GEO_API.h:14
Attribute Interface class to perform comparisons on attributes.
Definition: GA_AIFCompare.h:27
T p1() const
Definition: GA_Edge.h:32
static void shrinkVertexGroupNIters(GA_VertexGroup &vtx_group, const GEO_Detail &gdp, const GA_Attribute *attrib, exint iters, UT_IntArray *vtx_step_map=nullptr)
exint append()
Definition: UT_Array.h:142
GLfloat v0
Definition: glcorearb.h:816
GA_AttributeOwner
Definition: GA_Types.h:34
fpreal64 fpreal
Definition: SYS_Types.h:277
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:160
GLfloat GLfloat v1
Definition: glcorearb.h:817
static void findPrimGroupBoundary(GA_PrimitiveGroup &prim_group, const GEO_Detail &gdp, const GA_Attribute *attrib, bool consider_unshared_edges=true, bool all_pt_boundary=false, bool consider_unshared_curve_edges=true)
bool groupContainsPoint(GA_Offset pt, const GEO_Detail &gdp) const
T p0() const
Definition: GA_Edge.h:30
bool groupContainsEdge(const GA_Edge &e, const GEO_Detail &gdp, bool strict=true) const
static void shrinkPrimGroupNIters(GA_PrimitiveGroup &prim_group, const GEO_Detail &gdp, const GA_Attribute *attrib, exint iters, UT_IntArray *prim_step_map=nullptr, bool require_share_edge=false)