MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / diagonalieLoose

Function diagonalieLoose

Source/ThirdParty/recastnavigation/RecastMesh.cpp:292–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290
291
292static bool diagonalieLoose(int i, int j, int n, const int* verts, int* indices)
293{
294 const int* d0 = &verts[(indices[i] & 0x0fffffff) * 4];
295 const int* d1 = &verts[(indices[j] & 0x0fffffff) * 4];
296
297 // For each edge (k,k+1) of P
298 for (int k = 0; k < n; k++)
299 {
300 int k1 = next(k, n);
301 // Skip edges incident to i or j
302 if (!((k == i) || (k1 == i) || (k == j) || (k1 == j)))
303 {
304 const int* p0 = &verts[(indices[k] & 0x0fffffff) * 4];
305 const int* p1 = &verts[(indices[k1] & 0x0fffffff) * 4];
306
307 if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1))
308 continue;
309
310 if (intersectProp(d0, d1, p0, p1))
311 return false;
312 }
313 }
314 return true;
315}
316
317static bool inConeLoose(int i, int j, int n, const int* verts, int* indices)
318{

Callers 1

diagonalLooseFunction · 0.85

Calls 3

nextFunction · 0.70
vequalFunction · 0.70
intersectPropFunction · 0.70

Tested by

no test coverage detected