MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / test_collision

Function test_collision

test_python/test_collision.py:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def test_collision():
6 torus = mrmesh.makeTorus(2, 1, 10, 10, None)
7 torus2 = mrmesh.makeTorus(2, 1, 10, 10, None)
8
9 transVector = mrmesh.Vector3f()
10 transVector.x = 0.5
11 transVector.y = 1
12 transVector.z = 1
13 diffXf = mrmesh.AffineXf3f.translation(transVector)
14 torus2.transform(diffXf)
15
16 xf = mrmesh.AffineXf3f()
17 torus1 = torus
18 pairs = mrmesh.findCollidingTriangles(torus1, torus2)
19 # at least 100 triangles should collide for that transforms
20 assert len(pairs) > 103

Callers

nothing calls this directly

Calls 2

translationMethod · 0.80
transformMethod · 0.45

Tested by

no test coverage detected