From 9a1c1d814f3fa0b54b49d90b43130c02bc280f44 Mon Sep 17 00:00:00 2001 From: Anton Novoselov Date: Mon, 14 Aug 2017 16:41:28 +0300 Subject: Updated to CL 22661993: * docs updates * authoring fixes * asset view in sample fix * latest blast_tools_and_samples-windows.zip --- docs/api_docs/files/pageextphysx.html | 67 ++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 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 85ee427..d88f68d 100644 --- a/docs/api_docs/files/pageextphysx.html +++ b/docs/api_docs/files/pageextphysx.html @@ -20,11 +20,14 @@
-

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 three of them:

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

+
  • ExtSync - Utility for writing Blast™ state to a buffer, to be read by a client. This may be used for networking, for example.
  • +

    +It also provides classes for utilizing PhysX™ SDK Foundation capabilities:


    @@ -105,7 +108,7 @@ Call applyDamage() when you want the buffered damage to be applied:

    sceneDesc.filterShader = ExtImpactDamageManager::FilterShader;


    -

    +

    ExtPxStressSolver

    Stress Solver - this wrapper class uses Stress Solver Extension (NvBlastExtStress) to apply stress calculations to an ExtPxFamily. See Stress Solver Extension (NvBlastExtStress) for the details of the underlying stress solver.

    Usage

    @@ -164,6 +167,62 @@ On the client you can then apply this buffer:

    sync->applySyncBuffer(tkFramework, m_savedBuffer.data(), m_savedBuffer.size(), group, pxManager);
     

    ExtPxManager is required only if sync buffer contains ExtSyncEventType::Physics events.

    +
    +

    +ExtGroupTaskManager

    +This class provides a basic implementation for multithreaded TkGroup processing using PxTask and a PxTaskManager from PxFoundation.

    +In the simplest use case, all worker threads provided by PxTaskManager are used to process the group.

    +

    // creating ExtGroupTaskManager from existing taskManager and tkGroup
    +ExtGroupTaskManager* gtm = ExtGroupTaskManager::create(*taskManager, tkGroup);
    +
    +while (running)
    +{
    +    // ... add TkActors to TkGroup and damage ...
    +
    +    // start processing on all worker threads provided
    +    gtm->process();
    +
    +    // ... do something else ...
    +
    +    // wait for the group processing to finish
    +    gtm->wait();
    +}
    +
    +// after use, release the ExtGroupTaskManager
    +gtm->release();
    +

    +
    +

    +Groups can be processed concurrently as well as follows.

    +

    // creating ExtGroupTaskManager from existing taskManager and groups
    +
    +ExtGroupTaskManager* gtm0 = ExtGroupTaskManager::create(*taskManager, tkGroup0);
    +ExtGroupTaskManager* gtm1 = ExtGroupTaskManager::create(*taskManager, tkGroup1);
    +

    +TkActors are added to TkGroups and damaged as usual.

    +The PxTaskManager used in this example provides four worker threads of which each ExtGroupTaskManager uses two for its group.

    +

    uint32_t started = 0;
    +if (gtm0->process(2) > 0) { started++; }
    +if (gtm1->process(2) > 0) { started++; }
    +

    +Note that ExtGroupTaskManager::wait() never returns true if no processing has started, as reported by ExtGroupTaskManager::process(). The illustrative busy loop is not recomended for actual use.

    +

    uint32_t completed = 0;
    +while (completed < started)
    +{
    +    if (gtm0->wait(false)) { completed++; }
    +    if (gtm1->wait(false)) { completed++; }
    +}
    +

    +
    +

    +ExtCustomProfiler

    +This Nv::Blast::ProfileCallback implementation forwards Blast™ profile events to the PxProfilerCallback attached to PxFoundation, typically a PhysX™ Visual Debugger (PVD) instance. To use it, simply attach one to Blast™.

    +

    static Nv::Blast::ExtCustomProfiler gBlastProfiler;
    +NvBlastProfilerSetCallback(&gBlastProfiler);
    +

    +For convenience, it also provides sending profile events to platform specific profilers. These are disabled by default.

    +

    gBlastProfiler.setPlatformEnabled(true);
    +


    -- cgit v1.2.3