Main Page Class List Class Members

# Nv::Blast::ExtPxAsset Class Reference

`#include <NvBlastExtPxAsset.h>`

Inheritance diagram for Nv::Blast::ExtPxAsset:

List of all members.

## Public Member Functions
virtual NvBlastExtDamageAccelerator * | getAccelerator () const =0
virtual uint32_t | getChunkCount () const =0
virtual const ExtPxChunk * | getChunks () const =0
virtual const NvBlastActorDesc & | getDefaultActorDesc () const =0
virtual NvBlastActorDesc & | getDefaultActorDesc ()=0
virtual uint32_t | getSubchunkCount () const =0
virtual const ExtPxSubchunk * | getSubchunks () const =0
virtual const TkAsset & | getTkAsset () const =0
virtual void | release ()=0
virtual void | setAccelerator (NvBlastExtDamageAccelerator *accelerator)=0
virtual void | setUniformHealth (bool enabled)=0
## Static Public Member Functions
static ExtPxAsset * | create (TkAsset *asset, ExtPxAssetDesc::ChunkDesc *chunks, uint32_t chunkCount)
static ExtPxAsset * | create (TkAsset *asset)
static ExtPxAsset * | create (const TkAssetDesc &desc, ExtPxChunk *pxChunks, ExtPxSubchunk *pxSubchunks, TkFramework &framework)
static ExtPxAsset * | create (const ExtPxAssetDesc &desc, TkFramework &framework)
## Public Attributes
void * | userData

## Detailed Description

Asset.

Keeps all the static data needed for physics.

## Member Function Documentation

static ExtPxAsset* Nv::Blast::ExtPxAsset::create | ( | TkAsset * | asset,
|  | ExtPxAssetDesc::ChunkDesc * | chunks,
|  | uint32_t | chunkCount |
| ) |  |  | `[static]`

static ExtPxAsset* Nv::Blast::ExtPxAsset::create | ( | TkAsset * | asset | ) | `[static]`

static ExtPxAsset* Nv::Blast::ExtPxAsset::create | ( | const TkAssetDesc & | desc,
|  | ExtPxChunk * | pxChunks,
|  | ExtPxSubchunk * | pxSubchunks,
|  | TkFramework & | framework |
| ) |  |  | `[static]`

Create a new ExtPxAsset.

Parameters:

  `[in]` | desc | The ExtPxAssetDesc descriptor to be used,

See also:
  ExtPxAssetDesc.

Parameters:

  `[in]` | framework | The TkFramework instance to be used to create TkAsset.

Returns:
  the new ExtPxAsset if successful, NULL otherwise.

static ExtPxAsset* Nv::Blast::ExtPxAsset::create | ( | const ExtPxAssetDesc & | desc,
|  | TkFramework & | framework |
| ) |  |  | `[static]`

Create a new ExtPxAsset.

Parameters:

  `[in]` | desc | The ExtPxAssetDesc descriptor to be used,

See also:
  ExtPxAssetDesc.

Parameters:

  `[in]` | framework | The TkFramework instance to be used to create TkAsset.

Returns:
  the new ExtPxAsset if successful, NULL otherwise.

virtual NvBlastExtDamageAccelerator* Nv::Blast::ExtPxAsset::getAccelerator | ( |  | ) | const`[pure virtual]`

Set damage accelerator associated with this asset.

Implemented in Nv::Blast::final.

virtual uint32_t Nv::Blast::ExtPxAsset::getChunkCount | ( |  | ) | const`[pure virtual]`

Get the number of chunks for this asset. May be used in conjunction with getChunks().

Returns:
  the number of chunks for the asset.

Implemented in Nv::Blast::final, and Nv::Blast::final.

virtual const ExtPxChunk* Nv::Blast::ExtPxAsset::getChunks | ( |  | ) | const`[pure virtual]`

Access asset's array of chunks. Use getChunkCount() to get the size of this array.

Returns:
  a pointer to an array of chunk of an asset.

Implemented in Nv::Blast::final.

virtual const NvBlastActorDesc& Nv::Blast::ExtPxAsset::getDefaultActorDesc | ( |  | ) | const`[pure virtual]`

Implemented in Nv::Blast::final.

virtual NvBlastActorDesc& Nv::Blast::ExtPxAsset::getDefaultActorDesc | ( |  | ) | `[pure virtual]`

Get the default NvBlastActorDesc to be used when creating family from this asset. It is called 'default', because it can be overwritten in ExtPxManager::createFamily(...) function.

Initially default NvBlastActorDesc contains only uniform health values, and 'nullptr' is set in arrays of health. Call setUniformHealth(false) in order to set health per bond/chunk. You can then access directly values stored in NvBlastActorDesc, change them and they will be serialized/deserialized as withing asset itself.

NOTE: do not change actual pointers in NvBlastActorDesc: initialBondHealths and initialSupportChunkHealths. You can change actual values in those arrays or if they are 'nullptr' call setUniformHealth(false) before. Or call setUniformHealth(true) to make them 'nullptr'.

Returns:
  the default NvBlastActorDesc.

Implemented in Nv::Blast::final.

virtual uint32_t Nv::Blast::ExtPxAsset::getSubchunkCount | ( |  | ) | const`[pure virtual]`

Get the number of subchunks for this asset. May be used in conjunction with getSubchunks(). Subchunk count is the maximum value of ExtPxChunk: (firstSubchunkIndex + subchunkCount).

Returns:
  the number of subchunks for the asset.

Implemented in Nv::Blast::final.

virtual const ExtPxSubchunk* Nv::Blast::ExtPxAsset::getSubchunks | ( |  | ) | const`[pure virtual]`

Access asset's array of subchunks. Use getSubchunkCount() to get the size of this array.

Returns:
  a pointer to an array of subchunks of an asset.

Implemented in Nv::Blast::final.

virtual const TkAsset& Nv::Blast::ExtPxAsset::getTkAsset | ( |  | ) | const`[pure virtual]`

Every ExtPxAsset has corresponding TkAsset.

/return a pointer to TkAsset actor.

Implemented in Nv::Blast::final.

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

Release this ExtPxAsset.

Implemented in Nv::Blast::final, Nv::Blast::final, Nv::Blast::final, Nv::Blast::final, Nv::Blast::final, and Nv::Blast::final.

virtual void Nv::Blast::ExtPxAsset::setAccelerator | ( | NvBlastExtDamageAccelerator * | accelerator | ) | `[pure virtual]`

Set damage accelerator associated with this asset.

Implemented in Nv::Blast::final.

virtual void Nv::Blast::ExtPxAsset::setUniformHealth | ( | bool | enabled | ) | `[pure virtual]`

Set if uniform health values should be used in NvBlastActorDesc or per bond/chunk ones.

See also:
  getDefaultActorDesc.

Implemented in Nv::Blast::final.

## Member Data Documentation

void* Nv::Blast::ExtPxAsset::userData

Pointer field available to the user.

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

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