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

Detailed Description

DtVreDieWhenHitActuator extends the base die-when-hit actuator with VRE-specific functionality. It monitors for collision events and weapon hits, changing the entity to a destroyed state when appropriate. This actuator specifically checks for vehicles running over the entity and handles those collisions as destruction events.

#include <vreDieWhenHitActuator.h>

Inheritance diagram for makVre::DtVreDieWhenHitActuator:
[legend]

Public Member Functions

 DtVreDieWhenHitActuator (const DtString &name, DtLocalObject *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreDieWhenHitActuator () override
 
virtual const char * type () const override
 
virtual void tick () override
 
- Public Member Functions inherited from makVre::DtVreSimComponent< DtDieWhenHitActuator >
 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 *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry)
 

Constructor & Destructor Documentation

◆ DtVreDieWhenHitActuator()

makVre::DtVreDieWhenHitActuator::DtVreDieWhenHitActuator ( const DtString & name,
DtLocalObject * object,
DtSimulationServices * simManager,
DtComponentDescriptor * compDescriptor,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
objectThe local object that owns this component
simManagerThe simulation services manager
compDescriptorComponent descriptor with configuration parameters
parentRegistryOptional parent registry for reader/writer functionality

Creates a new die-when-hit actuator component with the specified parameters.

◆ ~DtVreDieWhenHitActuator()

virtual makVre::DtVreDieWhenHitActuator::~DtVreDieWhenHitActuator ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the die-when-hit actuator component.

Member Function Documentation

◆ type()

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

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreDieWhenHitActuatorType)

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

◆ tick()

virtual void makVre::DtVreDieWhenHitActuator::tick ( )
overridevirtual

Updates the actuator state each simulation frame.

Checks for collision events with vehicles and other destruction conditions. If hit by a weapon or run over by a vehicle, changes the entity to the destroyed state. Updates kinematic state and copies it to the state repository.

◆ creator()

static DtSimComponent * makVre::DtVreDieWhenHitActuator::creator ( const DtString & name,
DtLocalObject * object,
DtSimulationServices * simManager,
DtComponentDescriptor * compDescriptor,
DtReaderWriterRegistry * parentRegistry )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
objectThe local object that will own this component
simManagerThe simulation services manager
compDescriptorOptional 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: