aboutsummaryrefslogtreecommitdiff
path: root/docs/api_docs/files/pageextphysx.html
diff options
context:
space:
mode:
authorAnton Novoselov <[email protected]>2017-08-08 20:14:22 +0300
committerAnton Novoselov <[email protected]>2017-08-08 20:14:22 +0300
commitd41654b469fa51870b5952c836c04d9da17f32d3 (patch)
tree64f8f437eef394630355f281d35ca1d53e5c4d6c /docs/api_docs/files/pageextphysx.html
parentadd +x for packman script (diff)
downloadblast-d41654b469fa51870b5952c836c04d9da17f32d3.tar.xz
blast-d41654b469fa51870b5952c836c04d9da17f32d3.zip
Updated to CL 22627414:
* docs updates * authoring fixes * stress solver crash fixes
Diffstat (limited to 'docs/api_docs/files/pageextphysx.html')
-rw-r--r--docs/api_docs/files/pageextphysx.html42
1 files changed, 21 insertions, 21 deletions
diff --git a/docs/api_docs/files/pageextphysx.html b/docs/api_docs/files/pageextphysx.html
index b1ee6ba..85ee427 100644
--- a/docs/api_docs/files/pageextphysx.html
+++ b/docs/api_docs/files/pageextphysx.html
@@ -1,6 +1,6 @@
<html>
<head>
- <title>NVIDIA(R) Blast(R) SDK 1.1 API Reference: PhysX Extensions (NvBlastExtPhysX)</title>
+ <title>NVIDIA(R) Blast(R) SDK 1.1 API Reference: PhysX&tm; Extensions (NvBlastExtPhysX)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
@@ -20,21 +20,21 @@
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
-<h1><a class="anchor" name="pageextphysx">PhysX Extensions (NvBlastExtPhysX) </a></h1>NvBlastExtPhysX contains classes for easier use of Blast Toolkit with the PhysX SDK. There are 3 of them:<ul>
-<li><b>ExtPxManager</b>: Manager to keep Blast Actors in sync with PhysX actors.</li><li><b>ExtImpactDamageManager</b>: Manager to collect and apply impact damage caused by collision in PhysX Scene.</li><li><b>ExtPxStressSolver</b>: Stress Solver to propagate stress through support graph and apply it as damage to Blast actors.</li></ul>
+<h1><a class="anchor" name="pageextphysx">PhysX&trade; Extensions (NvBlastExtPhysX) </a></h1>NvBlastExtPhysX contains classes for easier use of Blast&trade; Toolkit with the PhysX&trade; SDK. There are 3 of them:<ul>
+<li><b>ExtPxManager</b>: Manager to keep Blast&trade; actors in sync with PhysX&trade; actors.</li><li><b>ExtImpactDamageManager</b>: Manager to collect and apply impact damage caused by collision in PhysX&trade; scene.</li><li><b>ExtPxStressSolver</b>: Stress Solver to propagate stress through support graph and apply it as damage to Blast&trade; actors.</li></ul>
<p>
-This library also contains an extension for synchronizing Blast state:<ul>
-<li><b>ExtSync</b> - Utility for writing Blast state to a buffer, to be read by a client. This may be used for networking, for example.</li></ul>
+This library also contains an extension for synchronizing Blast&trade; state:<ul>
+<li><b>ExtSync</b> - Utility for writing Blast&trade; state to a buffer, to be read by a client. This may be used for networking, for example.</li></ul>
<p>
<br>
<h2><a class="anchor" name="ExtPxManager">
ExtPxManager</a></h2>
-<b>Physics Manager</b> - is a reference implementation for keeping Blast Actors synced with PhysX actors. It's main job is to listen for TkFamily events and update <em>PxScene</em> (by adding and removing PxActors) accordingly.<p>
-In order to use it create an ExtPxManager. If we have a physx::PxPhysics object m_physics and a TkFramework m_tkFramework, use<p>
+<b>Physics Manager</b> - is a reference implementation for keeping Blast&trade; actors synced with PhysX&trade; actors. Its main job is to listen for TkFamily events and update <em>PxScene</em> (by adding and removing PxActors) accordingly.<p>
+In order to use it, create an ExtPxManager. If we have a physx::PxPhysics object m_physics and a TkFramework m_tkFramework, use<p>
<div class="fragment"><pre class="fragment">ExtPxManager* pxManager = ExtPxManager::create(m_physics, m_tkFramework);
</pre></div><p>
-For every <em>TkAsset</em> prepare <em>ExtPxAsset</em>. Which contains <em>TkAsset</em> + collection of physics geometry for every chunk. Every chunk can contain any number of subchunks. Where each subchunk is basically PxConvexMeshGeometry with transform. Also every chunk can be marked as static (<em>isStatic</em> flag). If actor contains at least one static chunks in it's support graph it makes an actor kinematic (static), otherwise it's dynamic. Having zero subchunks makes chunk invisible in physics scene, it can be used for example to represent 'earth' as a special invisible static chunk and connect all near earth chunks to it.<p>
-To create a <em>ExtPxFamily</em> from an <em>ExtPxAsset:</em> <p>
+For every <em>TkAsset</em> prepare <em>ExtPxAsset</em>, which contains <em>TkAsset</em> + collection of physics geometry for every chunk. Every chunk can contain any number of subchunks, where each subchunk is basically a PxConvexMeshGeometry with transform. Also every chunk can be marked as static (<em>isStatic</em> flag). If an actor contains at least one static chunk in its support graph, it makes that actor kinematic (static). Otherwise the actor is dynamic. Having zero subchunks makes the chunk invisible in the physics scene. It can be used for example to represent 'earth' as a special invisible static chunk and connect all near earth chunks to it.<p>
+To create an <em>ExtPxFamily</em> from an <em>ExtPxAsset:</em> <p>
<div class="fragment"><pre class="fragment">ExtPxFamilyDesc familyDesc;
familyDesc.pxAsset = pxAsset;
familyDesc.group = tkGroup;
@@ -48,7 +48,7 @@ You can subscribe to family events in order to sync graphics (or anything else)
<div class="fragment"><pre class="fragment">family-&gt;subscribe(listener);
</pre></div><p>
The listener will be notified with all physics actors added and removed.<p>
-And finally spawn the family in some world position (the first actor/actors will be created and event will be fired to the listener):<p>
+And finally spawn the family in some world position (the first actor/actors will be created and an event will be fired to the listener):<p>
<div class="fragment"><pre class="fragment">ExtPxSpawnSettings spawnSettings = {
&amp;pxScene,
defaultPxMaterial,
@@ -57,11 +57,11 @@ And finally spawn the family in some world position (the first actor/actors will
family-&gt;spawn(PxTransform(0, 0, 0), PxVec3(1, 1, 1), spawnSettings);
</pre></div><p>
-You can get families actor's either from listening to events or by calling getActors(). Every <em>ExtPxActor</em> matches 1 &lt;-&gt; 1 with TkActor (which matches <em><a class="el" href="struct_nv_blast_actor.html">NvBlastActor</a></em> accordingly).<p>
+You can get a family's actors either from listening to events or by calling <em>getActors()</em>. Every <em>ExtPxActor</em> matches 1 &lt;-&gt; 1 with TkActor (which matches <em><a class="el" href="struct_nv_blast_actor.html">NvBlastActor</a></em> accordingly).<p>
<div class="fragment"><pre class="fragment">ExtPxActor* actor = ....;
-physx::PxRigidDynamic rigidDynamic = actor-&gt;getPxActor(); <span class="comment">// </span>
+physx::PxRigidDynamic rigidDynamic = actor-&gt;getPxActor();
</pre></div><p>
-An ExtPxActor remains internally unchanged through its lifetime. Use <em>ExtPxActor</em> <em>getChunkIndices()</em> and <em>getPxActor()</em> to update your graphics representation. Sample code:<p>
+An ExtPxActor remains internally unchanged throughout its lifetime. Use <em>ExtPxActor</em> <em>getChunkIndices()</em> and <em>getPxActor()</em> to update your graphics representation. Sample code:<p>
<div class="fragment"><pre class="fragment"><span class="keyword">const</span> uint32_t* chunkIndices;
<span class="keywordtype">size_t</span> chunkIndexCount;
actor.getChunkIndices(chunkIndices, chunkIndexCount);
@@ -74,12 +74,12 @@ actor.getChunkIndices(chunkIndices, chunkIndexCount);
}
}
</pre></div><p>
-In order to use joints set joint create function with <em>ExtPxManager::setCreateJointFunction</em>(...). It will be called when new TkJoint's are being created. All the joint updates and remove will be handled by manager internally.<p>
+In order to use joints set a joint creation function with <em>ExtPxManager::setCreateJointFunction</em>(...). It will be called when new TkJoints are being created. All the joint updates and removals will be handled by the manager internally.<p>
<br>
<h2><a class="anchor" name="ExtImpactDamageManager">
ExtImpactDamageManager</a></h2>
-<b>Impact Damage Manager</b> - is a reference implementation for fast and easy impact damage support. It's built on top of ExtPxManager.<p>
-In order to use it create it:<p>
+<b>Impact Damage Manager</b> - is a reference implementation for fast and easy impact damage support. It is built on top of ExtPxManager.<p>
+In order to use it, create it as follows:<p>
<div class="fragment"><pre class="fragment">ExtImpactDamageManager* impactManager = ExtImpactDamageManager::create(pxManager);
</pre></div><p>
Call its onContact method on every <em>PxSimulationEventCallback</em> <em>onContact()</em> <p>
@@ -100,7 +100,7 @@ Call its onContact method on every <em>PxSimulationEventCallback</em> <em>onCont
Call <em>applyDamage()</em> when you want the buffered damage to be applied:<p>
<div class="fragment"><pre class="fragment">impactManager-&gt;applyDamage();
</pre></div><p>
-<b>N.B.</b> for impact damage to work, you must enable contact notification with custom the filter shader for PxScene. <em>ExtImpactDamageManager</em> has a reference filter shader implementation which can be used for that:<p>
+<b>N.B.</b> for impact damage to work, you must enable contact notification with custom filter shader for PxScene. <em>ExtImpactDamageManager</em> has a reference filter shader implementation which can be used for that:<p>
<div class="fragment"><pre class="fragment">PxSceneDesc sceneDesc;
sceneDesc.filterShader = ExtImpactDamageManager::FilterShader;
</pre></div><p>
@@ -117,7 +117,7 @@ And then call update() every frame:<p>
stressSolver-&gt;update(doDamage);
</pre></div><p>
By default it will apply scene gravity on static actors and centrifugal force on dynamic actors.<p>
-The underlying ExtStressSolver can be accessed using ExtPxStressSolver::getSolver(). For example, to apply impulse to a particular actor, use applyImpulse(...) can be called for additional stress to apply:<p>
+The underlying ExtStressSolver can be accessed using <em>ExtPxStressSolver::getSolver()</em>. For example, to apply impulse to a particular actor, <em>applyImpulse</em>(...) can be called for additional stress to apply:<p>
<div class="fragment"><pre class="fragment">stressSolver-&gt;getSolver().addForce(actor, position, impulse);
</pre></div><p>
Finally, the stress solver (and its underlying ExtStressSolver) may be released using<p>
@@ -126,16 +126,16 @@ Finally, the stress solver (and its underlying ExtStressSolver) may be released
<br>
<h2><a class="anchor" name="ExtSync">
ExtSync</a></h2>
-<b>Synchronization Extension (NvBlastExtSync)</b> - is a reference implementation for synchronizing Blast state.<p>
+<b>Synchronization Extension (NvBlastExtSync)</b> - is a reference implementation for synchronizing Blast&trade; state.<p>
The idea is that you can use it to write synchronization events to the buffer (on server for example) and then apply this buffer on a client. TkFamily ID should be properly set for that.<p>
3 types of events are supported:<p>
<ul>
<li><b>ExtSyncEventType::Fracture</b>: Fracture event. Contains fracture commands information on particular TkFamily. Applied incrementally. Relatively small.</li><li><b>ExtSyncEventType::FamilySync</b>: Family sync event. Contains all necessary information to fully sync TkFamily state.</li><li><b>ExtSyncEventType::Physics</b>: Physics sync event. Contains all necessary information to fully sync ExtPxFamily state.</li></ul>
<p>
-In order to use it create ExtSync:<p>
+In order to use it, create ExtSync:<p>
<div class="fragment"><pre class="fragment">ExtSync* sync = ExtSync::create();
</pre></div><p>
-Then let ExtSync insatnce listen to family fracture commands and write them to internal buffer:<p>
+Then let ExtSync instance listen to family fracture commands and write them to internal buffer:<p>
<div class="fragment"><pre class="fragment">TkFamily* family = ...;
family-&gt;addListener(*sync);