VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreSuppressionActuator Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtVreSuppressionActuator:
[legend]

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)
 

Constructor & Destructor Documentation

◆ DtVreSuppressionActuator()

makVre::DtVreSuppressionActuator::DtVreSuppressionActuator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional 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.

Member Function Documentation

◆ type()

virtual const char * makVre::DtVreSuppressionActuator::type ( ) const
overridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreSuppressionActuatorType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

◆ processDetonationInsult()

virtual bool makVre::DtVreSuppressionActuator::processDetonationInsult ( const DtDetonationContext & detonationContext)
overridevirtual

Processes a detonation to determine its suppression effect on the entity.

Parameters
detonationContextContext information about the detonation event
Returns
True if the detonation was successfully processed, false otherwise

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.

Note
If this returns false, then the detonation could not be processed for some reason, such as missing information or invalid parameters.

◆ tick()

virtual void makVre::DtVreSuppressionActuator::tick ( )
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.

◆ creator()

static DtSimComponent * makVre::DtVreSuppressionActuator::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory method used by the component creation system to instantiate new instances of this component type.


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