Commit Graph

54 Commits

Author SHA1 Message Date
Jimmy Andrews
6459e6d93f Make C-array exact predicate calls const-correct, and remove/deprecate confusing 'template VectorType' versions that were making the C-array versions difficult to call. To do the deprecation, the 'template VectorType' has been replaced with explicit inline functions that handle the existing vector types.
#rb david.hill
#preflight 637556d4953c19d4352a7bee

[CL 23184198 by Jimmy Andrews in ue5-main branch]
2022-11-17 16:46:44 -05:00
Jimmy Andrews
941db20dc4 fix incorrect direct assignments to TFunctionRef
#rb rex.hill
#preflight 63769b2cf514e1ded961caed

[CL 23183068 by Jimmy Andrews in ue5-main branch]
2022-11-17 15:52:12 -05:00
Jimmy Andrews
0a7d11eeb3 fix broken tet mesh test by making tets consistently generate by default in the UE orientation (orient3d gives negative sign), and switching the Validate function back to expecting that orientation
#rb tyson.brochu
#preflight 636d86315368a3230a6629e2

[CL 23090187 by Jimmy Andrews in ue5-main branch]
2022-11-10 18:45:07 -05:00
Jimmy Andrews
48486e8cb5 Add 3D Delaunay + tests
#rb david.hill
#preflight 636d3d0db839cb7ec554f864

[CL 23086658 by Jimmy Andrews in ue5-main branch]
2022-11-10 15:20:34 -05:00
Jimmy Andrews
5ad977f642 fix unity build by removing CA_SUPPRESS, as I could not reproduce the static analysis warning it was meant to suppress
#preflight 636bdacd376a9cd6a8a695e5
#rb trivial

[CL 23056660 by Jimmy Andrews in ue5-main branch]
2022-11-09 12:03:00 -05:00
Jimmy Andrews
c9905f983c Add InSphere to exact predicates + test coverage
#rb tyson.brochu
#preflight 636932a3ed07daaa9ab89d3b

[CL 23016482 by Jimmy Andrews in ue5-main branch]
2022-11-07 15:16:04 -05:00
jimmy andrews
56855bd081 Add a GetFace method to TConvexHull3 and use it to get polygonal faces for convex hulls when building a convex hull for Chaos. This makes us less likely to add near-degenerate faces for which we cannot compute the normals.
#rb Chris.Caulfield
#preflight 63613dae41625be270d322c4

[CL 22890192 by jimmy andrews in ue5-main branch]
2022-11-01 16:03:10 -04:00
jimmy andrews
4456058517 Make visual studio compile exact predicate code with precise math compile settings, for more consistent performance results, and change to generally compute in double precision for predicates where the 'difficult' cases can be ~50x more expensive to compute.
Add a TODO to reconsider the INEXACT volatile setting now that we compile with precise floating point math; preliminary testing indicates it should work and be significantly faster in 'difficult' cases.

#rb david.hill
#preflight 63327ebec7791417aa9b2737

[CL 22217357 by jimmy andrews in ue5-main branch]
2022-09-27 22:55:36 -04:00
jimmy andrews
4837ae2192 fix epsilon's type in extreme points class
#rb tyson.brochu
#preflight 632527cd121ffddebcc8c155

[CL 22086973 by jimmy andrews in ue5-main branch]
2022-09-19 21:55:34 -04:00
Jimmy Andrews
c0135363a4 add a Facing2 exact predicate
#rb david.hill
#preflight 62fa8554bd746abb9963712f

[CL 21400240 by Jimmy Andrews in ue5-main branch]
2022-08-15 22:08:00 -04:00
Jimmy Andrews
f29a8e9ddc fix rotating calipers failing to find extreme point due to two points on hull being close enough that they appear equal w.r.t. the extreme direction
fixes oriented bounding box not containing the output points in GeometryFlowTests

#jira UE-160567
#rb rinat.abdrashitov
#preflight 62f2c57ebc175ec68c148e6e

[CL 21298515 by Jimmy Andrews in ue5-main branch]
2022-08-09 16:57:45 -04:00
Jimmy Andrews
c21b7d49f3 Add new oriented box fit variant that starts from the fast DiTO box and optimizes the fit iteratively
+ Add ProgressCancel to box fits
+ Change editor code to use the new fit algorithms

#rb rinat.abdrashitov
#rb david.hill
#preflight 62f15a2ba035cdf05ea4d1b7

