VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanDamageActuator.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
16 
19 class DtHumanDamagePSR;
20 
22 class DtHumanDamagePSR;
23 
24 
35 {
36 
37 public:
38 
41  DtHumanDamageActuator(const DtString& name,
42  DtLocalObject* owner,
43  DtSimulationServices* simManager,
44  DtComponentDescriptor* desc = nullptr,
45  DtReaderWriterRegistry* parentRegistry = nullptr);
46 
49  virtual ~DtHumanDamageActuator() override;
50 
53  virtual bool createPSR() override;
54 
55  virtual bool init() override;
56 
59  virtual const char* type() const override;
60 
61  virtual void tick() override;
62 
66  virtual bool adjudicateDirectDamage(const DtDetonationContext& detonationContext) override;
67 
71  virtual bool adjudicateCollateralDamage(const DtDetonationContext& detonationContext) override;
72 
76  static DtSimComponent* creator(const DtString& name,
77  DtLocalObject* owner,
78  DtSimulationServices* simManager,
79  DtComponentDescriptor* desc = nullptr,
80  DtReaderWriterRegistry* parentRegistry = nullptr);
81 
82 protected:
83 
84  virtual void assessImpairment(DtDetonationContext& detonationContext,DtPrbValueList& probabilities, bool direct);
85 
86  virtual void setRestored() override;
87  virtual void setDestroyed() override;
88 
99  virtual DtDamageState isInjured(DtPrbValueList& probabilities) const;
100 
103  virtual void updateState( DtDamageState state );
104 
107  virtual void executeSetPosture( DtLifeformState lifeformState );
108 
110  virtual DtSymbolString injuredSlightString() const;
112  virtual DtSymbolString injuredModerateString() const;
113 
114 private:
116  DtHumanDamageActuator() = delete;
117 
119  DtHumanDamageActuator(const DtHumanDamageActuator& orig) = delete;
120 
122  const DtHumanDamageActuator& operator=(const DtHumanDamageActuator& orig) = delete;
123 
124 protected:
128 
135 
136  std::vector<DtString> myStunnedAnimationList;
137  std::vector<DtString> myProneAnimationList;
138  std::vector<DtString> myDeadAnimationList;
139 
142 };
143 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
std::vector< DtString > myProneAnimationList
Definition: humanDamageActuator.h:137
DtHumanDamagePSR * myMHDProcessState
Definition: humanDamageActuator.h:131
End User Description: A damage actuator that accounts for stunning an entity.
Definition: humanDamageActuator.h:34
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
virtual bool adjudicateDirectDamage(const DtDetonationContext &detonationContext) override
When a detonation context is received, from the detonation manager, it is processed in order to deter...
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
virtual bool init() override
Registers callbacks with the detonation manager. Provides the detonation manager a pointer to the com...
virtual void setRestored()
Re-registers the entity to receive detonations since it is now restored.
virtual bool createPSR()
Create a process state repository (DtDamageAdjudicationPSR), or a different type if it is specified i...
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void tick() override
Determines the destroyed status of the entity, and then checks to see if the flaming and smoking indi...
Definition: humanDamageActuatorDescriptor.h:19
std::vector< DtString > myStunnedAnimationList
Definition: humanDamageActuator.h:136
DtPrbValueList.
Definition: prbValueList.h:19
int myCurrentHitPoints
The current health status of the entity.
Definition: humanDamageActuator.h:130
DtString myCurrentId
This is set in adjudicate direct damage to make sure a hit isn&#39;t counted twice in a collateral damage...
Definition: humanDamageActuator.h:134
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:23
DtProbabilityDamageActuator & operator=(const DtProbabilityDamageActuator &orig)=delete
assignment operator; not implemented
virtual void setDestroyed()
Calls setDestroyed on the myLocalStateRepository. Also calls setFlaming and setSmoking based on the p...
DtHumanDamageActuatorDescriptor * myHumanDamageActuatorDescriptor
The descriptor that initializes this actuator. It reads in the initial number of hit points this e...
Definition: humanDamageActuator.h:127
Definition: humanDamagePSR.h:18
virtual bool adjudicateCollateralDamage(const DtDetonationContext &detonationContext) override
Determines collateral damage from an impact near the entity.
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtProbabilityDamageActuator is responsible for adjudicating the damage from appropriate detonations...
Definition: probabilityDamageActuator.h:63
std::vector< DtString > myDeadAnimationList
Definition: humanDamageActuator.h:138
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Member to allow for access to platform specific data.
Definition: humanDamageActuator.h:141
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)