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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-03-31T14:43:05+00:00</updated>

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

		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2021-03-31T14:43:05+00:00</updated>

		<published>2021-03-31T14:43:05+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43372#p43372</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43372#p43372"/>
		<title type="html"><![CDATA[Re: Use of api（CreateFromTriMesh）]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43372#p43372"><![CDATA[
I looked at the code for <strong class="text-strong">btSoftBody</strong>.  AFAICT the <strong class="text-strong">m_collisionDisabledObjects</strong> vector date member of that class is used when linking soft bodies together with "anchors".  If you're not doing that then you would expect that vector container to be empty.<br><br>The <strong class="text-strong">m_bodySolver</strong> is set internally, implicitly when adding the body to the world.  The code for setting it looks like this:<div class="codebox"><p>Code: </p><pre><code>        // Set the solver that handles this soft body        // Should not be allowed to get out of sync with reality        // Currently called internally on addition to the world        void setSoftBodySolver(btSoftBodySolver* softBodySolver)        {                m_softBodySolver = softBodySolver;        }</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Mar 31, 2021 2:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[water]]></name></author>
		<updated>2021-03-31T06:35:11+00:00</updated>

		<published>2021-03-31T06:35:11+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43371#p43371</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43371#p43371"/>
		<title type="html"><![CDATA[Re: Use of api（CreateFromTriMesh）]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43371#p43371"><![CDATA[
Thank you very much for your reply.<br><br>I tried to use btSoftBodyHelpers::CreateFromTriMesh and btSoftBodyHelpers::CreateFromConvexHull to create the softbody but it has been unsuccessful. Could you please tell me why?<br><br><img src="http://m.qpic.cn/psc?/V14M18zN39zIp3/ruAMsa53pVQWN7FLK88i5mEj2SDH6ULwIpVlyN2ezDVC1iVGX4.505WrMvdAzk8ox9fwOGrCrHcx5I2aXi0DjftcUD9fI7KlVWz8b3nf2FM!/mnull&amp;bo=hwUcAAAAAAADB7w!&amp;rf=photolist&amp;t=5" class="postimage" alt="Image"><br><br>m_size=0 and -m_softBodySolver0x0000000000000000 &lt;NULL&gt;btSoftBodySolver *<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13653">water</a> — Wed Mar 31, 2021 6:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2021-03-24T14:46:46+00:00</updated>

		<published>2021-03-24T14:46:46+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43364#p43364</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43364#p43364"/>
		<title type="html"><![CDATA[Re: Use of api（CreateFromTriMesh）]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43364#p43364"><![CDATA[
You should examine the implementation of <strong class="text-strong">btSoftBodyHelpers::CreateFromTriMesh()</strong> inside the CPP file to see how they are used.  But I would guess:<br><br><strong class="text-strong">const btScalar* vertices</strong> is a pointer to a buffer of btScalar representing the float or double (depending on if btScaler is a float or double) values the vertices.  I would assume (but you can verify by looking at the code) the vertices are in order: <strong class="text-strong">xyzxyzxyx...</strong>, where each set of three represents a 3D point.<br><br><strong class="text-strong">const int* triangles</strong> is a pointer to a buffer of int indices representing offsets to points inside the vertices buffer.  I would assume (but you can verify by looking at the code) the indices are ordered in sets of three: <strong class="text-strong">abcabcabc...</strong> where each <strong class="text-strong">abc</strong> indexes the three points of a triangle.<br><br><strong class="text-strong">int ntriangles</strong> is "number of triangles".  This means the <strong class="text-strong">triangles</strong> buffer must be <strong class="text-strong">3*ntriangles</strong> long.  The length of the <strong class="text-strong">vertices</strong> buffer doesn't matter to the function call: if done correctly the <strong class="text-strong">triangles</strong> indices should never offset outside of it.<br><br><strong class="text-strong">bool randomizeConstraints = true</strong> determines if the constraints in the soft body should be solved randomly or systematically.  I think: best to leave this <strong class="text-strong">true</strong> unless you really know how the SoftBody solver works.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Mar 24, 2021 2:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[water]]></name></author>
		<updated>2021-03-24T02:28:44+00:00</updated>

		<published>2021-03-24T02:28:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43363#p43363</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43363#p43363"/>
		<title type="html"><![CDATA[Use of api（CreateFromTriMesh）]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43363#p43363"><![CDATA[
static btSoftBody* CreateFromTriMesh(btSoftBodyWorldInfo&amp; worldInfo,<br>const btScalar* vertices,<br>const int* triangles,<br>int ntriangles,<br>bool randomizeConstraints = true);<br>Hello, can you help me explain what these parameters represent and how to obtain them?<br>const btScalar* vertices,<br>const int* triangles,<br>int ntriangles,<br>thank you very much<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13653">water</a> — Wed Mar 24, 2021 2:28 am</p><hr />
]]></content>
	</entry>
	</feed>
