MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / Overlaps

Function Overlaps

src/luxrays/core/geometry/bbox.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool Overlaps(BBox &result, const BBox &b1, const BBox &b2) {
52 if (!b1.Overlaps(b2))
53 return false;
54
55 result.pMin.x = Max(b1.pMin.x, b2.pMin.x);
56 result.pMin.y = Max(b1.pMin.y, b2.pMin.y);
57 result.pMin.z = Max(b1.pMin.z, b2.pMin.z);
58 result.pMax.x = Min(b1.pMax.x, b2.pMax.x);
59 result.pMax.y = Min(b1.pMax.y, b2.pMax.y);
60 result.pMax.z = Min(b1.pMax.z, b2.pMax.z);
61
62 return true;
63}
64
65void BBox::BoundingSphere(Point *c, float *rad) const {
66 *c = .5f * (pMin + pMax);

Callers

nothing calls this directly

Calls 3

MaxFunction · 0.85
MinFunction · 0.85
OverlapsMethod · 0.80

Tested by

no test coverage detected