<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/7543" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2011-10-18T03:25:14+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/7543</id>

		<entry>
		<author><name><![CDATA[hintse]]></name></author>
		<updated>2011-10-18T03:25:14+00:00</updated>

		<published>2011-10-18T03:25:14+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25880#p25880</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25880#p25880"/>
		<title type="html"><![CDATA[Least Distance Calculation Between Compound Shapes]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25880#p25880"><![CDATA[
Hi all,<br><br>I am trying to use Bullet Engine to calculate the least distances between two objects.  I do this using contactPairTest.  This seems to work with two convex objects at least.  However, when I try to find the minimum distance between a convex object and a compound shape, Bullet produces a segmentation fault.  I know that Bullet can't compute the positive distance between a convex and a concave shape but seeing that a compound shape is composed of convex shapes, shouldn't finding the least distance between a compound and a convex shape be possible?<br><br>Thanks in advance!<br><div class="codebox"><p>Code: </p><pre><code>btDefaultCollisionConfiguration collisionConfiguration;btCollisionDispatcher dispatcher(&amp;collisionConfiguration);btDbvtBroadphase pairCache;btCollisionWorld world(&amp;dispatcher, &amp;pairCache, &amp;collisionConfiguration);world.getDispatchInfo().m_convexMaxDistanceUseCPT = true; MyContactResultCallback result; result.drawMinDistance = drawMinDistance;btCollisionObject obA;obA.setCollisionShape(bds[nodeID0]-&gt;shape);obA.setWorldTransform(*(bds[nodeID0]-&gt;transShapeAbsolute));btCollisionObject obB;obB.setCollisionShape(bds[nodeID1]-&gt;shape);obB.setWorldTransform(*(bds[nodeID1]-&gt;transShapeAbsolute));result.collisionWorld = collisionWorld;cout&lt;&lt;"calculating minimum distance"&lt;&lt;endl;world.contactPairTest(&amp;obA, &amp;obB, result);</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8828">hintse</a> — Tue Oct 18, 2011 3:25 am</p><hr />
]]></content>
	</entry>
	</feed>
