10 #ifndef __GEO_ExpandGroupUtils_h__
11 #define __GEO_ExpandGroupUtils_h__
36 bool allow_touch =
false,
38 bool constrain_within_group =
false);
50 return myConstrainWithinGroup;
98 bool strict =
true)
const
101 return myEdgeGroup->contains(e);
104 return groupContainsPoint(e.
p0(), gdp) &&
105 groupContainsPoint(e.
p1(), gdp);
107 return groupContainsPoint(e.
p0(), gdp) ||
108 groupContainsPoint(e.
p1(), gdp);
130 bool myAllowTouch =
false;
131 bool myConstrainWithinGroup =
false;
140 static void getPointConnectivity(
146 static void getPrimitiveConnectivity(
152 static void getVertexConnectivity(
159 static void getVerticesOnEdge(
171 static void floodFillPrimGroup(
175 static void floodFillPointGroup(
179 static void floodFillVertexGroup(
183 static void floodFillEdgeGroup(
199 static void growPrimGroupNIters(
206 bool require_share_edge =
false);
209 static void growPointGroupNIters(
218 static void growVertexGroupNIters(
227 static void growEdgeGroupNIters(
245 bool require_share_edge =
false)
251 growPrimGroupNIters(prim_group, gdp,
252 con_arr, limit_iters, iters,
253 prim_step_map, require_share_edge);
269 growPointGroupNIters(point_group, gdp,
270 con_arr, limit_iters, iters, pt_step_map);
286 growVertexGroupNIters(vtx_group, gdp,
287 con_arr, limit_iters, iters, vtx_step_map);
303 growEdgeGroupNIters(edge_group, gdp,
304 con_arr, limit_iters, iters, pt_step_map);
329 static void expandPrimsByNormal(
335 bool pick_all_matching_normals,
336 bool static_reference_normal,
338 const ConnectAttribArray & attribs,
341 bool require_share_edge =
true);
343 static void expandPointsByNormal(
349 bool pick_all_matching_normals,
350 bool static_reference_normal,
352 const ConnectAttribArray & attribs,
356 static void expandVerticesByNormal(
362 bool pick_all_matching_normals,
363 bool static_reference_normal,
365 const ConnectAttribArray & attribs,
369 static void expandEdgesByNormal(
375 bool pick_all_matching_normals,
376 bool static_reference_normal,
378 const ConnectAttribArray & attribs,
389 bool pick_all_matching_normals,
390 bool static_reference_normal,
395 bool require_share_edge =
true)
401 expandPrimsByNormal(prim_group, gdp, spread_angle, limit_iters, iters,
402 pick_all_matching_normals, static_reference_normal,
403 hidden_prims, con_arr, normal_attrib,
404 prim_step_map, require_share_edge);
413 bool pick_all_matching_normals,
414 bool static_reference_normal,
424 expandPointsByNormal(point_group, gdp, spread_angle, limit_iters, iters,
425 pick_all_matching_normals, static_reference_normal,
426 hidden_prims, con_arr, normal_attrib, pt_step_map);
435 bool pick_all_matching_normals,
436 bool static_reference_normal,
446 expandVerticesByNormal(vtx_group, gdp, spread_angle, limit_iters, iters,
447 pick_all_matching_normals, static_reference_normal,
448 hidden_prims, con_arr, normal_attrib, vtx_step_map);
457 bool pick_all_matching_normals,
458 bool static_reference_normal,
468 expandEdgesByNormal(edge_group, gdp, spread_angle, limit_iters, iters,
469 pick_all_matching_normals, static_reference_normal,
470 hidden_prims, con_arr, normal_attrib, pt_step_map);
481 static void shrinkPrimGroupNIters(
484 const ConnectAttribArray & attribs,
487 bool require_share_edge =
false);
489 static void shrinkPointGroupNIters(
492 const ConnectAttribArray & attribs,
496 static void shrinkVertexGroupNIters(
499 const ConnectAttribArray & attribs,
503 static void shrinkEdgeGroupNIters(
506 const ConnectAttribArray & attribs,
518 bool require_share_edge =
false)
524 shrinkPrimGroupNIters(prim_group, gdp, con_arr, iters, prim_step_map, require_share_edge);
538 shrinkPointGroupNIters(point_group, gdp, con_arr, iters, pt_step_map);
552 shrinkVertexGroupNIters(vtx_group, gdp, con_arr, iters, vtx_step_map);
566 shrinkEdgeGroupNIters(edge_group, gdp, con_arr, iters, pt_step_map);
576 static void findPrimGroupBoundary(
579 const ConnectAttribArray & attribs,
580 bool consider_unshared_edges =
true,
581 bool all_pt_boundary =
false,
582 bool consider_unshared_curve_edges =
true);
584 static void findPointGroupBoundary(
587 const ConnectAttribArray & attribs,
588 bool consider_unshared_edges =
true,
589 bool consider_unshared_curve_edges =
true);
591 static void findVertexGroupBoundary(
594 const ConnectAttribArray & attribs,
595 bool consider_unshared_edges =
true,
596 bool consider_unshared_curve_edges =
true);
598 static void findEdgeGroupBoundary(
601 const ConnectAttribArray & attribs,
602 bool consider_unshared_edges =
true,
603 bool consider_unshared_curve_edges =
true);
611 bool consider_unshared_edges =
true,
612 bool all_pt_boundary =
false,
613 bool consider_unshared_curve_edges =
true)
619 findPrimGroupBoundary(prim_group, gdp, con_arr,
620 consider_unshared_edges, all_pt_boundary,
621 consider_unshared_curve_edges);
628 bool consider_unshared_edges =
true,
629 bool consider_unshared_curve_edges =
true)
635 findPointGroupBoundary(pt_group, gdp, con_arr,
636 consider_unshared_edges,
637 consider_unshared_curve_edges);
644 bool consider_unshared_edges =
true,
645 bool consider_unshared_curve_edges =
true)
651 findVertexGroupBoundary(vtx_group, gdp, con_arr,
652 consider_unshared_edges,
653 consider_unshared_curve_edges);
660 bool consider_unshared_edges =
true,
661 bool consider_unshared_curve_edges =
true)
667 findEdgeGroupBoundary(edge_group, gdp, con_arr,
668 consider_unshared_edges,
669 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)