From d41654b469fa51870b5952c836c04d9da17f32d3 Mon Sep 17 00:00:00 2001 From: Anton Novoselov Date: Tue, 8 Aug 2017 20:14:22 +0300 Subject: Updated to CL 22627414: * docs updates * authoring fixes * stress solver crash fixes --- docs/api_docs/files/pageextphysx.html | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'docs/api_docs/files/pageextphysx.html') 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 @@ - NVIDIA(R) Blast(R) SDK 1.1 API Reference: PhysX Extensions (NvBlastExtPhysX) + NVIDIA(R) Blast(R) SDK 1.1 API Reference: PhysX&tm; Extensions (NvBlastExtPhysX) @@ -20,21 +20,21 @@
-

PhysX Extensions (NvBlastExtPhysX)

NvBlastExtPhysX contains classes for easier use of Blast Toolkit with the PhysX SDK. There are 3 of them: +

PhysX™ Extensions (NvBlastExtPhysX)

NvBlastExtPhysX contains classes for easier use of Blast™ Toolkit with the PhysX™ SDK. There are 3 of them:

-This library also contains an extension for synchronizing Blast state:

+This library also contains an extension for synchronizing Blast™ state:


ExtPxManager

-Physics Manager - is a reference implementation for keeping Blast Actors synced with PhysX actors. It's main job is to listen for TkFamily events and update 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

+Physics Manager - is a reference implementation for keeping Blast™ actors synced with PhysX™ actors. Its main job is to listen for TkFamily events and update 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

ExtPxManager* pxManager = ExtPxManager::create(m_physics, m_tkFramework);
 

-For every TkAsset prepare ExtPxAsset. Which contains 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 (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.

-To create a ExtPxFamily from an ExtPxAsset:

+For every TkAsset prepare ExtPxAsset, which contains 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 (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 an ExtPxFamily from an ExtPxAsset:

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)
 
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):

ExtPxSpawnSettings spawnSettings = {
     &pxScene,
     defaultPxMaterial,
@@ -57,11 +57,11 @@ And finally spawn the family in some world position (the first actor/actors will
 
 family->spawn(PxTransform(0, 0, 0), PxVec3(1, 1, 1), spawnSettings);
 

-You can get families actor's either from listening to events or by calling getActors(). Every ExtPxActor matches 1 <-> 1 with TkActor (which matches NvBlastActor accordingly).

+You can get a family's actors either from listening to events or by calling getActors(). Every ExtPxActor matches 1 <-> 1 with TkActor (which matches NvBlastActor accordingly).

ExtPxActor* actor = ....; 
-physx::PxRigidDynamic rigidDynamic = actor->getPxActor(); // 
+physx::PxRigidDynamic rigidDynamic = actor->getPxActor(); 
 

-An ExtPxActor remains internally unchanged through its lifetime. Use ExtPxActor getChunkIndices() and getPxActor() to update your graphics representation. Sample code:

+An ExtPxActor remains internally unchanged throughout its lifetime. Use ExtPxActor getChunkIndices() and getPxActor() to update your graphics representation. Sample code:

const uint32_t* chunkIndices;
 size_t chunkIndexCount;
 actor.getChunkIndices(chunkIndices, chunkIndexCount);
@@ -74,12 +74,12 @@ actor.getChunkIndices(chunkIndices, chunkIndexCount);
     }
 }
 

-In order to use joints set joint create function with 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 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.


ExtImpactDamageManager

-Impact Damage Manager - is a reference implementation for fast and easy impact damage support. It's built on top of ExtPxManager.

-In order to use it create it:

+Impact Damage Manager - 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 as follows:

ExtImpactDamageManager* impactManager = ExtImpactDamageManager::create(pxManager);
 

Call its onContact method on every PxSimulationEventCallback onContact()

@@ -100,7 +100,7 @@ Call its onContact method on every PxSimulationEventCallback onCont Call applyDamage() when you want the buffered damage to be applied:

impactManager->applyDamage();
 

-N.B. for impact damage to work, you must enable contact notification with custom the filter shader for PxScene. ExtImpactDamageManager has a reference filter shader implementation which can be used for that:

+N.B. for impact damage to work, you must enable contact notification with custom filter shader for PxScene. ExtImpactDamageManager has a reference filter shader implementation which can be used for that:

PxSceneDesc sceneDesc;
 sceneDesc.filterShader = ExtImpactDamageManager::FilterShader;
 

@@ -117,7 +117,7 @@ And then call update() every frame:

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 ExtPxStressSolver::getSolver(). For example, to apply impulse to a particular actor, applyImpulse(...) can be called for additional stress to apply:

stressSolver->getSolver().addForce(actor, position, impulse);
 

Finally, the stress solver (and its underlying ExtStressSolver) may be released using

@@ -126,16 +126,16 @@ Finally, the stress solver (and its underlying ExtStressSolver) may be released

ExtSync

-Synchronization Extension (NvBlastExtSync) - is a reference implementation for synchronizing Blast state.

+Synchronization Extension (NvBlastExtSync) - is a reference implementation for synchronizing Blast™ 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.

3 types of events are supported:

  • ExtSyncEventType::Fracture: Fracture event. Contains fracture commands information on particular TkFamily. Applied incrementally. Relatively small.
  • ExtSyncEventType::FamilySync: Family sync event. Contains all necessary information to fully sync TkFamily state.
  • ExtSyncEventType::Physics: 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:

ExtSync* sync = ExtSync::create();
 

-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:

TkFamily* family = ...;
 family->addListener(*sync);
 
-- 
cgit v1.2.3