VR-Forces 4.10 Class Documentation
 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) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
13 #include <vl/detonationInteraction.h>
14 
16 
19 class DtHumanDamagePSR;
20 
22 class DtHumanDamagePSR;
23 
24 
35 {
36 
37 public:
38 
41  DtHumanDamageActuator(const DtString& name,
42  DtVrfObject* owner,
43  DtSimManager* simManager,
44  DtComponentDescriptor* desc = 0,
45  DtReaderWriterRegistry* parentRegistry = 0);
46 
49  virtual ~DtHumanDamageActuator();
50 
53  virtual bool createPSR();
54 
55  virtual bool init();
56 
59  virtual const char* type() const;
60 
61  virtual void tick();
62 
66  virtual bool adjudicateDirectDamage(const DtDetonationContext& detonationContext);
67 
71  virtual bool adjudicateCollateralDamage(const DtDetonationContext& detonationContext);
72 
76  static DtSimComponent* creator(const DtString& name,
77  DtVrfObject* owner,
78  DtSimManager* simManager,
79  DtComponentDescriptor* desc = 0,
80  DtReaderWriterRegistry* parentRegistry = 0);
81 
82 protected:
83 
84  virtual void assessImpairment(DtDetonationContext& detonationContext,DtPrbValueList& probabilities, bool direct);
85 
86  virtual void setRestored();
87 
98  virtual DtDamageState isInjured(DtPrbValueList& probabilities) const;
99 
102  virtual void updateState(DtDamageState state);
103 
105  virtual DtSymbolString injuredSlightString() const;
107  virtual DtSymbolString injuredModerateString() const;
108 
109 private:
112 
115 
117  const DtHumanDamageActuator& operator=(const
118  DtHumanDamageActuator& orig);
119 
120 protected:
124 
130  DtEventId myCurrentId;
131 
132  std::vector<DtString> myStunnedAnimationList;
133  std::vector<DtString> myProneAnimationList;
134  std::vector<DtString> myDeadAnimationList;
135 };
136 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool adjudicateCollateralDamage(const DtDetonationContext &detonationContext)
Determines collateral damage from an impact near the entity.
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Definition: symbolString.h:20
std::vector< DtString > myProneAnimationList
Definition: humanDamageActuator.h:133
DtHumanDamagePSR * myMHDProcessState
Definition: humanDamageActuator.h:127
virtual const char * type() const
Returns a string identifies the class type of component.
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:42
Definition: readerWriterRegistry.h:39
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...
DtDamageAdjudicationActuator is responsible for adjudicating the damage from appropriate detonations...
Definition: damageAdjudicationActuator.h:63
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition: humanDamageActuatorDescriptor.h:19
std::vector< DtString > myStunnedAnimationList
Definition: humanDamageActuator.h:132
DtPrbValueList.
Definition: prbValueList.h:19
int myCurrentHitPoints
The current health status of the entity.
Definition: humanDamageActuator.h:126
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:27
DtHumanDamageActuatorDescriptor * myHumanDamageActuatorDescriptor
The descriptor that initializes this actuator.
Definition: humanDamageActuator.h:123
Definition: humanDamagePSR.h:18
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtDamageAdjudicationActuator & operator=(const DtDamageAdjudicationActuator &orig)
assignment operator; not implemented
virtual bool init()
Registers callbacks with the detonation manager.
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
virtual void tick()
Determines the destroyed status of the entity, and then checks to see if the flaming and smoking indi...
std::vector< DtString > myDeadAnimationList
Definition: humanDamageActuator.h:134
virtual bool adjudicateDirectDamage(const DtDetonationContext &detonationContext)
When a detonation context is received, from the detonation manager, it is processed in order to deter...
DtEventId 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:130

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)