MCPcopy Create free account
hub / github.com/ByteArena/box2d / B2TestOverlapShapes

Function B2TestOverlapShapes

CollisionB2Collision.go:484–500  ·  view source on GitHub ↗
(shapeA B2ShapeInterface, indexA int, shapeB B2ShapeInterface, indexB int, xfA B2Transform, xfB B2Transform)

Source from the content-addressed store, hash-verified

482}
483
484func B2TestOverlapShapes(shapeA B2ShapeInterface, indexA int, shapeB B2ShapeInterface, indexB int, xfA B2Transform, xfB B2Transform) bool {
485 input := MakeB2DistanceInput()
486 input.ProxyA.Set(shapeA, indexA)
487 input.ProxyB.Set(shapeB, indexB)
488 input.TransformA = xfA
489 input.TransformB = xfB
490 input.UseRadii = true
491
492 cache := MakeB2SimplexCache()
493 cache.Count = 0
494
495 output := MakeB2DistanceOutput()
496
497 B2Distance(&output, &cache, &input)
498
499 return output.Distance < 10.0*B2_epsilon
500}

Callers 1

B2ContactUpdateFunction · 0.85

Calls 5

MakeB2DistanceInputFunction · 0.85
MakeB2SimplexCacheFunction · 0.85
MakeB2DistanceOutputFunction · 0.85
B2DistanceFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected