10 #ifndef __GEO_ExpandGroupUtils_h__
11 #define __GEO_ExpandGroupUtils_h__
34 bool allow_touch =
false,
36 bool constrain_within_group =
false);
48 return myConstrainWithinGroup;
96 bool strict =
true)
const
99 return myEdgeGroup->contains(e);
102 return groupContainsPoint(e.
p0(), gdp) &&
103 groupContainsPoint(e.
p1(), gdp);
105 return groupContainsPoint(e.
p0(), gdp) ||
106 groupContainsPoint(e.
p1(), gdp);
128 bool myAllowTouch =
false;
129 bool myConstrainWithinGroup =
false;
136 static void getPointConnectivity(
142 static void getPrimitiveConnectivity(
148 static void getVertexConnectivity(
155 static void getVerticesOnEdge(
167 static void floodFillPrimGroup(
171 static void floodFillPointGroup(
175 static void floodFillVertexGroup(
179 static void floodFillEdgeGroup(
195 static void growPrimGroupNIters(
202 bool require_share_edge =
false);
205 static void growPointGroupNIters(
214 static void growVertexGroupNIters(
223 static void growEdgeGroupNIters(
241 bool require_share_edge =
false)
247 growPrimGroupNIters(prim_group, gdp,
248 con_arr, limit_iters, iters,
249 prim_step_map, require_share_edge);
265 growPointGroupNIters(point_group, gdp,
266 con_arr, limit_iters, iters, pt_step_map);
282 growVertexGroupNIters(vtx_group, gdp,
283 con_arr, limit_iters, iters, vtx_step_map);
299 growEdgeGroupNIters(edge_group, gdp,
300 con_arr, limit_iters, iters, pt_step_map);
325 static void expandPrimsByNormal(
331 bool pick_all_matching_normals,
332 bool static_reference_normal,
334 const ConnectAttribArray & attribs,
337 bool require_share_edge =
true);
339 static void expandPointsByNormal(
345 bool pick_all_matching_normals,
346 bool static_reference_normal,
348 const ConnectAttribArray & attribs,
352 static void expandVerticesByNormal(
358 bool pick_all_matching_normals,
359 bool static_reference_normal,
361 const ConnectAttribArray & attribs,
365 static void expandEdgesByNormal(
371 bool pick_all_matching_normals,
372 bool static_reference_normal,
374 const ConnectAttribArray & attribs,
385 bool pick_all_matching_normals,
386 bool static_reference_normal,
391 bool require_share_edge =
true)
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);
409 bool pick_all_matching_normals,
410 bool static_reference_normal,
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);
431 bool pick_all_matching_normals,
432 bool static_reference_normal,
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);
453 bool pick_all_matching_normals,
454 bool static_reference_normal,
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);
477 static void shrinkPrimGroupNIters(
480 const ConnectAttribArray & attribs,
483 bool require_share_edge =
false);
485 static void shrinkPointGroupNIters(
488 const ConnectAttribArray & attribs,
492 static void shrinkVertexGroupNIters(
495 const ConnectAttribArray & attribs,
499 static void shrinkEdgeGroupNIters(
502 const ConnectAttribArray & attribs,
514 bool require_share_edge =
false)
520 shrinkPrimGroupNIters(prim_group, gdp, con_arr, iters, prim_step_map, require_share_edge);
534 shrinkPointGroupNIters(point_group, gdp, con_arr, iters, pt_step_map);
548 shrinkVertexGroupNIters(vtx_group, gdp, con_arr, iters, vtx_step_map);
562 shrinkEdgeGroupNIters(edge_group, gdp, con_arr, iters, pt_step_map);
572 static void findPrimGroupBoundary(
575 const ConnectAttribArray & attribs,
576 bool consider_unshared_edges =
true,
577 bool all_pt_boundary =
false,
578 bool consider_unshared_curve_edges =
true);
580 static void findPointGroupBoundary(
583 const ConnectAttribArray & attribs,
584 bool consider_unshared_edges =
true,
585 bool consider_unshared_curve_edges =
true);
587 static void findVertexGroupBoundary(
590 const ConnectAttribArray & attribs,
591 bool consider_unshared_edges =
true,
592 bool consider_unshared_curve_edges =
true);
594 static void findEdgeGroupBoundary(
597 const ConnectAttribArray & attribs,
598 bool consider_unshared_edges =
true,
599 bool consider_unshared_curve_edges =
true);
607 bool consider_unshared_edges =
true,
608 bool all_pt_boundary =
false,
609 bool consider_unshared_curve_edges =
true)
615 findPrimGroupBoundary(prim_group, gdp, con_arr,
616 consider_unshared_edges, all_pt_boundary,
617 consider_unshared_curve_edges);
624 bool consider_unshared_edges =
true,
625 bool consider_unshared_curve_edges =
true)
631 findPointGroupBoundary(pt_group, gdp, con_arr,
632 consider_unshared_edges,
633 consider_unshared_curve_edges);
640 bool consider_unshared_edges =
true,
641 bool consider_unshared_curve_edges =
true)
647 findVertexGroupBoundary(vtx_group, gdp, con_arr,
648 consider_unshared_edges,
649 consider_unshared_curve_edges);
656 bool consider_unshared_edges =
true,
657 bool consider_unshared_curve_edges =
true)
663 findEdgeGroupBoundary(edge_group, gdp, con_arr,
664 consider_unshared_edges,
665 consider_unshared_curve_edges);
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.
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)
GA_AttributeOwner getOwner() const
bool constrainWithinGroup() const
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)
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)
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
Attribute Interface class to perform comparisons on attributes.
static void shrinkVertexGroupNIters(GA_VertexGroup &vtx_group, const GEO_Detail &gdp, const GA_Attribute *attrib, exint iters, UT_IntArray *vtx_step_map=nullptr)
GA_GroupType
An ordinal enum for the different types of groups in GA.
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
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)