NvBlastExtMaterial Struct Reference

#include <NvBlastExtDamageShaders.h>

List of all members.

Public Member Functions

float getNormalizedDamage (float damageInHealth) const
 NvBlastExtMaterial ()

Public Attributes

float health
 health
float maxDamageThreshold
 max damage fraction threshold to be applied. Range [0, 1]. For example 0.8 won't allow more then 80% of health damage to be applied.
float minDamageThreshold
 min damage fraction threshold to be applied. Range [0, 1]. For example 0.1 filters all damage below 10% of health.


Detailed Description

Example of simple material. It is passed into damage shader, thus it is not used currently in any of them. The user can use it to filter and normalize before applying.

Material function implementers may choose their own set.


Constructor & Destructor Documentation

NvBlastExtMaterial::NvBlastExtMaterial (  )  [inline]


Member Function Documentation

float NvBlastExtMaterial::getNormalizedDamage ( float  damageInHealth  )  const [inline]

Helper to normalize damage.

Pass damage defined in health, damage in range [0, 1] is returned, where 0 basically indicates that the threshold wasn't reached and there is no point in applying it.

Parameters:
[in] damageInHealth Damage defined in terms of health amount to be reduced.
Returns:
normalized damage


Member Data Documentation

health

max damage fraction threshold to be applied. Range [0, 1]. For example 0.8 won't allow more then 80% of health damage to be applied.

min damage fraction threshold to be applied. Range [0, 1]. For example 0.1 filters all damage below 10% of health.


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