Commit Graph

18 Commits

Author SHA1 Message Date
Jimmy Andrews
20f8e9cd7e Make a new triangulation fill mode that supports explicit boundary and hole edges
Update Arrangement2d's triangulation functions to use that fill mode, and also to be explicit about whether the boundary group is expected or not

#rb david.hill
#rb rinat.abdrashitov
#preflight 6269606c8c2782e4f2327a34

[CL 19941732 by Jimmy Andrews in ue5-main branch]
2022-04-27 12:30:18 -04:00
Jimmy Andrews
b91c89e1b4 improve convex decompositions by adding a concept of 'too thin' parts that the decomposition must remove in the merge phase
also fix handling of splitting into connected components when some of the components don't have a valid convex hull (by bailing on the component split in that case)

#rb rinat.abdrashitov
#preflight 6255ec9eef3d24a90eb4e00f

[CL 19730210 by Jimmy Andrews in ue5-main branch]
2022-04-12 17:42:14 -04:00
Jimmy Andrews
ec5013e106 change FArrangement2d and TConstrainedDelaunay2 to use new FDelaunay2 code for triangulations
#rb david.hill
#preflight 6247dfee3a5a4c1622eb077b

[CL 19628412 by Jimmy Andrews in ue5-main branch]
2022-04-05 14:07:13 -04:00
Jimmy Andrews
4f0c122342 Add optional error tolerances to guide convex decomposition
#rb tyson.brochu
#preflight 62465633df7d23dbfe12e1f7

[CL 19582884 by Jimmy Andrews in ue5-main branch]
2022-03-31 21:49:52 -04:00
Jimmy Andrews
9d14bf8718 Initial version of a convex decomposition algorithm
Works by trying a bunch of plane cuts to break reduce the volume of the convex pieces, then merging them back together to remove those that were not helpful.  We need the merge step especially for meshes where it takes multiple plane cuts to start reducing the hull volumes, as the initial cuts in that case are not informed by the error metric.

#rb tyson.brochu
#rb matija.kecman
#preflight 624614b1b6084b98324d2059

[CL 19578614 by Jimmy Andrews in ue5-main branch]
2022-03-31 17:09:04 -04:00
Jimmy Andrews
dc806da34f Delaunay triangulation algorithm improvements:
- fix bug with detection of vertices on the solid segment of a ghost triangle
 - detect when 'fill' of a triangulation is ambiguous under winding rules (e.g. due to open edges)
 - optionally automatically track duplicate vertices and remap duplicate-vertex references to the vertex that was actually inserted

#rb rinat.abdrashitov
#preflight 623e11a9982d12a89973cdec

[CL 19521151 by Jimmy Andrews in ue5-main branch]
2022-03-25 23:09:50 -04:00
Jimmy Andrews
86b896a04a update new Delaunay code to be more usable:
- Report failures to constrain edges, optionally detecting the case where the edge was flipped away by a subsequent constraint (happens if the constraint edges intersect)
 - Add options to directly triangulation TPolygon2 and TGeneralPolygon2 (+ the supporting fill algorithms to be run on any array of edges)
 - Add validation of Delaunay property for CDTs on all non-constrained edges
 - Update edge cache (if enabled) on sub-triangulation append, improving perf on CDTs with many constrained edges

add corresponding test coverage, and change the test runner to always automatically run exact predicates globalinit

#preflight 62321d0fe2541b4ff3b35efd
#rb rinat.abdrashitov

[CL 19408363 by Jimmy Andrews in ue5-main branch]
2022-03-16 13:44:59 -04:00
Jimmy Andrews
b885b54c1d new Delaunay triangulation code using robust predicates
Much faster and usable from non-plugin code

#rb rinat.abdrashitov
#rb tyson.brochu
#preflight 622a6e9632749f363c5a22ba

[CL 19341780 by Jimmy Andrews in ue5-main branch]
2022-03-10 16:41:30 -05:00
Jimmy Andrews
4b4a4c2d3c Exact Predicates improvements:
- Support InCircle
 - Support float as well as double
 - Add safer, templated versions that specify whether float or double is to be used (for TVector/TVector2)

#rb rinat.abdrashitov
#preflight 62277e1e7077eb04cf6db63d

