Main Page Class List Class Members

# Nv::Blast::ExtPxManager Class Reference

`#include <NvBlastExtPxManager.h>`

List of all members.

## Public Types
enum | FilterDataAttributes { LEAF_CHUNK = 1 }
## Public Member Functions
virtual ExtPxFamily * | createFamily (const ExtPxFamilyDesc &desc)=0
virtual bool | createJoint (TkJoint &joint)=0
virtual void | destroyJoint (TkJoint &joint)=0
virtual uint32_t | getActorCountLimit ()=0
virtual ExtPxActor * | getActorFromPhysXActor (const physx::PxRigidDynamic &pxActor) const =0
virtual uint32_t | getFamilies (ExtPxFamily **buffer, uint32_t bufferSize) const =0
virtual uint32_t | getFamilyCount () const =0
virtual ExtPxFamily * | getFamilyFromTkFamily (TkFamily &family) const =0
virtual TkFramework & | getFramework () const =0
virtual physx::PxPhysics & | getPhysics () const =0
virtual uint32_t | getPxActorCount () const =0
virtual bool | isPxUserDataUsed () const =0
virtual void | release ()=0
virtual void | setActorCountLimit (uint32_t limit)=0
virtual void | setCreateJointFunction (ExtPxCreateJointFunction createFn)=0
virtual void | subscribe (ExtPxListener &listener)=0
virtual void | unsubscribe (ExtPxListener &listener)=0
## Static Public Member Functions
static ExtPxManager * | create (physx::PxPhysics &physics, TkFramework &framework, ExtPxCreateJointFunction createFn=nullptr, bool useUserData=true)
static ExtPxCollisionBuilder * | createCollisionBuilder (physx::PxPhysics &physics, physx::PxCooking &cooking)

## Detailed Description

Physics Manager.

Used to create and manage Physics Families.

## Member Enumeration Documentation

enum Nv::Blast::ExtPxManager::FilterDataAttributes

Simulation Filter data to be set on leaf chunk actors

Enumerator:

  LEAF_CHUNK |

## Member Function Documentation

static ExtPxManager* Nv::Blast::ExtPxManager::create | ( | physx::PxPhysics & | physics,
|  | TkFramework & | framework,
|  | ExtPxCreateJointFunction | createFn = `nullptr`,
|  | bool | useUserData = `true` |
| ) |  |  | `[static]`

Create a new ExtPxManager.

Parameters:

  `[in]` | physics | The PxPhysics instance to be used by ExtPxManager.
  `[in]` | framework | The TkFramework instance to be used by ExtPxManager.
  `[in]` | cooking | The optional PxCooking. Required for collision builder.
  `[in]` | createFn | The function to be used when creating joints, can be nullptr.
  `[in]` | useUserData | Flag if ExtPxManager is allowed to override PxActor's userData, it will store pointer to PxActor there. It is recommended as fastest way. If set to 'false' HashMap will be used.

Returns:
  the new ExtPxManager if successful, NULL otherwise.

static ExtPxCollisionBuilder* Nv::Blast::ExtPxManager::createCollisionBuilder | ( | physx::PxPhysics & | physics,
|  | physx::PxCooking & | cooking |
| ) |  |  | `[static]`

Create PhysX based convex mesh builder.

virtual ExtPxFamily* Nv::Blast::ExtPxManager::createFamily | ( | const ExtPxFamilyDesc & | desc | ) | `[pure virtual]`

Create a px family from the given descriptor.

Parameters:

  `[in]` | desc | The family descriptor (see ExtPxFamilyDesc).

Returns:
  the created family, if the descriptor was valid and memory was available for the operation. Otherwise, returns NULL.

virtual bool Nv::Blast::ExtPxManager::createJoint | ( | TkJoint & | joint | ) | `[pure virtual]`

Create a px joint associated with TkJoint.

ExtPxCreateJointFunction will be called after this call. ExtPxCreateJointFunction must be set, nothing will happen otherwise.

Parameters:

  `[in]` | joint | TkJoint to be used to create px joint.

Returns:
  true iff Joint was created.

virtual void Nv::Blast::ExtPxManager::destroyJoint | ( | TkJoint & | joint | ) | `[pure virtual]`

