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>
|
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry) |
| |
◆ DtVreDieWhenHitActuator()
| makVre::DtVreDieWhenHitActuator::DtVreDieWhenHitActuator |
( |
const DtString & | name, |
|
|
DtLocalObject * | object, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | compDescriptor, |
|
|
DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
- Parameters
-
| name | The name of this component |
| object | The local object that owns this component |
| simManager | The simulation services manager |
| compDescriptor | Component descriptor with configuration parameters |
| parentRegistry | Optional 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.
◆ 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
-
| name | The name for the new component |
| object | The local object that will own this component |
| simManager | The simulation services manager |
| compDescriptor | Optional component descriptor |
| parentRegistry | Optional 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: