VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtMultipleHitDamageActuator Class Reference

DtMultipleHitDamageActuator is responsible for adjudicating the damage from appropriate detonations. More...

Inheritance diagram for DtMultipleHitDamageActuator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtMultipleHitDamageActuator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtMultipleHitDamageActuator ()
 destructor Unregisters with the detonation manager.
virtual bool init ()
 Overridden from the base class to call createPSR().
virtual bool createPSR ()
 Create a process state repository, or a different type if it is specified in the OPD.
virtual void tick ()
 Determines the destroyed status of the entity, and then checks to see if the flaming and smoking indicators should be turned off.
virtual bool adjudicateDirectDamage (const DtDetonationContext &detonationContext)
 When a detonation context is received, from the detonation manager, it is processed in order to determine the appropriate damage to the entity.
virtual bool adjudicateCollateralDamage (const DtDetonationContext &detonationContext)
 Determines collateral damage from an impact near the entity.
virtual DtString type () const
 Returns a string identifies the class type of component.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual bool getRangeEntry (const DtDetonationContext &detonationContext, DtPrbRangeTableEntry &rangeEntry, bool isDirectDamage=true)
 Gets the range entry from the damage component descriptor's kill probabilities.
virtual bool isCatastrophicallyKilled ()
 from adjudicateDirectDamage and adjudicateCollateralDamage
virtual bool isFirepowerKilled ()
virtual bool isMobilityKilled ()

Protected Attributes

DtMultipleHitDamageActuatorDescriptormyMultipleHitDamageComponentDescriptor
 The descriptor that initializes this actuator.
int myCurrentHitPoints
 The current health status of the entity.
DtMultipleHitDamagePSRmyProcessState
bool myFirstTick

Private Member Functions

 DtMultipleHitDamageActuator ()
 Default constructor; not implemented.
 DtMultipleHitDamageActuator (const DtMultipleHitDamageActuator &orig)
 copy constructor; not implemented
DtMultipleHitDamageActuatoroperator= (const DtMultipleHitDamageActuator &orig)
 assignment operator; not implemented

Detailed Description

DtMultipleHitDamageActuator is responsible for adjudicating the damage from appropriate detonations.

Uses Descriptor Type: DtMultipleHitDamageActuatorDescriptor


Constructor & Destructor Documentation

DtMultipleHitDamageActuator::DtMultipleHitDamageActuator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor Unregisters with the detonation manager.

Default constructor; not implemented.

copy constructor; not implemented


Member Function Documentation

virtual bool DtMultipleHitDamageActuator::init ( ) [virtual]

Overridden from the base class to call createPSR().

Reimplemented from DtDamageAdjudicationActuator.

Create a process state repository, or a different type if it is specified in the OPD.

virtual void DtMultipleHitDamageActuator::tick ( ) [virtual]

Determines the destroyed status of the entity, and then checks to see if the flaming and smoking indicators should be turned off.

Note:
Determining destroyed status updates the status if appropriate. Also, if the entity is destroyed, it ensures that it unregisters for detonation notifications if it hasn't already done so.
See also:
determineDestroyedStatus
unregisterForDetonations

Reimplemented from DtDamageAdjudicationActuator.

virtual bool DtMultipleHitDamageActuator::adjudicateDirectDamage ( const DtDetonationContext detonationContext) [virtual]

When a detonation context is received, from the detonation manager, it is processed in order to determine the appropriate damage to the entity.

Determines if the entity is catastrophically killed, mobility killed, and/or firepower killed. If an entity is catastrophically killed, mobility and firepower killed status are not determined as there is no point. However, an entity that is not catastrophically killed can be both firepower killed and mobility killed, or just one or the other.

See also:
getRangeEntry
isCatastrophicallyKilled
isFirepowerKilled
isMobilityKilled
setDestroyed
setMobilityKilled
setFirepowerKilled
Returns:
A boolean indicating whether or not the component was able to properly adjudicate the damage done to the associated entity by the detonation.
Note:
If this returns false, then the detonation could not be processed for some reason. Determines damage from a direct impact on the entity

Reimplemented from DtDamageAdjudicationActuator.

virtual bool DtMultipleHitDamageActuator::adjudicateCollateralDamage ( const DtDetonationContext detonationContext) [virtual]

Determines collateral damage from an impact near the entity.

Reimplemented from DtDamageAdjudicationActuator.

virtual DtString DtMultipleHitDamageActuator::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtMultipleHitDamageActuatorType

Reimplemented from DtDamageAdjudicationActuator.

static DtSimComponent* DtMultipleHitDamageActuator::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

Reimplemented from DtDamageAdjudicationActuator.

virtual bool DtMultipleHitDamageActuator::getRangeEntry ( const DtDetonationContext detonationContext,
DtPrbRangeTableEntry rangeEntry,
bool  isDirectDamage = true 
) [protected, virtual]

Gets the range entry from the damage component descriptor's kill probabilities.

Returns:
a boolean signifying whether or not it was able to get the appropriate range entry.
Parameters:
detonationContextContains all relevant information for finding the proper range entry.
rangeEntryThe range entry to be filled in correctly if found. from adjudicateDirectDamage and adjudicateCollateralDamage Passes in boolean to determine which damage table to use for the look up Default is to lookup in the direct damage file. Set to false for collateral damage file.

from adjudicateDirectDamage and adjudicateCollateralDamage

Returns:
a boolean signifying whether or not it the entity was catastrophically killed.
virtual bool DtMultipleHitDamageActuator::isFirepowerKilled ( ) [protected, virtual]
Returns:
a boolean signifying whether or not it the entity was firepower killed.
See also:
adjudicateDamage
virtual bool DtMultipleHitDamageActuator::isMobilityKilled ( ) [protected, virtual]
Returns:
a boolean signifying whether or not it the entity was mobility killed.
DtMultipleHitDamageActuator& DtMultipleHitDamageActuator::operator= ( const DtMultipleHitDamageActuator orig) [private]

assignment operator; not implemented


Member Data Documentation

The descriptor that initializes this actuator.

It reads in the initial number of hit points this entity has for full health

The current health status of the entity.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)