NvBlastActorApplyFracture
Defined in lowlevel/NvBlast.h
-
void NvBlastActorApplyFracture(NvBlastFractureBuffers *eventBuffers, NvBlastActor *actor, const NvBlastFractureBuffers *commands, NvBlastLog logFn, NvBlastTimers *timers)
Applies the direct fracture and breaks graph bonds/edges as necessary.
Chunks damaged beyond their respective health fracture their children recursively, creating a NvBlastChunkFractureData for each.
Interpretation of NvBlastFractureBuffers: commands: Counters denote the number of command entries to process. Chunk and Bond userdata are not used. Health values denote the amount of damage to apply, as a positive value.
eventBuffers as input: Counters denote available entries for FractureData. Chunk and Bond userdata are not used. Health values are not used.
eventBuffers as output: Counters denote valid entires in FractureData arrays. Chunks and Bond userdata reflect the respective userdata set during asset initialization. Health values denote how much health is remaining for the damaged element. Broken elements report a negative value corresponding to the superfluous health damage.
commands and eventBuffers may point to the same memory.
- Parameters
eventBuffers – [inout] Target buffers to hold applied fracture events. May be NULL, in which case events are not reported. To avoid data loss, provide an entry for every lower-support chunk and every bond in the original actor.
actor – [inout] The NvBlastActor to apply fracture to.
commands – [in] The fracture commands to process.
logFn – [in] User-supplied message function (see NvBlastLog definition). May be NULL.
timers – [inout] If non-NULL this struct will be filled out with profiling information for the step, in profile build configurations.