Skip to content

Commit

Permalink
updated documents.
Browse files Browse the repository at this point in the history
  • Loading branch information
erayzesen committed Jan 24, 2025
1 parent ebfff4e commit 0daf7fc
Show file tree
Hide file tree
Showing 9 changed files with 411 additions and 404 deletions.
14 changes: 7 additions & 7 deletions documentation/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ <h2><a class="anchor" id="autotoc_md1"></a>
<div class="ttc" id="aclassQBody_html_ae6a1c93344bc3bb6dec7af799322dc06"><div class="ttname"><a href="classQBody.html#ae6a1c93344bc3bb6dec7af799322dc06">QBody::SetPosition</a></div><div class="ttdeci">QBody * SetPosition(QVector value, bool withPreviousPosition=true)</div><div class="ttdef"><b>Definition:</b> qbody.h:387</div></div>
<div class="ttc" id="aclassQBody_html_aed4e1d6a40939f66336767b551a9845e"><div class="ttname"><a href="classQBody.html#aed4e1d6a40939f66336767b551a9845e">QBody::SetRotation</a></div><div class="ttdeci">QBody * SetRotation(float angleRadian, bool withPreviousRotation=true)</div><div class="ttdef"><b>Definition:</b> qbody.h:432</div></div>
<div class="ttc" id="aclassQRigidBody_html"><div class="ttname"><a href="classQRigidBody.html">QRigidBody</a></div><div class="ttdoc">QRigidBody is a type of body that is simulated with the dynamics of Rigid body. A rigid body is a typ...</div><div class="ttdef"><b>Definition:</b> qrigidbody.h:40</div></div>
<div class="ttc" id="aclassQWorld_html_aaaedfc8a0f251d74fe26cb2f9dcb6a23"><div class="ttname"><a href="classQWorld.html#aaaedfc8a0f251d74fe26cb2f9dcb6a23">QWorld::AddBody</a></div><div class="ttdeci">QWorld * AddBody(QBody *body)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:430</div></div>
<div class="ttc" id="aclassQWorld_html_aaaedfc8a0f251d74fe26cb2f9dcb6a23"><div class="ttname"><a href="classQWorld.html#aaaedfc8a0f251d74fe26cb2f9dcb6a23">QWorld::AddBody</a></div><div class="ttdeci">QWorld * AddBody(QBody *body)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:433</div></div>
<div class="ttc" id="astructQMesh_html"><div class="ttname"><a href="structQMesh.html">QMesh</a></div><div class="ttdoc">Every QBody object requires meshes. In other traditional physics engines, the term 'shape' is used in...</div><div class="ttdef"><b>Definition:</b> qmesh.h:48</div></div>
<div class="ttc" id="astructQMesh_html_a46fdef1c61a493ed8bd1673604152af1"><div class="ttname"><a href="structQMesh.html#a46fdef1c61a493ed8bd1673604152af1">QMesh::CreateWithRect</a></div><div class="ttdeci">static QMesh * CreateWithRect(QVector size, QVector centerPosition=QVector::Zero(), QVector grid=QVector::Zero(), bool enableSprings=true, bool enablePolygons=true, float particleRadius=0.5f)</div><div class="ttdoc">Creates a mesh with a rectangle shape.</div><div class="ttdef"><b>Definition:</b> qmesh.cpp:634</div></div>
<div class="ttc" id="astructQMesh_html_a46fdef1c61a493ed8bd1673604152af1"><div class="ttname"><a href="structQMesh.html#a46fdef1c61a493ed8bd1673604152af1">QMesh::CreateWithRect</a></div><div class="ttdeci">static QMesh * CreateWithRect(QVector size, QVector centerPosition=QVector::Zero(), QVector grid=QVector::Zero(), bool enableSprings=true, bool enablePolygons=true, float particleRadius=0.5f)</div><div class="ttdoc">Creates a mesh with a rectangle shape.</div><div class="ttdef"><b>Definition:</b> qmesh.cpp:697</div></div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md2"></a>
Creating a Soft Body</h2>
<p>Just like with rigid bodies, to create a soft body, we need to create a <a class="el" href="classQSoftBody.html">QSoftBody</a> object. Then, we need to create a <a class="el" href="structQMesh.html" title="Every QBody object requires meshes. In other traditional physics engines, the term &#39;shape&#39; is used in...">QMesh</a> that defines the shape of our soft body and add it to the <a class="el" href="classQSoftBody.html" title="QSoftBody is a body type that defines deformable, soft objects in the physics world....">QSoftBody</a> object. Finally, we add our new soft body to the physics world, i.e., <a class="el" href="classQWorld.html" title="A QWorld object is required to create a physics simulation. The QWorld class manages the entire physi...">QWorld</a>.</p>
Expand All @@ -146,7 +146,7 @@ <h2><a class="anchor" id="autotoc_md1"></a>
<div class="line"><span class="comment">//Add the Soft Body to the World</span></div>
<div class="line">world-&gt;<a class="code" href="classQWorld.html#aaaedfc8a0f251d74fe26cb2f9dcb6a23">AddBody</a>(body);</div>
<div class="ttc" id="aclassQSoftBody_html"><div class="ttname"><a href="classQSoftBody.html">QSoftBody</a></div><div class="ttdoc">QSoftBody is a body type that defines deformable, soft objects in the physics world....</div><div class="ttdef"><b>Definition:</b> qsoftbody.h:35</div></div>
<div class="ttc" id="astructQMesh_html_a75523f7fed5db8b2e3c6aa6e55afac58"><div class="ttname"><a href="structQMesh.html#a75523f7fed5db8b2e3c6aa6e55afac58">QMesh::CreateWithPolygon</a></div><div class="ttdeci">static QMesh * CreateWithPolygon(float radius, int sideCount, QVector centerPosition=QVector::Zero(), int polarGrid=-1, bool enableSprings=true, bool enablePolygons=true, float particleRadius=0.5f)</div><div class="ttdoc">Creates a mesh with a convex polygon shape.</div><div class="ttdef"><b>Definition:</b> qmesh.cpp:628</div></div>
<div class="ttc" id="astructQMesh_html_a75523f7fed5db8b2e3c6aa6e55afac58"><div class="ttname"><a href="structQMesh.html#a75523f7fed5db8b2e3c6aa6e55afac58">QMesh::CreateWithPolygon</a></div><div class="ttdeci">static QMesh * CreateWithPolygon(float radius, int sideCount, QVector centerPosition=QVector::Zero(), int polarGrid=-1, bool enableSprings=true, bool enablePolygons=true, float particleRadius=0.5f)</div><div class="ttdoc">Creates a mesh with a convex polygon shape.</div><div class="ttdef"><b>Definition:</b> qmesh.cpp:691</div></div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md3"></a>
Addinational QMesh features for Soft Bodies</h3>
<p>For rigid body objects, only particles and the outer edges connecting them are sufficient. However, for soft body structures, you need additional internal particles and spring connections. In the <a class="el" href="structQMesh.html" title="Every QBody object requires meshes. In other traditional physics engines, the term &#39;shape&#39; is used in...">QMesh</a> class, while creating primitive shapes such as quads or regular polygons, you can form grid networks with spring connections inside these shapes. This explains why the class is named 'mesh' instead of a more conventional 'shape'-derived name.</p>
Expand All @@ -172,7 +172,7 @@ <h2><a class="anchor" id="autotoc_md4"></a>
<div class="line"><span class="comment">//Add the Joint to the World</span></div>
<div class="line">world-&gt;<a class="code" href="classQWorld.html#a62394f07462a94a489108ae7f0eb99c1">AddJoint</a>(joint);</div>
<div class="ttc" id="aclassQJoint_html"><div class="ttname"><a href="classQJoint.html">QJoint</a></div><div class="ttdoc">QJoint objects serves to apply various distance constraints between rigid bodies. Additionally,...</div><div class="ttdef"><b>Definition:</b> qjoint.h:37</div></div>
<div class="ttc" id="aclassQWorld_html_a62394f07462a94a489108ae7f0eb99c1"><div class="ttname"><a href="classQWorld.html#a62394f07462a94a489108ae7f0eb99c1">QWorld::AddJoint</a></div><div class="ttdeci">QWorld * AddJoint(QJoint *joint)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:704</div></div>
<div class="ttc" id="aclassQWorld_html_a62394f07462a94a489108ae7f0eb99c1"><div class="ttname"><a href="classQWorld.html#a62394f07462a94a489108ae7f0eb99c1">QWorld::AddJoint</a></div><div class="ttdeci">QWorld * AddJoint(QJoint *joint)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:707</div></div>
</div><!-- fragment --><p> <a class="el" href="classQJoint.html" title="QJoint objects serves to apply various distance constraints between rigid bodies. Additionally,...">QJoint</a> objects not only connect two rigid bodies, but you can also set one of the bodies to nullptr and configure the anchor position of the joint to a position in the world, thereby connecting a rigid body to this point in space.</p>
<div class="fragment"><div class="line"><span class="comment">//Create a Joint</span></div>
<div class="line"><a class="code" href="classQJoint.html">QJoint</a> *mouseJoint=<span class="keyword">new</span> <a class="code" href="classQJoint.html">QJoint</a> (bodyA, anchorWorldPositionA, mousePosition, <span class="keyword">nullptr</span>);</div>
Expand Down Expand Up @@ -208,9 +208,9 @@ <h2><a class="anchor" id="autotoc_md6"></a>
<div class="line">world-&gt;<a class="code" href="classQWorld.html#af8da8c8a5148dd97440b3df30598d131">RemoveJoint</a>(myJoint)</div>
<div class="line"><span class="comment">//Remove a Spring</span></div>
<div class="line">world-&gt;<a class="code" href="classQWorld.html#a354771cf068f3e1d09e4d4274eac0d8f">RemoveSpring</a>(mySpring)</div>
<div class="ttc" id="aclassQWorld_html_a354771cf068f3e1d09e4d4274eac0d8f"><div class="ttname"><a href="classQWorld.html#a354771cf068f3e1d09e4d4274eac0d8f">QWorld::RemoveSpring</a></div><div class="ttdeci">QWorld * RemoveSpring(QSpring *spring)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:753</div></div>
<div class="ttc" id="aclassQWorld_html_a853c2f727898c3219bded310cbe209bc"><div class="ttname"><a href="classQWorld.html#a853c2f727898c3219bded310cbe209bc">QWorld::RemoveBody</a></div><div class="ttdeci">QWorld * RemoveBody(QBody *body)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:444</div></div>
<div class="ttc" id="aclassQWorld_html_af8da8c8a5148dd97440b3df30598d131"><div class="ttname"><a href="classQWorld.html#af8da8c8a5148dd97440b3df30598d131">QWorld::RemoveJoint</a></div><div class="ttdeci">QWorld * RemoveJoint(QJoint *joint)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:716</div></div>
<div class="ttc" id="aclassQWorld_html_a354771cf068f3e1d09e4d4274eac0d8f"><div class="ttname"><a href="classQWorld.html#a354771cf068f3e1d09e4d4274eac0d8f">QWorld::RemoveSpring</a></div><div class="ttdeci">QWorld * RemoveSpring(QSpring *spring)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:756</div></div>
<div class="ttc" id="aclassQWorld_html_a853c2f727898c3219bded310cbe209bc"><div class="ttname"><a href="classQWorld.html#a853c2f727898c3219bded310cbe209bc">QWorld::RemoveBody</a></div><div class="ttdeci">QWorld * RemoveBody(QBody *body)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:447</div></div>
<div class="ttc" id="aclassQWorld_html_af8da8c8a5148dd97440b3df30598d131"><div class="ttname"><a href="classQWorld.html#af8da8c8a5148dd97440b3df30598d131">QWorld::RemoveJoint</a></div><div class="ttdeci">QWorld * RemoveJoint(QJoint *joint)</div><div class="ttdef"><b>Definition:</b> qworld.cpp:719</div></div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md7"></a>
Summary</h2>
<p>With this page, you have gained basic knowledge about using QuarkPhysics. For more details, you can review the API documentation, check the source code of the example scenes, or ask your questions on GitHub. </p>
Expand Down
2 changes: 1 addition & 1 deletion documentation/navtreedata.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var NAVTREEINDEX =
"annotated.html",
"classQParticle.html#a15a9ee92820bf91ec5ef9cc6c8838aef",
"classQWorld.html#a5b6a36a5ba21082100f67987420992c7",
"structQMesh.html#afab856b716f627605af0ae934f0a0cd9"
"structQMesh.html#afd9df1b7b5f8a6c532892d9353ab930b"
];

