VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
multipleHitDamageActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
19 
40 {
41 
42 public:
43 
47  DtLocalObject* owner,
48  DtSimulationServices* simManager,
49  DtComponentDescriptor* desc = 0,
50  DtReaderWriterRegistry* parentRegistry = 0);
51 
54  virtual ~DtMultipleHitDamageActuator();
55 
57  virtual bool init();
58 
61  virtual bool createPSR();
62 
67  virtual void preFirstTickInit();
68 
72  virtual bool adjudicateDirectDamage(const DtDetonationContext& detonationContext);
73 
77  virtual bool adjudicateCollateralDamage(const DtDetonationContext& detonationContext);
78 
81  virtual const char* type() const;
82 
86  static DtSimComponent * creator(const DtString& name,
87  DtLocalObject* owner,
88  DtSimulationServices* simManager,
89  DtComponentDescriptor* desc = 0,
90  DtReaderWriterRegistry* parentRegistry = 0);
91 
92 protected:
93 
105  virtual bool getProbabilities(const DtDetonationContext& detonationContext,
106  DtPrbValueList& probabilities, bool isDirectDamage = true);
107 
112  virtual bool isCatastrophicallyKilled();
113 
117  virtual bool isFirepowerKilled();
118 
120  virtual bool isMobilityKilled();
121 
122  virtual void setRestored();
123 
125  virtual void setHitPoints(int current, int full);
126 
127 protected:
128 
132 
139 
140 private:
141 
144 
147 
150 
151 };
#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.
virtual bool isMobilityKilled(DtPrbValueList &probabilities, DtSymbolString mobilityKillString) const
Determines if the entity is mobility killed by the detonation with the specified list of probabilitie...
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
DtMultipleHitDamageActuatorDescriptor; descriptor for the DtMultipleHitDamageActuator component...
Definition: multipleHitDamageActuatorDescriptor.h:23
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
DtMultipleHitDamageActuatorDescriptor * myMultipleHitDamageComponentDescriptor
The descriptor that initializes this actuator. It reads in the initial number of hit points this enti...
Definition: multipleHitDamageActuator.h:131
A damage actuator that keeps track of "Hit Points" for an entity.
Definition: multipleHitDamageActuator.h:38
virtual bool isFirepowerKilled(DtPrbValueList &probabilities, DtSymbolString firepowerKillString) const
Determines if the entity is firepower killed by the detonation with the specified list of probabiliti...
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...
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtDamageAdjudicationActuator is responsible for adjudicating the damage from appropriate detonations...
Definition: damageAdjudicationActuator.h:64
DtMultipleHitDamagePSR * myMHDProcessState
Definition: multipleHitDamageActuator.h:135
DtPrbValueList.
Definition: prbValueList.h:19
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:23
int myCurrentHitPoints
The current health status of the entity.
Definition: multipleHitDamageActuator.h:134
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtDamageAdjudicationActuator & operator=(const DtDamageAdjudicationActuator &orig)
assignment operator; not implemented
virtual bool init()
Registers callbacks with the detonation manager. Provides the detonation manager a pointer to the com...
DtString myCurrentId
This is set in adjudicate direct damage to make sure a hit isn't counted twice in a collateral damage...
Definition: multipleHitDamageActuator.h:138
virtual bool adjudicateDirectDamage(const DtDetonationContext &detonationContext)
When a detonation context is received, from the detonation manager, it is processed in order to deter...
class DtMultipleHitDamagePSR:
Definition: multipleHitDamagePSR.h:19
virtual bool isCatastrophicallyKilled(DtPrbValueList &probabilities, DtSymbolString catastrophicKillString) const
Determines if the entity is catastrophically killed by the detonation with the specified list of prob...
virtual bool getProbabilities(const DtDetonationContext &detonationContext, DtPrbValueList &probabilities, bool isDirectDamage=true) const
Gets the list of probabilities from the damage component descriptor's damage tables.
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)