MCPcopy Index your code
hub / github.com/ad-si/LuaCAD / intersectXY

Function intersectXY

OpenCSG/src/primitiveHelper.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32 namespace Algo {
33 bool intersectXY(const Primitive* a, const Primitive* b) {
34 float aminx, aminy, aminz, amaxx, amaxy, amaxz,
35 bminx, bminy, bminz, bmaxx, bmaxy, bmaxz;
36 a->getBoundingBox(aminx, aminy, aminz, amaxx, amaxy, amaxz);
37 b->getBoundingBox(bminx, bminy, bminz, bmaxx, bmaxy, bmaxz);
38
39 return (bmaxx >= aminx) && (amaxx >= bminx)
40 && (bmaxy >= aminy) && (amaxy >= bminy);
41 }
42
43 bool intersectXYZ(const Primitive* a, const Primitive* b) {
44 float aminx, aminy, aminz, amaxx, amaxy, amaxz,

Callers 1

BatcherMethod · 0.85

Calls 1

getBoundingBoxMethod · 0.80

Tested by

no test coverage detected