Main Page Class List Class Members

# Nv::Blast::TkFamily Class Reference

`#include <NvBlastTkFamily.h>`

Inheritance diagram for Nv::Blast::TkFamily:

List of all members.

## Public Member Functions
virtual void | addListener (TkEventListener &l)=0
virtual void | applyFracture (const NvBlastFractureBuffers *commands)=0
virtual uint32_t | getActorCount () const =0
virtual uint32_t | getActors (TkActor **buffer, uint32_t bufferSize, uint32_t indexStart=0) const =0
virtual const TkAsset * | getAsset () const =0
virtual const NvBlastFamily * | getFamilyLL () const =0
virtual void | reinitialize (const NvBlastFamily *newFamily, TkGroup *group=nullptr)=0
virtual void | removeListener (TkEventListener &l)=0

## Detailed Description

The TkFamily is associated with the TkActor that is instanced from a TkAsset, as well as all descendent TkActors generated by spliting TkActors within the family. It encapsulates an NvBlastFamily, and also holds a material which will be used by default on all TkActors during damage functions.

## Member Function Documentation

virtual void Nv::Blast::TkFamily::addListener | ( | TkEventListener & | l | ) | `[pure virtual]`

Add a user implementation of TkEventListener to this family's list of listeners. These listeners will receive all split and fracture events generated by TkActor objects in this family. They will also receive joint update events when TkJoint objects are updated that are (or were) associated with a TkActor in this family.

Parameters:

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

virtual void Nv::Blast::TkFamily::applyFracture | ( | const NvBlastFractureBuffers * | commands | ) | `[pure virtual]`

This function applies fracture buffers on relevant actors (actor which contains corresponding bond/chunk) in family.

Parameters:

  `[in]` | commands | The fracture commands to process.

virtual uint32_t Nv::Blast::TkFamily::getActorCount | ( |  | ) | const`[pure virtual]`

The number of actors currently in this family.

Returns:
  the number of TkActors that currently exist in this family.

virtual uint32_t Nv::Blast::TkFamily::getActors | ( | TkActor ** | buffer,
|  | uint32_t | bufferSize,
|  | uint32_t | indexStart = `0` |
| ) |  |  | const`[pure virtual]`

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

Parameters:

  `[out]` | buffer | A user-supplied array of TkActor pointers.
  `[in]` | bufferSize | The number of elements available to write into buffer.
  `[in]` | indexStart | The starting index of the actor.

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

virtual const TkAsset* Nv::Blast::TkFamily::getAsset | ( |  | ) | const`[pure virtual]`

Every family has an associated asset (the TkAsset which was instanced to create the first member of the family).

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

virtual const NvBlastFamily* Nv::Blast::TkFamily::getFamilyLL | ( |  | ) | const`[pure virtual]`

Access to underlying low-level family.

Returns:
  a pointer to the (const) low-level NvBlastFamily object.

virtual void Nv::Blast::TkFamily::reinitialize | ( | const NvBlastFamily * | newFamily,
|  | TkGroup * | group = `nullptr` |
| ) |  |  | `[pure virtual]`

A function to reinitialize this family with new family. The Family must be created from the same low-level asset, but can be in any other state. As a result split events (TkEvent::Split) will be dispatched reflecting the resulting changes (created and removed actors) Afterwards the family will contain a copy of the new family and all actors' low-level actor pointers will be updated.

Parameters:

  `[in]` | newFamily | The NvBlastFamily to use to reinitialize this family.
  `[in]` | group | The group for new actors to be placed in.

virtual void Nv::Blast::TkFamily::removeListener | ( | TkEventListener & | l | ) | `[pure virtual]`

Remove a TkEventReciever from this family's list of listeners.

Parameters:

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

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

- sdk/toolkit/include/NvBlastTkFamily.h