Commit Graph

22 Commits

Author SHA1 Message Date
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
ea5e78a8e0 fix exact predicate test failures -- use volatile for INEXACT to force rounding
#preflight 622fce37ce577e3ab2e0b680

[CL 19380794 by Jimmy Andrews in ue5-main branch]
2022-03-14 20:24:15 -04:00
jimmy andrews
6b870db4fe Fix convex hull crashes (due to zero points and due to exact predicate failure)
add geometry processing low level test coverage for both cases

#jira UE-145703
#preflight 622fa7be306f46da14592f0b
#rb tyson.brochu
#lockdown simon.tourangeau

#ROBOMERGE-OWNER: jimmy.andrews
#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 19378695 in //UE5/Release-5.0/... via CL 19380177
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19380762 by jimmy andrews in ue5-main branch]
2022-03-14 20:15:28 -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
46ea937c73 make convex hull code work directly with floats if the input is in floats, rather than converting everything to doubles
#rb tyson.brochu
#preflight 622905196e026fc824ab3a4e

[CL 19326164 by Jimmy Andrews in ue5-main branch]
2022-03-09 16:45:56 -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
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
michael balzer
b8a1c9b6cf GeometryCore: Remove ExplicitUseGeometryMathTypes.h
#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 18227685 in //UE5/Release-5.0/... via CL 18229350
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18231457 by michael balzer in ue5-release-engine-test branch]
2021-11-17 19:02:44 -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
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -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