VR-Forces Developer's Guide
 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>
18 
20 class DtSimMessage;
22 class DtVrfObjectMessage;
25 
31 {
32 protected:
35  DtLocalObject* owner,
36  DtSimulationServices* simManager,
37  DtComponentDescriptor* desc = 0,
38  DtReaderWriterRegistry* parentRegistry = 0);
39 
42 
45 
46 public:
48  virtual ~DtIndirectArtilleryComponent(void) override;
49 
51  virtual bool init() override;
52 
58  virtual bool createPSR();
59 
61  virtual const char* type() const override;
62 
64  virtual void tick() override;
67  static DtSimComponent* creator(const DtString& name, DtLocalObject* object,
68  DtSimulationServices* simManager, DtComponentDescriptor* compDescriptor,
69  DtReaderWriterRegistry* parentRegistry);
70 
71  static void requestIndirectArtilleryInformationCallback(const DtVrfObjectMessage* msg, void* usr);
72 
74  virtual void deactivate();
75 
76 protected:
78  virtual void setCoords(DtTime t);
79  virtual void setEllipseData(const DtIfIndirectArtilleryData & data);
80  static void modifyCallBack (DtSimMessage * msg, void * usr);
81  virtual void processModifyCallback(const DtIfIndirectArtilleryData & data);
82 
83  virtual void processRequestIndirectArtilleryInformation(const DtVrfObjectMessage* msg);
84 
86  virtual void sendCurrentState ();
87 
90  virtual bool isDataDifferent(const DtIfIndirectArtilleryData& data) const;
91 
92  virtual void createDetonation(const DtVector& position, double altitudeAboveGround);
93  virtual void createFlare(const DtVector& position, double altitudeAboveGround);
94 
96  virtual bool onFlareList(const DtEntityType& detonationType) const;
97 
98 protected:
101 
104 
107  std::vector<DtVector> myVertices;
108 
112 
114  std::vector<double> myBurstTimes;
115 
117  DtVector myCenter;
118 
120  DtVector myMajor;
121 
123  DtVector myMinor;
124 
126 
127  bool myWarned;
128 
131 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
const DtIndirectArtilleryDescriptor * myDescriptor
Definition: indirectArtilleryComponent.h:129
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtVector myCenter
The center of the ellipse.
Definition: indirectArtilleryComponent.h:117
Definition: readerWriterRegistry.h:39
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity&#39;s radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor&#39;s DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it&#39;s location, rotation and so forth. These are created in the entity&#39;s DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator&#39;s DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part&#39;s object type.
Definition: actuatorComponent.h:47
Definition: indirectArtilleryPSR.h:23
DtTacticalGraphicLocalObjectFacade myTacticalGraphicLocalObjectFacade
Definition: indirectArtilleryComponent.h:130
Definition: indirectArtilleryDescriptor.h:15
std::vector< double > myBurstTimes
The exact times of the bursts. Equal to startTime + N * period + DtRand() * spreadTime.
Definition: indirectArtilleryComponent.h:114
File: simMsg.h.
Definition: simMessage.h:35
virtual bool init() override
Overridden to cache a pointer to the entity&#39;s radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtVector myMinor
The minor axis of the ellipse, acctually the orthoganal axis.
Definition: indirectArtilleryComponent.h:123
End User Description: This actuator is used on indirect artillery objects, typically ellipses...
Definition: indirectArtilleryComponent.h:30
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
bool myWarned
Definition: indirectArtilleryComponent.h:127
DtVrfOverlayObjectStateRepository * myOverlayStateRepository
Definition: indirectArtilleryComponent.h:125
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
Data container for Indirect Artillery. Should contain nothing but mutators, accessors and data...
Definition: ifModifyIndirectArtilleryObject.h:29
bool myDataModified
Flag to indicate if data has been modified.
Definition: indirectArtilleryComponent.h:103
DtVector myMajor
The major axis of the ellipse, actually just the first axis.
Definition: indirectArtilleryComponent.h:120
std::vector< DtVector > myVertices
Copy of vertices stored in the ellipse. We use these to test whether we need to recompute our basis v...
Definition: indirectArtilleryComponent.h:107
Definition: vrfOverlayObjectStateRepository.h:30
bool myDataInitialized
Flag to indicate if sumlation has started.
Definition: indirectArtilleryComponent.h:100
DtIndirectArtilleryPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: indirectArtilleryComponent.h:111
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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)