16class FMeshVertexSelection;
17class FMeshEdgeSelection;
48 TSet<int>::TRangedForIterator
begin() {
return Selected.begin(); }
49 TSet<int>::TRangedForConstIterator
begin()
const {
return Selected.begin(); }
50 TSet<int>::TRangedForIterator
end() {
return Selected.end(); }
51 TSet<int>::TRangedForConstIterator
end()
const {
return Selected.end(); }
70 return Selected.Num();
77 return Selected.Contains(
tid);
82 return Selected.Contains(
tid);
88 if (Mesh->IsTriangle(
tid))
99 if (Mesh->IsTriangle(
tid))
108 int NT = Mesh->MaxTriangleID();
121 Mesh->EnumerateVertexTriangles(vid, [&](
int tid)
128 for (
int vid : Vertices)
151 for (
int TID : Triangles)
157 template<
typename EnumerableType>
174 int NT = Mesh->MaxTriangleID();
177 if (Mesh->IsTriangle(
tid) && Mesh->GetTriangleGroup(
tid) ==
gid)
185 int NT = Mesh->MaxTriangleID();
188 if (Mesh->IsTriangle(
tid) && Mesh->GetTriangleGroup(
tid) !=
gid)
197 int NT = Mesh->MaxTriangleID();
200 if (Mesh->IsTriangle(
tid) && Mesh->GetTriangleGroup(
tid) ==
gid)
210 template<
typename EnumerableType,
typename StorageType>
225 template<
typename EnumerableType,
typename StorageType>
243 return Selected.Array();
248 for (
int tid : Selected)
260 if (Mesh->IsEdge(
eid))
263 bool bA = Selected.Contains(
EdgeT.A);
268 else if (Selected.Contains(
EdgeT.B) !=
bA)
283 for (
int tid : Selected)
286 for (
int j = 0; j < 3; ++j)
304 for (
int tid : Selected)
320 for (
int tid : Selected) {
322 for (
int j = 0; j < 3; ++j)
342 for (
int k = 0; k <
rounds; ++k)
396 while (stack.
Num() > 0)
402 for (
int j = 0; j < 3; ++j)
413 int EID = Mesh->GetTriEdge(
TID, j);
431 for (
int tid : Selected)
451 for (
int tid : Selected)
454 for (
int j = 0; j < 3; ++j)
471 return temp.Num() > 0;
477 bool bModified =
false;
486 bModified = bModified || !done;
487 }
while (!done &&
count++ < 25);
514 bool bModified =
false;
521 for (
int tid : Selected)
524 vertices.Add(
tv.A); vertices.Add(
tv.B); vertices.Add(
tv.C);
527 for (
int vid : vertices)
529 if (is_bowtie_vtx(vid))
531 Mesh->EnumerateVertexTriangles(vid, [&](
int TID)
547 bool is_bowtie_vtx(
int vid)
const
550 for (
int eid : Mesh->VtxEdgesItr(vid))
577 for (
int j = 0; j < 3; ++j )
#define ensure( InExpression)
Definition AssertionMacros.h:464
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ArrayView.h:139
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
Definition BitArray.h:350
Definition AssetRegistryState.h:50
Definition FunctionFwd.h:19
Definition DynamicMesh3.h:108
static constexpr int InvalidID
Definition DynamicMesh3.h:158
Definition MeshFaceSelection.h:21
GEOMETRYCORE_API void ContractBorderByOneRingNeighbours(int NumRings=1, bool bContractFromMeshBoundary=false, const TUniqueFunction< bool(int)> &FilterF=nullptr)
Definition MeshFaceSelection.cpp:149
int Num() const
Definition MeshFaceSelection.h:68
TSet< int >::TRangedForConstIterator end() const
Definition MeshFaceSelection.h:51
bool LocalOptimize(bool bClipFins, bool bFillEars, bool bFillTinyHoles=true, bool bClipLoners=true, bool bRemoveBowties=false)
Definition MeshFaceSelection.h:475
bool Contains(int tid) const
Definition MeshFaceSelection.h:80
void SelectVertexOneRing(int vid)
Definition MeshFaceSelection.h:119
TSet< int >::TRangedForIterator begin()
Definition MeshFaceSelection.h:48
void Select(int tid)
Definition MeshFaceSelection.h:85
TSet< int >::TRangedForIterator end()
Definition MeshFaceSelection.h:50
bool RemoveBowties()
Definition MeshFaceSelection.h:508
void SetDifference(const EnumerableType &SubtractSet, StorageType &DifferenceStorage) const
Definition MeshFaceSelection.h:211
bool LocalOptimize(bool bRemoveBowties=true)
Definition MeshFaceSelection.h:495
void SelectEdgeTris(int eid)
Definition MeshFaceSelection.h:134
const TSet< int > & AsSet() const
Definition MeshFaceSelection.h:237
bool ClipFins(bool bClipLoners)
Definition MeshFaceSelection.h:428
void FloodFill(int tSeed, const TUniqueFunction< bool(int)> &TriFilterF=nullptr, const TUniqueFunction< bool(int)> &EdgeFilterF=nullptr)
Definition MeshFaceSelection.h:380
bool remove_bowties()
Definition MeshFaceSelection.h:511
TSet< int >::TRangedForConstIterator begin() const
Definition MeshFaceSelection.h:49
bool IsSelected(int tid) const
Definition MeshFaceSelection.h:75
void SetIntersection(const EnumerableType &IntersectSet, StorageType &IntersectionStorage) const
Definition MeshFaceSelection.h:226
void Deselect(TArrayView< const int > Triangles)
Definition MeshFaceSelection.h:149
void SelectGroupInverse(int gid)
Definition MeshFaceSelection.h:183
void DeselectAll()
Definition MeshFaceSelection.h:166
TArray< int > FindBorderTris() const
Definition MeshFaceSelection.h:301
GEOMETRYCORE_API void ExpandToOneRingNeighbours(const TUniqueFunction< bool(int)> &FilterF=nullptr)
Definition MeshFaceSelection.cpp:53
bool FillEars(bool bFillTinyHoles)
Definition MeshFaceSelection.h:447
FMeshFaceSelection(const FDynamicMesh3 *mesh)
Definition MeshFaceSelection.h:29
TArray< int > AsArray() const
Definition MeshFaceSelection.h:241
TBitArray< FDefaultBitArrayAllocator > AsBitArray() const
Definition MeshFaceSelection.h:245
void ExpandToFaceNeighbours(const TUniqueFunction< bool(int)> &FilterF=nullptr)
Definition MeshFaceSelection.h:316
FMeshFaceSelection(const FDynamicMesh3 *mesh, int group_id)
Definition MeshFaceSelection.h:39
void ExpandToFaceNeighbours(int rounds, const TUniqueFunction< bool(int)> &FilterF=nullptr)
Definition MeshFaceSelection.h:340
void Deselect(const EnumerableType &Enumerable)
Definition MeshFaceSelection.h:158
void FloodFill(const TArray< int > &Seeds, const TUniqueFunction< bool(int)> &TriFilterF=nullptr, const TUniqueFunction< bool(int)> &EdgeFilterF=nullptr)
Definition MeshFaceSelection.h:389
TPair< bool, bool > IsSelectionBoundaryEdge(int32 eid) const
Definition MeshFaceSelection.h:258
void Deselect(int tid)
Definition MeshFaceSelection.h:145
TArray< int > FindNeighbourTris() const
Definition MeshFaceSelection.h:280
void SelectVertexOneRings(TArrayView< const int > Vertices)
Definition MeshFaceSelection.h:126
void Select(TFunctionRef< bool(int)> SelectF)
Definition MeshFaceSelection.h:106
void Select(const EnumerableType &Enumerable)
Definition MeshFaceSelection.h:95
void DeselectGroup(int gid)
Definition MeshFaceSelection.h:194
void SelectGroup(int gid)
Definition MeshFaceSelection.h:172
Definition MeshVertexSelection.h:19
Definition DynamicVector.h:27
void Add(const Type &Data)
Definition DynamicVector.h:662
const Type & Back() const
Definition DynamicVector.h:167
void PopBack()
Definition DynamicVector.h:717
size_t Num() const
Definition DynamicVector.h:147
constexpr int InvalidID
Definition IndexTypes.h:13
@ Mesh
Definition VulkanCommon.h:39
Definition AdvancedWidgetsModule.cpp:13
Definition IndexTypes.h:27
Definition IndexTypes.h:158