|
VR-Engage
2.2
|
DtVreSuppressionActuator extends the base suppression actuator to provide VR-Engage specific functionality for calculating and applying suppression effects to entities based on nearby detonations. The component registers callbacks with the DtDetonationManager to be notified of relevant detonations, and then calculates appropriate suppression levels based on distance and munition type.
Suppression effects can impact entity behavior and performance, simulating the psychological and physiological effects of nearby weapon impacts.
Uses Descriptor Type: DtSuppressionComponentDescriptor
#include <vreSuppressionActuator.h>
Public Member Functions | |
| DtVreSuppressionActuator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual const char * | type () const override |
| virtual bool | processDetonationInsult (const DtDetonationContext &detonationContext) override |
| virtual void | tick () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtSuppressionActuator > | |
| DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreSimComponent () |
| bool | isPlayerControlled (const std::string &role="") const |
| DtString | entitySystemName () const |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| makVre::DtVreSuppressionActuator::DtVreSuppressionActuator | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new suppression actuator component with the specified parameters. Initializes the suppression state and registers with the detonation manager.
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
|
overridevirtual |
Processes a detonation to determine its suppression effect on the entity.
| detonationContext | Context information about the detonation event |
When a detonation context is received from the detonation manager, it is processed to determine the appropriate suppression effect on the entity. The calculation uses the distance to the detonation along with information in the damage model to determine the insult from the detonation. If this is zero, then it computes the distance to the munition trajectory to possibly determine an additional insult.
|
overridevirtual |
Updates the suppression state each simulation frame.
Determines how the suppression effects may be wearing off over time. Suppression levels gradually decrease according to a configured decay rate, simulating the entity's recovery from the psychological effects of nearby detonations.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.