VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launchSmokeController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 #include "vlutil/vlString.h"
15 
16 #include <list>
17 
20 
26 {
27 public:
29  DtLaunchSmokeController(const DtString & name, DtLocalObject* owner,
30  DtSimulationServices * simManager, DtComponentDescriptor* desc = NULL,
31  DtReaderWriterRegistry * parentRegistry = 0);
32 
34  virtual ~DtLaunchSmokeController();
35 
38 
41 
44  virtual const char* type() const;
45 
47  virtual void registerTaskMsgCallbacks();
48 
52  static void launchSmokeTaskCallback(DtSimMessage * msg, void * usr);
53 
56  virtual void processLaunchSmokeTask(DtSimMessage * msg);
57 
60  virtual bool init();
61 
63  virtual void tick();
64 
66  static DtSimComponent* creator(const DtString & name, DtLocalObject* owner,
67  DtSimulationServices * simManager, DtComponentDescriptor* desc,
68  DtReaderWriterRegistry * parentRegistry);
69 
71  virtual bool useSmokeBomb();
72 
75  virtual bool launchSmoke();
76 
78  virtual void sendDetonation(const DtVector& geocLoc);
79 
81  virtual void launchSmokeTowards(double heading);
82 
84  virtual double calculateHeadingTowards(DtRwSensorContactInfo* closest) const;
85 
87  virtual DtRwSensorContactInfo* findClosestThreat() const;
88 
90  virtual void terrainClamp(const DtVector& geocLocIn, DtVector& geocLocOut) const;
91 
93  virtual void createSmoke(const std::list<DtVector>& cloudLocations);
94 
95 protected:
97  virtual bool createPSR();
98 
99 protected:
101 
104 
105  std::list<DtVector> myPoints;
106  double myArcRange;
107 };
108 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtLaunchSmokePSR * myProcessState
Holds state values which need to get saved out into the order of battle.
Definition: launchSmokeController.h:103
std::list< DtVector > myPoints
Definition: launchSmokeController.h:105
virtual void registerTaskMsgCallbacks()
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:49
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
This class represents the data gathered by a sensor about a particular single sensor contact...
Definition: rwSensorContactInfo.h:68
virtual bool init()
Calls setRadio()
This class stores the heading and launch at nearest target values from DtLaunchSmokeTask so they can ...
Definition: launchSmokePSR.h:17
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 ...
const DtLaunchSmokeControllerDescriptor * myDesc
Definition: launchSmokeController.h:100
DtLaunchSmokeControllerDescriptor; descriptor for the DtLaunchSmokeComponent component.
Definition: launchSmokeControllerDescriptor.h:25
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
double myArcRange
Definition: launchSmokeController.h:106
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
End User Description: This controller handles DtLaunchSmokeTask tasks on an entity, and creates one or more tactical smoke clouds when the task executes. Uses Descriptor Type: DtLaunchSmokeControllerDescriptor.
Definition: launchSmokeController.h:25

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)