VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
laserGuidedLauncherController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
14 
16 class DtLaserLauncherPSR;
17 class DtReflectedDesignator;
18 class DtVectorOutputPort;
19 class DtSimMessage;
20 
29 {
30 private:
37 
38 public:
39 
43  DtSimManager* simManager, DtComponentDescriptor* compDesc = 0,
44  DtReaderWriterRegistry* parentRegistry = 0);
45 
48 
51  virtual const char* type() const;
52 
55  virtual bool init();
56 
58  virtual void setComponentDescriptor(DtComponentDescriptor *compDesc);
59 
65  virtual bool createPSR();
66 
70  virtual void preFirstTickInit();
71 
73  virtual void tick();
74 
78  static DtSimComponent * creator(const DtString& name,
79  DtVrfObject* owner,
80  DtSimManager* simManager,
81  DtComponentDescriptor* desc = 0,
82  DtReaderWriterRegistry* parentRegistry = 0);
83 
84 protected:
85 
87  virtual void addRangeItems();
88 
89  virtual bool createPorts();
90 
93  virtual bool missileResourceAvailable() const;
94 
96  virtual void consumeMissileResource();
97 
99  virtual bool fireMunition(DtReflectedDesignator* target);
100 
104  virtual DtVrfObject* createMissileObject();
105 
108  virtual void createAndSendFireInteraction(DtVrfObject* missile,
109  DtReflectedDesignator* targetDesignator,
110  const DtEventId& eventId);
111 
119  virtual DtReflectedDesignator* chooseTarget(bool& targetInFireCone, DtVector& targetLocalPosition);
120 
127  virtual bool targetDesginatorValid(DtReflectedDesignator* target,
128  DtVector& targetLocalPosition);
129 
131  virtual bool targetDesginatorInFireCone(DtReflectedDesignator* target);
132 
135  virtual bool munitionLoaded() const;
136 
139  virtual DtVector launcherGeocentricPosition() const;
140 
143  virtual DtVector launcherLocalPosition() const;
144 
146  virtual bool missileInFlight();
147 
149  virtual int defaultLaserCode() const;
150 
152 
153  static void setLaserCodeRequestCallback(DtSimMessage* msg, void* usrData);
154  virtual void processSetLaserCodeRequestMessage(DtSimMessage* msg);
156 
159 
160  static void setSyncLaserCodeCallback(DtSimMessage* msg, void* usr);
161  virtual void processSetSyncLaserCode(DtSimMessage* msg);
163 
164 protected:
167 
171 
173 
174 
175 
176 
177 
178 
179 
182 
188 };

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)