MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getOverlap

Method getOverlap

Engine/source/math/mBox.h:332–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332inline Box3F Box3F::getOverlap( const Box3F& otherBox ) const
333{
334 Box3F overlap;
335
336 for( U32 i = 0; i < 3; ++ i )
337 {
338 if( minExtents[ i ] > otherBox.maxExtents[ i ] || otherBox.minExtents[ i ] > maxExtents[ i ] )
339 {
340 overlap.minExtents[ i ] = 0.f;
341 overlap.maxExtents[ i ] = 0.f;
342 }
343 else
344 {
345 overlap.minExtents[ i ] = getMax( minExtents[ i ], otherBox.minExtents[ i ] );
346 overlap.maxExtents[ i ] = getMin( maxExtents[ i ], otherBox.maxExtents[ i ] );
347 }
348 }
349
350 return overlap;
351}
352
353inline F32 Box3F::getVolume() const
354{

Callers 2

buildPolyListMethod · 0.80
TESTFunction · 0.80

Calls 1

getMaxFunction · 0.85

Tested by 1

TESTFunction · 0.64