Destroy a px joint associated with TkJoint.

Parameters:

  `[in]` | joint | TkJoint to be used to destroy px joint.

virtual uint32_t Nv::Blast::ExtPxManager::getActorCountLimit | ( |  | ) | `[pure virtual]`

Retrieve the limit to the total number of actors that can exist at a given time. A value of zero disables this (gives no limit).

Returns:
  the limit to the total number of actors that can exist at a given time (or zero if there is no limit).

virtual ExtPxActor* Nv::Blast::ExtPxManager::getActorFromPhysXActor | ( | const physx::PxRigidDynamic & | pxActor | ) | const`[pure virtual]`

Look up an associated ExtPxActor by PxRigidDynamic pointer.

Parameters:

  `[in]` | pxActor | The PxRigidDynamic pointer to look up.

Returns:
  pointer to the ExtPxActor object if it exists, NULL otherwise.

virtual uint32_t Nv::Blast::ExtPxManager::getFamilies | ( | ExtPxFamily ** | buffer,
|  | uint32_t | bufferSize |
| ) |  |  | const`[pure virtual]`

Retrieve an array of pointers (into the user-supplied buffer) to families.

Parameters:

  `[out]` | buffer | A user-supplied array of ExtPxFamily pointers.
  `[in]` | bufferSize | The number of elements available to write into buffer.

Returns:
  the number of ExtPxFamily pointers written to the buffer.

virtual uint32_t Nv::Blast::ExtPxManager::getFamilyCount | ( |  | ) | const`[pure virtual]`

The number of families currently in this manager.

Returns:
  the number of ExtPxFamily that currently exist in this manger.

virtual ExtPxFamily* Nv::Blast::ExtPxManager::getFamilyFromTkFamily | ( | TkFamily & | family | ) | const`[pure virtual]`

Look up an associated ExtPxFamily by TkFamily pointer.

Parameters:

  `[in]` | family | The TkFamily pointer to look up.

Returns:
  pointer to the ExtPxFamily object if it exists, NULL otherwise.

virtual TkFramework& Nv::Blast::ExtPxManager::getFramework | ( |  | ) | const`[pure virtual]`

Get a TkFramework object pointer used upon manager creation.

Returns:
  a pointer to the TkFramework object.

virtual physx::PxPhysics& Nv::Blast::ExtPxManager::getPhysics | ( |  | ) | const`[pure virtual]`

Get a PxPhysics object pointer used upon manager creation.

Returns:
  a pointer to the (const) PxPhysics object.

virtual uint32_t Nv::Blast::ExtPxManager::getPxActorCount | ( |  | ) | const`[pure virtual]`

The total number of PxActors generated by Blast.

Returns:
  the total number of PxActors generated by Blast.

virtual bool Nv::Blast::ExtPxManager::isPxUserDataUsed | ( |  | ) | const`[pure virtual]`

Get if useUserData was set upon manager creation.

Returns:
  true iff PxActor userData is used by manager.

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

Release this manager.

virtual void Nv::Blast::ExtPxManager::setActorCountLimit | ( | uint32_t | limit | ) | `[pure virtual]`

Limits the total number of actors that can exist at a given time. A value of zero disables this (gives no limit).

Parameters:

  `[in]` | limit | If not zero, the maximum number of actors that will be allowed to exist.

virtual void Nv::Blast::ExtPxManager::setCreateJointFunction | ( | ExtPxCreateJointFunction | createFn | ) | `[pure virtual]`

Set ExtPxCreateJointFunction to be used when new joints are being created.\

Parameters:

  `[in]` | createFn | Create function pointer to set, can be nullptr.

virtual void Nv::Blast::ExtPxManager::subscribe | ( | ExtPxListener & | listener | ) | `[pure virtual]`

Add a user implementation of ExtPxListener to this family's list of listeners.

Parameters:

  `[in]` | listener | The event listener to add.

virtual void Nv::Blast::ExtPxManager::unsubscribe | ( | ExtPxListener & | listener | ) | `[pure virtual]`

Remove a user implementation of ExtPxListener from this family's list of listeners.

Parameters:

  `[in]` | listener | The event listener to remove.

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

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