APEX Destructible Module: nvidia::apex::DestructibleParameters Struct Reference

NVIDIA APEX

nvidia::apex::DestructibleParameters Struct Reference

#include <DestructibleAsset.h>

List of all members.

Public Types

enum  { kDepthParametersCountMax = 16 }

Public Member Functions

PX_INLINE DestructibleParameters ()
 constructor sets to default.
PX_INLINE void setToDefault ()
 (re)sets the structure to the default.

Public Attributes

float damageCap
float forceToDamage
float impactVelocityThreshold
uint32_t minimumFractureDepth
int32_t impactDamageDefaultDepth
int32_t debrisDepth
uint32_t essentialDepth
float debrisLifetimeMin
float debrisLifetimeMax
float debrisMaxSeparationMin
float debrisMaxSeparationMax
float debrisDestructionProbability
PxBounds3 validBounds
float maxChunkSpeed
uint32_t flags
float fractureImpulseScale
uint16_t damageDepthLimit
uint8_t dynamicChunksDominanceGroup
bool useDynamicChunksGroupsMask
physx::PxFilterData dynamicChunksFilterData
float supportStrength
int8_t legacyChunkBoundsTestSetting
int8_t legacyDamageRadiusSpreadSetting
uint32_t depthParametersCount
DestructibleDepthParameters depthParameters [kDepthParametersCountMax]
DestructibleRTFractureParameters rtFractureParameters
bool alwaysDrawScatterMesh

Detailed Description

Parameters that apply to a destructible actor


Member Enumeration Documentation

anonymous enum

The maximum number of DestructibleDepthParameters (see depthParameters).

Enumerator:
kDepthParametersCountMax 

Constructor & Destructor Documentation

PX_INLINE nvidia::apex::DestructibleParameters::DestructibleParameters ( )

constructor sets to default.


Member Function Documentation

PX_INLINE void nvidia::apex::DestructibleParameters::setToDefault ( )

(re)sets the structure to the default.


Member Data Documentation

This flag forces drawing of scatter mesh on chunks with depth > 1. By default is false.

Limits the amount of damage applied to a chunk. This is useful for preventing the entire destructible from getting pulverized by a very large application of damage. This can easily happen when impact damage is used, and the damage amount is proportional to the impact force (see forceToDamage).

How deep in the hierarchy damage will be propagated, relative to the chunk hit. Default = UINT16_MAX.

The chunk hierarchy depth at which chunks are considered to be "debris." Chunks at this depth or below will be considered for various debris settings, such as debrisLifetime. Negative values indicate that no chunk depth is considered debris. Default value is -1.

The probablity that a debris chunk, when fractured, will simply be destroyed instead of becoming dynamic or breaking down further into child chunks. Valid range = [0.0,1.0]. Default value = 0.0.'

See also:
DestructibleAsset::debrisLifetimeMin

"Debris chunks" (see debrisDepth, above) will be destroyed after a time (in seconds) separated from non-debris chunks. The actual lifetime is interpolated between these two values, based upon the module's LOD setting. To disable lifetime, clear the DestructibleDepthParametersFlag::DEBRIS_TIMEOUT flag in the flags field. If debrisLifetimeMax < debrisLifetimeMin, the mean of the two is used for both. Default debrisLifetimeMin = 1.0, debrisLifetimeMax = 10.0f.

See also:
DestructibleAsset::debrisMaxSeparationMin

"Debris chunks" (see debrisDepth, above) will be destroyed if they are separated from their origin by a distance greater than maxSeparation. The actual maxSeparation is interpolated between these two values, based upon the module's LOD setting. To disable maxSeparation, clear the DestructibleDepthParametersFlag::DEBRIS_MAX_SEPARATION flag in the flags field. If debrisMaxSeparationMax < debrisMaxSeparationMin, the mean of the two is used for both. Default debrisMaxSeparationMin = 1.0, debrisMaxSeparationMax = 10.0f.

Parameters that apply to every chunk at a given depth level (see DestructibleDepthParameters). The element [0] of the array applies to the depth 0 (unfractured) chunk, element [1] applies to the level 1 chunks, etc. The number of valid depth parameters must be given in depthParametersCount.

The number of DestructibleDepthParameters (see depthParameters). Must be in the range [0, kDepthParametersCountMax].

Optional dominance group for dynamic chunks created when fractured. (ignored if > 31)

Optional groups mask (2.x) or filter data (3.x) for dynamic chunks created when fractured. (Used if useDynamicChunksGroupsMask is true.)

The chunk hierarchy depth up to which chunks will not be eliminated due to LOD considerations. These chunks are considered to be essential either for gameplay or visually. The minimum value is 0, meaning the level 0 chunk is always considered essential. Default value is 0.

A collection of flags defined in DestructibleParametersFlag.

If a chunk is at a depth which takes impact damage (see DestructibleDepthParameters), then when a chunk has a collision in the PxScene, it will take damage equal to forceToDamage mulitplied by the impact force. The default value is zero, which effectively disables impact damage.

Scale factor used to apply an impulse force along the normal of chunk when fractured. This is used in order to "push" the pieces out as they fracture.

The default depth to which chunks will take impact damage. This default may be overridden in the depth settings. Negative values imply no default impact damage. Default value = -1.

Large impact force may be reported if rigid bodies are spawned inside one another. In this case the relative velocity of the two objects will be low. This variable allows the user to set a minimum velocity threshold for impacts to ensure that the objects are moving at a min velocity in order for the impact force to be considered. Default value is zero.

Whether or not to use the old chunk bounds testing for damage, or use the module setting. A value of 0 forces the new method to be used. A positive value forces the old method to be used. Negative values cause the global (ModuleDestructible) setting to be used. Default = -1

Whether or not to use the old damage spread method, or use the module setting. A value of 0 forces the new method to be used. A positive value forces the old method to be used. Negative values cause the global (ModuleDestructible) setting to be used. Default = -1

If greater than 0, the chunks' speeds will not be allowed to exceed maxChunkSpeed. Use 0 to disable this feature (this is the default).

The chunks will not be broken free below this depth.

The supportStrength is used for the stress solver. As this value is increased it takes more force to break apart the chunks under the effect of stress solver.

Whether or not to use dynamicChunksGroupsMask. If false, NULL will be passed into the DestructibleActor upon instantiation, through the DestructibleActorDesc.

A bounding box around each DestructibleActor created, defining a range of validity for chunks that break free. These bounds are scaled and translated with the DestructibleActor's scale and position, but they are *not* rotated with the DestructibleActor.


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

Generated on Fri Dec 15 2017 13:58:22

Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.