VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
indirectArtilleryComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
11 
12 #pragma once
13 
14 #include <vector>
17 
19 class DtSimMessage;
21 class DtVrfObjectMessage;
24 
30 {
31 protected:
34  DtVrfObject* owner,
35  DtSimManager* simManager,
36  DtComponentDescriptor* desc = 0,
37  DtReaderWriterRegistry* parentRegistry = 0);
38 
41 
44 
45 public:
47  virtual ~DtIndirectArtilleryComponent(void);
48 
50  virtual bool init();
51 
57  virtual bool createPSR();
58 
60  virtual const char* type() const;
61 
63  virtual void tick();
66  static DtSimComponent* creator(const DtString& name, DtVrfObject* object,
67  DtSimManager* simManager, DtComponentDescriptor* compDescriptor,
68  DtReaderWriterRegistry* parentRegistry);
69 
70  static void requestIndirectArtilleryInformationCallback(const DtVrfObjectMessage* msg, void* usr);
71 
73  virtual void deactivate();
74 
75 protected:
77  virtual void setCoords(DtTime t);
78  virtual void setEllipseData(const DtIfIndirectArtilleryData & data);
79  static void modifyCallBack (DtSimMessage * msg, void * usr);
80  virtual void processModifyCallback(const DtIfIndirectArtilleryData & data);
81 
82  virtual void processRequestIndirectArtilleryInformation(const DtVrfObjectMessage* msg);
83 
85  virtual void sendCurrentState ();
86 
89  virtual bool isDataDifferent(const DtIfIndirectArtilleryData& data) const;
90 
91  virtual void createDetonation(const DtVector& position, double altitudeAboveGround);
92  virtual void createFlare(const DtVector& position, double altitudeAboveGround);
93 
95  virtual bool onFlareList(const DtObjectType& detonationType) const;
96 
97 protected:
100 
103 
106  std::vector<DtVector> myVertices;
107 
111 
113  std::vector<double> myBurstTimes;
114 
117 
120 
123 
125 
126  bool myWarned;
127 
129 };
#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
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
virtual bool init()
Overridden to cache a pointer to the entity&#39;s radio in this class.
const DtIndirectArtilleryDescriptor * myDescriptor
Definition: indirectArtilleryComponent.h:128
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
DtVector myCenter
The center of the ellipse.
Definition: indirectArtilleryComponent.h:116
Definition: readerWriterRegistry.h:39
End User Description: DtActuator is the base class for all actuator model components.
Definition: actuatorComponent.h:48
Definition: indirectArtilleryPSR.h:23
Definition: objectType.h:27
Definition: indirectArtilleryDescriptor.h:15
std::vector< double > myBurstTimes
The exact times of the bursts. Equal to startTime + N * period + DtRand() * spreadTime.
Definition: indirectArtilleryComponent.h:113
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
DtVector myMinor
The minor axis of the ellipse, acctually the orthoganal axis.
Definition: indirectArtilleryComponent.h:122
End User Description: This actuator is used on indirect artillery objects, typically ellipses...
Definition: indirectArtilleryComponent.h:29
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
bool myWarned
Definition: indirectArtilleryComponent.h:126
DtVrfOverlayObjectStateRepository * myOverlayStateRepository
Definition: indirectArtilleryComponent.h:124
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
Data container for Indirect Artillery.
Definition: ifModifyIndirectArtilleryObject.h:28
bool myDataModified
Flag to indicate if data has been modified.
Definition: indirectArtilleryComponent.h:102
DtVector myMajor
The major axis of the ellipse, actually just the first axis.
Definition: indirectArtilleryComponent.h:119
std::vector< DtVector > myVertices
Copy of vertices stored in the ellipse.
Definition: indirectArtilleryComponent.h:106
Definition: vrfOverlayObjectStateRepository.h:29
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
bool myDataInitialized
Flag to indicate if sumlation has started.
Definition: indirectArtilleryComponent.h:99
DtIndirectArtilleryPSR * myProcessState
Container for state data associated with this component.
Definition: indirectArtilleryComponent.h:110
virtual const char * type() const =0
Returns a string identifies the class type of component.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)