var SYNCONMSG = 'click to disable panel synchronisation';
Expand Down
6 changes: 3 additions & 3 deletions documentation/navtreeindex2.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ var NAVTREEINDEX2 =
"structQMesh.html#a2d90f9fa4bf846484ed9e8c92c83c997":[2,0,24,3],
"structQMesh.html#a2ed18e9110f2515aa9facf26c64148d9":[2,0,24,49],
"structQMesh.html#a2fc56b280f352963f88e25029a19da96":[2,0,24,24],
"structQMesh.html#a30222f5fb017616ded120441d24ccd93":[2,0,24,53],
"structQMesh.html#a36f6330eb9b31e0980a395f9ce2ecb3f":[2,0,24,77],
"structQMesh.html#a37416724984aee6516bcea7d8a1f6038":[2,0,24,1],
"structQMesh.html#a37416724984aee6516bcea7d8a1f6038a105d2e59c231d31bfde5ebd18ebac966":[2,0,24,1,1],
Expand All @@ -200,6 +199,7 @@ var NAVTREEINDEX2 =
"structQMesh.html#a46d72edf0fcc00d4c083dc3bf08aef62":[2,0,24,69],
"structQMesh.html#a47ac731a2895ae3ffe6493e8ad4c943d":[2,0,24,68],
"structQMesh.html#a490258edde53f882a19847d000258635":[2,0,24,65],
"structQMesh.html#a4a4a2df78eb06e337eea63fd1411eddc":[2,0,24,53],
"structQMesh.html#a4ad775c25869978af09d7deb3b5a9872":[2,0,24,56],
"structQMesh.html#a4b7b7e613b08c919b75ae3bc4d0b9b24":[2,0,24,57],
"structQMesh.html#a4f7e3023e5cff96a91adba31068fcc38":[2,0,24,5],
Expand All @@ -215,7 +215,6 @@ var NAVTREEINDEX2 =
"structQMesh.html#a68868db558df1af728e2863d1d2ef753":[2,0,24,71],
"structQMesh.html#a6b08a4b5b903c944018e28c26c28476a":[2,0,24,46],
"structQMesh.html#a6b0f73e4f28b19cfd79570e471278d42":[2,0,24,78],
"structQMesh.html#a72b17d5dd66883780a3c7c53e04fe69c":[2,0,24,59],
"structQMesh.html#a76ad36f30bad6755071a423f72621e1a":[2,0,24,22],
"structQMesh.html#a8392b1591250b0c207f6b8384b35e6b3":[2,0,24,8],
"structQMesh.html#a8429b9721b50f285cd106f7ff61d52ae":[2,0,24,73],
Expand Down Expand Up @@ -249,5 +248,6 @@ var NAVTREEINDEX2 =
"structQMesh.html#ae64b62d34df2cf35e6b86c2fb79e3e1c":[2,0,24,21],
"structQMesh.html#ae75d1ee6bfbc00535167c2fbc5c4ab72":[2,0,24,40],
"structQMesh.html#af4b4bb36b656b2a1581ca2c39ad32d6b":[2,0,24,50],
"structQMesh.html#af594def83c88dc6c6c26c8dfcb8a14cf":[2,0,24,26]
"structQMesh.html#af594def83c88dc6c6c26c8dfcb8a14cf":[2,0,24,26],
"structQMesh.html#afab856b716f627605af0ae934f0a0cd9":[2,0,24,47]
};
2 changes: 1 addition & 1 deletion documentation/navtreeindex3.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var NAVTREEINDEX3 =
{
"structQMesh.html#afab856b716f627605af0ae934f0a0cd9":[2,0,24,47],
"structQMesh.html#afd9df1b7b5f8a6c532892d9353ab930b":[2,0,24,54],
"structQMesh.html#afe0de47bd7956763b5c3a807d332c7c2":[2,0,24,59],
"structQMesh.html#afe423292a3655c6d1b0756853fdf9dfc":[2,0,24,13],
"structQMesh_1_1MeshData.html":[2,0,24,0],
"structQMesh_1_1MeshData.html#a147dc586a79cc4e8e1c6098606cff6ec":[2,0,24,0,4],
Expand Down
Loading

0 comments on commit 0daf7fc

Please sign in to comment.