VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
releaseBombController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class DtLaserLauncherPSR;
15 class DtReflectedDesignator;
16 class DtSimMessage;
17 class DtReleaseBombTask;
18 
25 {
26 private:
33 
34 public:
35 
38  DtReleaseBombController(const DtString &name, DtVrfObject* owner,
39  DtSimManager* simManager, DtComponentDescriptor* compDesc = 0,
40  DtReaderWriterRegistry* parentRegistry = 0);
41 
44  virtual ~DtReleaseBombController();
45 
48  virtual const char* type() const;
49 
58  virtual bool init();
59 
66  virtual bool createPSR();
67 
71  virtual void preFirstTickInit();
72 
82  virtual void tick();
83 
87  static DtSimComponent * creator(const DtString& name,
88  DtVrfObject* owner,
89  DtSimManager* simManager,
90  DtComponentDescriptor* desc = 0,
91  DtReaderWriterRegistry* parentRegistry = 0);
92 
93 protected:
95  virtual DtVrfObject* createBombObject(const DtEntityType& type);
96 
105  virtual void targetBomb(DtVrfObject* object, const DtReleaseBombTask* task,
106  DtGlobalObjectDesignator& targetIdOut, DtVector targetLocationOut);
107 
113  virtual void configureWarhead(DtVrfObject* bomb, DtEventId eventId,
114  const DtReleaseBombTask* task);
115 
119  virtual bool targetDesginatorValid(DtReflectedDesignator* target);
120 
124  virtual DtReflectedDesignator* lookupDesignator();
125 
128  virtual int defaultLaserCode() const;
129 
132 
133  static void setSyncLaserCodeCallback(DtSimMessage* msg, void* usr);
134  virtual void processSetSyncLaserCode(DtSimMessage* msg);
136 
139 
140  static void setLaserCodeRequestCallback(DtSimMessage* msg, void* usrData);
141  virtual void processSetLaserCodeRequestMessage(DtSimMessage* msg);
143 
148  virtual void createAndSendFireInteraction(const DtVrfObject* bomb,
149  const DtEventId& eventId, const DtGlobalObjectDesignator& targetObjectId,
150  const DtVector& targetLocation);
151 
152 protected:
156 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtReleaseBombTask is the base class for all the other release bomb tasks.
Definition: releaseBombTask.h:19
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
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 const char * type() const =0
Returns a string identifies the class type of component.
Responds to release bomb tasks.
Definition: releaseBombController.h:23
virtual bool init()
Calls setRadio()
DtLaserLauncherPSR * myProcessState
Container for state data associated with this component.
Definition: releaseBombController.h:155
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
File: laserLauncherPSR.h.
Definition: laserLauncherPSR.h:34
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)