[CL 19309153 by Jimmy Andrews in ue5-main branch]
2022-03-08 15:01:31 -05:00
david hill
1ee7fe9e8e Geometry Core: Oriented bounding box, DiTO algorithm. Expose option for client code to provide sample direction vectors, and add simple unit test.
#rb rinat.Abdrashitov
#preflight 61b10e7ce01bc44973f94e8b

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 18413789 in //UE5/Release-5.0/... via CL 18413818
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18413827 by david hill in ue5-release-engine-test branch]
2021-12-08 17:48:18 -05:00
david hill
42bd36bdde Geometry Core: Add heuristic-based computation of an object oriented bounding box, the DiTO method, also add some related unit tests
#rb rinat.abdrashitov
#preflight 61b0c8525c61dba07bf4b2f5

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 18406239 in //UE5/Release-5.0/... via CL 18406245
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18406254 by david hill in ue5-release-engine-test branch]
2021-12-08 10:43:24 -05:00
jimmy andrews
dd504cbb48 speculative CIS fix for mac link error (not finding TExtremePoints3::Init)
#jira UE-134452
#preflight 618c30c0857f725e2961a5a4

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18137930 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18137971 by jimmy andrews in ue5-release-engine-test branch]
2021-11-10 16:13:40 -05:00
jimmy andrews
ddb768d1f7 add simplification option to geometry collection convex generation/tool
#jira UE-134112
#rb rinat.abdrashitov
#preflight 618ae07e9239fd6016163eb4

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18113284 in //UE5/Release-5.0/... via CL 18113291
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18113317 by jimmy andrews in ue5-release-engine-test branch]
2021-11-09 16:42:56 -05:00
jimmy andrews
ee57dd4ec7 Update TriangulateSimplePolygon to by-default orient its output triangles in the most-often-desired orientation (w/ triangle winding the opposite of the polygon winding, for example this is desirable when the polygon is generated from boundary edges on a hole to be filled)
Add test coverage for polygon triangulation functions to ensure they create triangulations with the expected orientations

#jira UE-133286
#rb rinat.abdrashitov
#rnx
#preflight 6181fc82612e950001c9b4ee

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18032811 in //UE5/Release-5.0/... via CL 18032831
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18032838 by jimmy andrews in ue5-release-engine-test branch]
2021-11-03 09:39:16 -04:00
ryan schmidt
6437ecc4a1 GeometryCore: replace all usage of GeometryCore FVector3<T> with TVector<T>, remove FVector3<T> and GVector4<T>
#rb none
#rnx
#jira none
#preflight 614ce33574f7e70001ea822b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17617027 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17617043 by ryan schmidt in ue5-release-engine-test branch]
2021-09-23 19:38:55 -04:00
ryan schmidt
4e422005cd GeometryCore: Add minimal UE::Math::TVector2<T> implementation and FVector2f/2d typedefs locally in GeometryCore VectorTypes.h. Replace existing FVector2<T> with this class, in preparation for LWC conversion. FVector2 members ::Distance() and ::DistanceSquared() moved to free functions. Update all call sites and references to FVector2.
#rb jimmy.andrews
#rnx
#jira none
#preflight 612d248c423a8f00013287f2

#ROBOMERGE-SOURCE: CL 17359821 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17359838 by ryan schmidt in ue5-release-engine-test branch]
2021-08-30 18:03:07 -04:00
tyson brochu
9d2b0fdde3 Move ConvexHull2, ConvexHull3, and exact predicates into GeometryCore/CompGeom. Change them all to use the UE::Geometry namespace. Copy associated TPS files as needed.
#ushell-cherrypick of 16542896 by swarm
#rb ryan.schmidt

[CL 16575323 by tyson brochu in ue5-main branch]
2021-06-07 15:02:12 -04:00
Ryan Schmidt
623e4f96fe GeometryCore: create new GeometryCore Module. Move GeometricObjects code from GeometryProcessing plugin to this new module, as well as core FDynamicMesh3 classes (attributes, aabbtree/octree, change tracking). Update module Build.cs files that reference GeometricObjects.
#rb none
#rnx
#jira none
#preflight 60a713700569f300014a064a

[CL 16415082 by Ryan Schmidt in ue5-main branch]
2021-05-21 01:04:38 -04:00