[CL 21273458 by Jimmy Andrews in ue5-main branch]
2022-08-08 15:20:28 -04:00
David Hill
9f5eeac1e3 Geometry: Suppress type conversion warnings in third party on clang
#preflight 62d6fdcdd54af4b9a29176a2
#rnx

[CL 21185144 by David Hill in ue5-main branch]
2022-07-20 14:04:32 -04:00
David Hill
5cd1c6b9cb GeometryCore: FitOrientedBox3 - fixing implicit conversion warning.
#preflight none

[CL 21165693 by David Hill in ue5-main branch]
2022-07-19 15:02:31 -04:00
David Hill
3feeb2386c Geometry: fix clang warning on android with 3rd party code.
#preflight none
#rnx

[CL 21165207 by David Hill in ue5-main branch]
2022-07-19 14:27:26 -04:00
David Hill
612f70bd55 GeometryCore, GeometryProcessing: Add pragmas to suppress implicit type conversion warnings when compiling third party code.
Predicates.cpp and  xaltas.cpp

#preflight 62d6cf9d1133256db6e4624a
#rb Jimmy.Andrews

[CL 21164760 by David Hill in ue5-main branch]
2022-07-19 13:53:50 -04:00
Jimmy Andrews
5214f714b5 Add a new FitOrientedBox3 algorithm
+ fixes to the similar Gte algorithm and to FitOrientedBox2
+ Add a Contain(Array) for TAxisAlignedBox3
+ Add option to save triangle adjacencies on computed 3D convex hull (since we already compute them)
+ Fix plane returned for degenerate convex hull result when Dimension=2
+ Let FitOrientedBox2 functions take a custom best-fit function, so that they can be used in the inner loop of FitOrientedBox3 when searching for the best-fit surface area

#rb david.hill
#preflight 62d56a783c3df32390b32263

[CL 21149570 by Jimmy Andrews in ue5-main branch]
2022-07-18 12:17:27 -04:00
Jimmy Andrews
bfe1c9e793 CIS fix: type mismatch between local functions in FitOrientedBox2.cpp
#preflight 62cefa3e127551eb254189bd

[CL 21074964 by Jimmy Andrews in ue5-main branch]
2022-07-13 13:35:58 -04:00
Jimmy Andrews
e24ae4281b Add functions to fit an oriented box2 to points, a simple polygon, or a convex hull
Add function to find a 2d convex hull of a simple polygon (faster than finding a convex hull of a point set)

#rb david.hill
#rb rinat.abdrashitov
#preflight 62cdb9a83c539c05f8145798

[CL 21070929 by Jimmy Andrews in ue5-main branch]
2022-07-13 10:39:04 -04:00
Jimmy Andrews
029c3e58ca Add new exact predicate to determine whether a triangle is "facing" a direction or not. This could be used e.g. to extract a convex horizon from a convex hull.
#rb david.hill
#preflight 62c46666a6654f97290ca62c

[CL 20950995 by Jimmy Andrews in ue5-main branch]
2022-07-05 17:58:25 -04:00
Jimmy Andrews
219d37ce96 add extra validation of CrossIdx values to make static analysis happy + be extra safe vs crash/inf loop
#preflight 62bb3610727d9bb33ba9ee01
#rb trivial
#jira UE-157840

[CL 20861873 by Jimmy Andrews in ue5-main branch]
2022-06-28 13:55:26 -04:00
Jimmy Andrews
d90649a633 add 2D Voronoi diagram support, built on the Delaunay triangulation code
#rb david.hill
#preflight 62ba64735d29d0d10af0e753

[CL 20845736 by Jimmy Andrews in ue5-main branch]
2022-06-28 00:15:39 -04:00
David Hill
857a3acd3e GeometryCore: Fixing unsafe typecast warnings in preparation for enabling such warnings for GeometryCore
#preflight 62acc6d2c0449d3dccc9b1d5
#rb Jimmy.Andrews

[CL 20710188 by David Hill in ue5-main branch]
2022-06-17 17:23:52 -04:00
David Hill
9fd3733c4d GeometryCore: DiTOrientedBox - fix bug that resulted in fallback to AABB in some cases.
#preflight 62ab406de9031caf98ab0ba4
#rb Tyson.Brochu

[CL 20691650 by David Hill in ue5-main branch]
2022-06-16 14:44:58 -04:00
Jimmy Andrews
b69ed195e9 fix convex hull's 'extreme points' algorithm not catching exactly collinear points as having dimension==1
#rb rinat.abdrashitov
#preflight 629a21fb9526040c3dea2d51

[CL 20537443 by Jimmy Andrews in ue5-main branch]
2022-06-07 10:09:45 -04:00