VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions
DtDetonationServiceInterface Class Referenceabstract

Abstract interface class to the detonation service. This service provides information about detonation events, and allows the creation of detonation events. While it is possible to do this through the DtEventManager, the DtDetonationServiceInterface is built on top of that class and provides an API designed specifically for detonation events. This includes registering for detonations that are filtered for specific areas or that impact specific entities.

Inheritance diagram for DtDetonationServiceInterface:
Inheritance graph
[legend]

Public Types

typedef bool(* DtDamageAdjudicationFunction )(const DtDetonationContext &detonationContext, void *usr)
 

Public Member Functions

 DtDetonationServiceInterface ()
 
virtual DtDetonationResult detonationResult (const DtSimMunition &munition, DtDetonatorFuze fuze, const DtEntityType &targetEntityType, const DtVector &localPosition) const =0
 
virtual DtDetonationResult detonationResult (const DtSimMunition &munition, DtDetonatorFuze fuze, const DtSurface &terrainSurface, const DtVector &localPosition) const =0
 
virtual DtDetonationResult detonationResultMidAir (const DtSimMunition &munition, const DtVector &localPosition) const =0
 
virtual void sendDetonationInteraction (const makVrfEvents::DtDetonationEvent &detonation)=0
 
virtual bool registerDirectDetonation (const DtUUID &entityId, void *callbackObject, DtDamageAdjudicationFunction func)=0
 
virtual bool registerCollateralDetonation (const DtUUID &entityId, DtSimMunition munition, double maxDamageRadius, void *callbackObject, DtDamageAdjudicationFunction func)=0
 
virtual bool registerCollateralDetonationByPower (const DtUUID &entityId, const DtString &powerType, double minDamagePower, void *callbackObject, DtDamageAdjudicationFunction func)=0
 
virtual bool unRegisterDirectDetonationTarget (const DtUUID &entity)=0
 
virtual bool unRegisterCollateralDetonationTarget (const DtUUID &entity)=0
 
virtual bool unRegisterCollateralDetonationCallback (const DtUUID &entity, void *callbackObject, DtDamageAdjudicationFunction func)=0
 
virtual bool reinitialize ()=0
 
virtual void tick ()=0
 
virtual const DtDetonationParamsparameters () const =0
 
virtual const
DtTerrainDeformationParams
terrainDeformationParameters () const =0
 

Private Member Functions

 DtDetonationServiceInterface (const DtDetonationServiceInterface &)
 
DtDetonationServiceInterfaceoperator= (const DtDetonationServiceInterface &)
 

Member Typedef Documentation

typedef bool(* DtDetonationServiceInterface::DtDamageAdjudicationFunction)(const DtDetonationContext &detonationContext, void *usr)

Constructor & Destructor Documentation

DtDetonationServiceInterface::DtDetonationServiceInterface ( const DtDetonationServiceInterface )
private
DtDetonationServiceInterface::DtDetonationServiceInterface ( )

Member Function Documentation

DtDetonationServiceInterface& DtDetonationServiceInterface::operator= ( const DtDetonationServiceInterface )
private
virtual DtDetonationResult DtDetonationServiceInterface::detonationResult ( const DtSimMunition munition,
DtDetonatorFuze  fuze,
const DtEntityType &  targetEntityType,
const DtVector localPosition 
) const
pure virtual

Returns the detonation result when a munition of the given type hits an entity of the given type.

Implemented in DtDetonationManager.

virtual DtDetonationResult DtDetonationServiceInterface::detonationResult ( const DtSimMunition munition,
DtDetonatorFuze  fuze,
const DtSurface terrainSurface,
const DtVector localPosition 
) const
pure virtual

Returns the detonation result when a munition of the given type hits the terrain with the given surface type. If the surface type is null, then the default detonation result is used.

Implemented in DtDetonationManager.

virtual DtDetonationResult DtDetonationServiceInterface::detonationResultMidAir ( const DtSimMunition munition,
const DtVector localPosition 
) const
pure virtual

Returns the detonation result for a munition of the given type that when it detonates in mid-air.

Implemented in DtDetonationManager.

virtual void DtDetonationServiceInterface::sendDetonationInteraction ( const makVrfEvents::DtDetonationEvent detonation)
pure virtual

Send the fully initialized detonation interaction.

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::registerDirectDetonation ( const DtUUID entityId,
void *  callbackObject,
DtDamageAdjudicationFunction  func 
)
pure virtual

Use this function to register interest in direct detonations ie entity impact or entity proximate detonations. Supplies the entity, the entity ID, a callback function and a pointer to the actuator (void *)

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::registerCollateralDetonation ( const DtUUID entityId,
DtSimMunition  munition,
double  maxDamageRadius,
void *  callbackObject,
DtDamageAdjudicationFunction  func 
)
pure virtual

Use this function to register interest in collateral detonations ie ground detonations from indirect fire, missile detonations or direct fire detonations that would cause collateral damage to nearby entities. Supplies the entity, the entity ID, the munition being used, it's maximum radius that it can cause damage to the entity, a callback function, and a pointer to the actuator (void *). The munition and maximum damage radius are stored in the collateralDetonationTargetInfoPtr's damageMap keyed by munition.

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::registerCollateralDetonationByPower ( const DtUUID entityId,
const DtString powerType,
double  minDamagePower,
void *  callbackObject,
DtDamageAdjudicationFunction  func 
)
pure virtual

Use this function to register interest in collateral detonations ie ground detonations from indirect fire, missile detonations or direct fire detonations that would cause collateral damage to nearby entities. Supplies the entity, the entity ID, the type of detonation power (e.g. "explosive"), the minimum power that can cause damage to the entity, a callback function, and a pointer to the actuator (void *).

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::unRegisterDirectDetonationTarget ( const DtUUID entity)
pure virtual

Removes the entity from the detonation manager's container of detonation targets.

Parameters
entitythe address of the entity to be unregistered.
Note
If the entity pointer is NULL, then nothing is unregistered.
Returns
a boolean indicating the success or failure of the unregistration.

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::unRegisterCollateralDetonationTarget ( const DtUUID entity)
pure virtual

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::unRegisterCollateralDetonationCallback ( const DtUUID entity,
void *  callbackObject,
DtDamageAdjudicationFunction  func 
)
pure virtual

Removes the given entity callback from the detonation manager's container of detonation target callbacks.

Implemented in DtDetonationManager.

virtual const DtDetonationParams* DtDetonationServiceInterface::parameters ( ) const
pure virtual
Returns
The parameters for this DtDetonationManager.

Implemented in DtDetonationManager.

virtual const DtTerrainDeformationParams* DtDetonationServiceInterface::terrainDeformationParameters ( ) const
pure virtual
Returns
The parameters for this DtDetonationManager.

Implemented in DtDetonationManager.

virtual bool DtDetonationServiceInterface::reinitialize ( )
pure virtual

Resets the detonation manager to initial state.

  • Removes any registered callbacks from the exercise connection
  • calls init to initialize the manager.
Returns
a boolean signifying success or failure.
See Also
init

Implemented in DtDetonationManager.

virtual void DtDetonationServiceInterface::tick ( )
pure virtual

Tick the detonation manager.

Implemented in DtDetonationManager.


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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)