<?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/13542" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2023-03-01T08:13:57+00:00</updated>

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

		<entry>
		<author><name><![CDATA[sancelot88]]></name></author>
		<updated>2023-03-01T08:13:57+00:00</updated>

		<published>2023-03-01T08:13:57+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44269#p44269</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44269#p44269"/>
		<title type="html"><![CDATA[efficient collide detection improvements and questions]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44269#p44269"><![CDATA[
Hi,<br>I am working on an offline collision program.  The meshes are rigid bodies of a complex machine moving (models are convex meshes converted from creo/proe cad systems).<br><br>I have positions of each mesh depending on the time. For optimisation reasons, I have positions only when something is moving at least 0.5mm. This implies non constant delta times.<br>eg , positions for t0=0ms , t1=4ms, t2=10ms,t3=50ms ......(this is not real , but to illustrate ....)<br><br>I started with a basic collide algorithm in which at each time frame I am computing and setting a new physics world with the whole scene to perform collisions.<br>It works, but I is not really efficient regarding performance. <br><br>I would like now migrate to a continuous detection collision mode, in which I will set  positions (transformation matrix) of each mesh, without reconstructiong the whole physics world. Which orientations and modifications should be involved regarding my initial implementation ?<br><br><br>Here is basically the code I am using for each frame (with ammojs but does not sound being a pb).<br><div class="codebox"><p>Code: </p><pre><code> this._broadphase = new this.ammoInjection.btDbvtBroadphase(); this._collisionConfiguration = new this.ammoInjection.btDefaultCollisionConfiguration(); this._dispatcher = new this.ammoInjection.btCollisionDispatcher(this._collisionConfiguration); this._physicsWorld = new this.ammoInjection.btCollisionWorld(        this._dispatcher,        this._broadphase,        this._collisionConfiguration      );for each mesh:    const shape = new this.ammoInjection.btConvexTriangleMeshShape(trimesh, true);    const m = new this.ammoInjection.btCollisionObject();    m.setCollisionShape(shape);    this._physicsWorld.addCollisionObject(m, mesh.collisionGroup, mesh.collisionMask);this._physicsWorld.performDiscreteCollisionDetection();// collect manifolds ...</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14553">sancelot88</a> — Wed Mar 01, 2023 8:13 am</p><hr />
]]></content>
	</entry>
	</feed>
