Main Page Class List Class Members

# Nv::Blast::ExtImpactDamageManager Class Reference

`#include <NvBlastExtImpactDamageManager.h>`

List of all members.

## Public Member Functions
virtual void | applyDamage ()=0
virtual void | onContact (const physx::PxContactPairHeader &pairHeader, const physx::PxContactPair *pairs, uint32_t nbPairs)=0
virtual void | release ()=0
virtual void | setSettings (const ExtImpactSettings &settings)=0
## Static Public Member Functions
static ExtImpactDamageManager * | create (ExtPxManager *pxManager, ExtImpactSettings settings=ExtImpactSettings())
static physx::PxFilterFlags | FilterShader (physx::PxFilterObjectAttributes attributes0, physx::PxFilterData filterData0, physx::PxFilterObjectAttributes attributes1, physx::PxFilterData filterData1, physx::PxPairFlags &pairFlags, const void *constantBlock, uint32_t constantBlockSize)

## Detailed Description

Impact Damage Manager.

Requires ExtPxManager. Call onContact from PxSimulationEventCallback onContact to accumulate damage. Call applyDamage to apply accumulated damage.

## Member Function Documentation

virtual void Nv::Blast::ExtImpactDamageManager::applyDamage | ( |  | ) | `[pure virtual]`

Apply accumulated impact damage.

static ExtImpactDamageManager* Nv::Blast::ExtImpactDamageManager::create | ( | ExtPxManager * | pxManager,
|  | ExtImpactSettings | settings = `ExtImpactSettings()` |
| ) |  |  | `[static]`

Create a new ExtImpactDamageManager.

Parameters:

  `[in]` | pxManager | The ExtPxManager instance to be used by impact damage manager.
  `[in]` | settings | The settings to be set on ExtImpactDamageManager.

Returns:
  the new ExtImpactDamageManager if successful, NULL otherwise.

static physx::PxFilterFlags Nv::Blast::ExtImpactDamageManager::FilterShader | ( | physx::PxFilterObjectAttributes | attributes0,
|  | physx::PxFilterData | filterData0,
|  | physx::PxFilterObjectAttributes | attributes1,
|  | physx::PxFilterData | filterData1,
|  | physx::PxPairFlags & | pairFlags,
|  | const void * | constantBlock,
|  | uint32_t | constantBlockSize |
| ) |  |  | `[static]`

Custom implementation of PxSimulationFilterShader, enables necessary information to be passed in onContact(). Set it in your PxScene PxSceneDesc in order to impact damage to work correctly or implement your own.

See also:
  PxSimulationFilterShader

virtual void Nv::Blast::ExtImpactDamageManager::onContact | ( | const physx::PxContactPairHeader & | pairHeader,
|  | const physx::PxContactPair * | pairs,
|  | uint32_t | nbPairs |
| ) |  |  | `[pure virtual]`

This method is equal to PxSimulationEventCallback::onContact.

User should implement own PxSimulationEventCallback onContact and call this method in order ExtImpactDamageManager to work correctly.

Contacts will be processed and impact damage will be accumulated.

Parameters:

  `[in]` | pairHeader | Information on the two actors whose shapes triggered a contact report.
  `[in]` | pairs | The contact pairs of two actors for which contact reports have been requested.

See also:
  PxContactPair.

Parameters:

  `[in]` | nbPairs | The number of provided contact pairs.

See also:
  PxSimulationEventCallback

virtual void Nv::Blast::ExtImpactDamageManager::release | ( |  | ) | `[pure virtual]`

Release this manager.

virtual void Nv::Blast::ExtImpactDamageManager::setSettings | ( | const ExtImpactSettings & | settings | ) | `[pure virtual]`

Set ExtImpactDamageManager settings.

Parameters:

  `[in]` | settings | The settings to be set on ExtImpactDamageManager.

The documentation for this class was generated from the following file:

- sdk/extensions/physx/include/NvBlastExtImpactDamageManager.h