VR-Forces Developer's Guide
 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 
15 
16 class DtLaserLauncherPSR;
17 class DtReflectedDesignator;
18 class DtSimMessage;
19 class DtReleaseBombTask;
20 
21 namespace makVrf
22 {
23  class DtLaserDesignatorStateComponent;
24 }
25 
32 {
33 private:
40 
41 public:
42 
46  DtSimulationServices* simManager, DtComponentDescriptor* compDesc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
51  virtual ~DtReleaseBombController() override;
52 
55  virtual const char* type() const override;
56 
65  virtual bool init() override;
66 
67  //virtual void setComponentDescriptor(DtComponentDescriptor* componentDescriptor);
68 
75  virtual bool createPSR();
76 
80  virtual void preFirstTickInit() override;
81 
91  virtual void tick() override;
92 
96  static DtSimComponent * creator(const DtString& name,
97  DtLocalObject* owner,
98  DtSimulationServices* simManager,
99  DtComponentDescriptor* desc = 0,
100  DtReaderWriterRegistry* parentRegistry = 0);
101 
102 protected:
104  virtual DtUUID createBombObject(const DtEntityType& type);
105 
107  virtual void completeBombSetup(const DtSimObjectReference& bomb);
108 
117  virtual void targetBomb(const DtSimObjectReference& object, const DtReleaseBombTask* task,
118  DtUUID& targetIdOut, DtVector& targetLocationOut);
119 
125  virtual void configureWarhead(const DtSimObjectReference& bomb, const DtString& eventId,
126  const DtReleaseBombTask* task);
127 
131  virtual bool targetDesginatorValid(const makVrf::DtLaserDesignatorStateComponent& target) const;
132 
136  virtual const makVrf::DtLaserDesignatorStateComponent* lookupDesignator() const;
137 
140  virtual int defaultLaserCode() const;
141 
144 
145  static void setSyncLaserCodeCallback(DtSimMessage* msg, void* usr);
146  virtual void processSetSyncLaserCode(DtSimMessage* msg);
148 
151 
152  static void setLaserCodeRequestCallback(DtSimMessage* msg, void* usrData);
153  virtual void processSetLaserCodeRequestMessage(DtSimMessage* msg);
155 
160  virtual void createAndSendFireInteraction(const DtSimObject* bomb,
161  const DtString& eventId, const DtUUID& targetObjectId,
162  const DtVector& targetLocation);
163 
164 protected:
168 
169  //TODO: move to PSR:
172 
174 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtReleaseBombTask is the base class for all the other release bomb tasks. It is never used to launch ...
Definition: releaseBombTask.h:19
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtReleaseBombControllerDescriptor * myDescriptor
Definition: releaseBombController.h:173
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:22
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
Responds to release bomb tasks. This controller processes DtReleaseBombOnTarget, DtReleaseBombOnLocat...
Definition: releaseBombController.h:30
DtUUID myObjectPendingCreation
Definition: releaseBombController.h:170
DtReleaseBombControllerDescriptor; descriptor for the DtReleaseBombController component.
Definition: releaseBombControllerDescriptor.h:26
virtual bool init() override
Calls setRadio()
DtLaserLauncherPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: releaseBombController.h:167
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: laserDesignatorStateComponent.h:61
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
File: laserLauncherPSR.h.
Definition: laserLauncherPSR.h:34
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:80
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: releaseBombController.h:171
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)