diff options
| author | Anton Novoselov <[email protected]> | 2017-08-08 20:14:22 +0300 |
|---|---|---|
| committer | Anton Novoselov <[email protected]> | 2017-08-08 20:14:22 +0300 |
| commit | d41654b469fa51870b5952c836c04d9da17f32d3 (patch) | |
| tree | 64f8f437eef394630355f281d35ca1d53e5c4d6c /docs/_source/ext_physx.txt | |
| parent | add +x for packman script (diff) | |
| download | blast-d41654b469fa51870b5952c836c04d9da17f32d3.tar.xz blast-d41654b469fa51870b5952c836c04d9da17f32d3.zip | |
Updated to CL 22627414:
* docs updates
* authoring fixes
* stress solver crash fixes
Diffstat (limited to 'docs/_source/ext_physx.txt')
| -rw-r--r-- | docs/_source/ext_physx.txt | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/docs/_source/ext_physx.txt b/docs/_source/ext_physx.txt index afc24a6..ff998c2 100644 --- a/docs/_source/ext_physx.txt +++ b/docs/_source/ext_physx.txt @@ -1,34 +1,34 @@ -/*! \page pageextphysx PhysX Extensions (NvBlastExtPhysX) +/*! \page pageextphysx PhysX&tm; Extensions (NvBlastExtPhysX) -NvBlastExtPhysX contains classes for easier use of Blast Toolkit with the PhysX SDK. +NvBlastExtPhysX contains classes for easier use of Blast&tm; Toolkit with the PhysX&tm; SDK. There are 3 of them: -- <b>ExtPxManager</b>: Manager to keep Blast Actors in sync with PhysX actors. -- <b>ExtImpactDamageManager</b>: Manager to collect and apply impact damage caused by collision in PhysX Scene. -- <b>ExtPxStressSolver</b>: Stress Solver to propagate stress through support graph and apply it as damage to Blast actors. +- <b>ExtPxManager</b>: Manager to keep Blast&tm; actors in sync with PhysX&tm; actors. +- <b>ExtImpactDamageManager</b>: Manager to collect and apply impact damage caused by collision in PhysX&tm; scene. +- <b>ExtPxStressSolver</b>: Stress Solver to propagate stress through support graph and apply it as damage to Blast&tm; actors. -This library also contains an extension for synchronizing Blast state: -- <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. +This library also contains an extension for synchronizing Blast&tm; state: +- <b>ExtSync</b> - Utility for writing Blast&tm; state to a buffer, to be read by a client. This may be used for networking, for example. <br> \section ExtPxManager -<b>Physics Manager</b> - is a reference implementation for keeping Blast Actors synced with PhysX actors. It's main job is to listen +<b>Physics Manager</b> - is a reference implementation for keeping Blast&tm; actors synced with PhysX&tm; actors. Its main job is to listen for TkFamily events and update \a PxScene (by adding and removing PxActors) accordingly. -In order to use it create an ExtPxManager. If we have a physx::PxPhysics object m_physics and a TkFramework m_tkFramework, use +In order to use it, create an ExtPxManager. If we have a physx::PxPhysics object m_physics and a TkFramework m_tkFramework, use \code ExtPxManager* pxManager = ExtPxManager::create(m_physics, m_tkFramework); \endcode -For every \a TkAsset prepare \a ExtPxAsset. Which contains \a TkAsset + 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 (\a isStatic 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. +For every \a TkAsset prepare \a ExtPxAsset, which contains \a TkAsset + 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 (\a isStatic 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. -To create a \a ExtPxFamily from an \a ExtPxAsset: +To create an \a ExtPxFamily from an \a ExtPxAsset: \code ExtPxFamilyDesc familyDesc; @@ -49,7 +49,7 @@ family->subscribe(listener); The listener will be notified with all physics actors added and removed. -And finally spawn the family in some world position (the first actor/actors will be created and event will be fired to the listener): +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): \code @@ -62,15 +62,15 @@ ExtPxSpawnSettings spawnSettings = { family->spawn(PxTransform(0, 0, 0), PxVec3(1, 1, 1), spawnSettings); \endcode -You can get families actor's either from listening to events or by calling getActors(). +You can get a family's actors either from listening to events or by calling \a getActors(). Every \a ExtPxActor matches 1 <-> 1 with TkActor (which matches \a NvBlastActor accordingly). \code ExtPxActor* actor = ....; -physx::PxRigidDynamic rigidDynamic = actor->getPxActor(); // +physx::PxRigidDynamic rigidDynamic = actor->getPxActor(); \endcode -An ExtPxActor remains internally unchanged through its lifetime. +An ExtPxActor remains internally unchanged throughout its lifetime. Use \a ExtPxActor \a getChunkIndices() and \a getPxActor() to update your graphics representation. Sample code: \code @@ -87,15 +87,15 @@ for (uint32_t i = 0; i < chunkIndexCount; i++) } \endcode -In order to use joints set joint create function with \a ExtPxManager::setCreateJointFunction(...). It will be called when new TkJoint's are -being created. All the joint updates and remove will be handled by manager internally. +In order to use joints set a joint creation function with \a ExtPxManager::setCreateJointFunction(...). It will be called when new TkJoints are +being created. All the joint updates and removals will be handled by the manager internally. <br> \section ExtImpactDamageManager -<b>Impact Damage Manager</b> - is a reference implementation for fast and easy impact damage support. It's built on top of ExtPxManager. +<b>Impact Damage Manager</b> - is a reference implementation for fast and easy impact damage support. It is built on top of ExtPxManager. -In order to use it create it: +In order to use it, create it as follows: \code ExtImpactDamageManager* impactManager = ExtImpactDamageManager::create(pxManager); @@ -125,8 +125,7 @@ Call \a applyDamage() when you want the buffered damage to be applied: impactManager->applyDamage(); \endcode -<b>N.B.</b> for impact damage to work, you must enable contact notification with custom the filter shader for PxScene. \a ExtImpactDamageManager has a reference filter shader -implementation which can be used for that: +<b>N.B.</b> for impact damage to work, you must enable contact notification with custom filter shader for PxScene. \a ExtImpactDamageManager has a reference filter shader implementation which can be used for that: \code PxSceneDesc sceneDesc; @@ -156,8 +155,7 @@ stressSolver->update(doDamage); By default it will apply scene gravity on static actors and centrifugal force on dynamic actors. -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: +The underlying ExtStressSolver can be accessed using \a ExtPxStressSolver::getSolver(). For example, to apply impulse to a particular actor, \a applyImpulse(...) can be called for additional stress to apply: \code stressSolver->getSolver().addForce(actor, position, impulse); @@ -172,7 +170,7 @@ stressSolver->release(); <br> \section ExtSync -<b>Synchronization Extension (NvBlastExtSync)</b> - is a reference implementation for synchronizing Blast state. +<b>Synchronization Extension (NvBlastExtSync)</b> - is a reference implementation for synchronizing Blast&tm; state. 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. @@ -183,13 +181,13 @@ a client. TkFamily ID should be properly set for that. - <b>ExtSyncEventType::FamilySync</b>: Family sync event. Contains all necessary information to fully sync TkFamily state. - <b>ExtSyncEventType::Physics</b>: Physics sync event. Contains all necessary information to fully sync ExtPxFamily state. -In order to use it create ExtSync: +In order to use it, create ExtSync: \code ExtSync* sync = ExtSync::create(); \endcode -Then let ExtSync insatnce listen to family fracture commands and write them to internal buffer: +Then let ExtSync instance listen to family fracture commands and write them to internal buffer: \code TkFamily* family = ...; |