VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateModelResolutionController.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 
12 #include "vrfobjcore/simRadio.h"
14 
15 class DtTrueAggregateObjectManager;
19 class DtSubordinateEntry;
25 class DtAggregator;
26 class DtDisaggregator;
27 class DtFormation;
28 class DtSettingsObject;
29 class DtBoolSetting;
30 
38 {
39 public:
40 
43  DtSimManager * simManager, DtComponentDescriptor* desc = NULL,
44  DtReaderWriterRegistry * parentRegistry = 0);
45 
48 
50  virtual bool init();
51 
57  virtual bool postAddComponentsInit();
58 
61  virtual const char* type() const;
62 
65  virtual void preFirstTickInit();
66 
68  virtual void tick();
69 
75  virtual bool createPSR();
76 
78  virtual void enable();
79 
81  virtual void disable();
82 
86  virtual bool tickWhileDestroyed() const;
87 
88 public:
89 
90  static void setDestroyedCallback(DtSimMessage * msg,
91  void * usrData);
92 
93  static void setRestoreCallback(DtSimMessage* msg, void* usrData);
94 
95  static void setAggregateStateCallback(DtSimMessage * msg, void * usrData);
96 
97  virtual void processSetRestore(DtSimMessage* msg);
98 
100  static void disaggregationCompleteCallback(void* usr);
101 
103  static DtSimComponent* creator(const DtString & name, DtVrfObject* owner,
104  DtSimManager * simManager, DtComponentDescriptor* desc,
105  DtReaderWriterRegistry * parentRegistry);
106 
107 protected:
108 
111 
114 
115 
117  virtual void setRadio(DtSimRadio * radio);
118 
121  virtual void addSetDataCallbacks();
122 
125  void removeSetDataCallbacks();
126 
127  virtual void processSetAggregateState(DtSimMessage * msg);
128 
132  virtual void startDisaggregation();
133 
135  virtual void startAggregation();
136 
138  virtual void onDisaggregationComplete();
139 
142  virtual bool toggleComponentsAndSystems(enum DtAggregateState newAggregateState);
143 
146  void enableSystemsAndComponents(DtAggregateState aggregateState);
147  void disableSystemsAndComponents(DtAggregateState aggregateState);
149 
151  virtual void initAggregated();
152 
154  void updateBoundingGeometry();
155 
157  virtual void computeSubordinateObjectsMinMaxVectors(
158  DtSubordinateObjectsList& subordinateObjectsList,DtVector positionOffset,
159  DtVector& minVector,DtVector& maxVector);
160 
163  virtual bool aggregationIsComplete() const;
164 
168  virtual void onAggregationComplete();
169 
170  virtual void createAggregator();
171 
172  virtual void createDisaggregator();
173 
180  virtual bool allowedToTransition(DtAggregateState targetAggregateState) const;
181 
182  virtual void processSetDestroyed();
183 
184 protected:
185 
187 
191 
194 
195  std::vector<DtComponentSystem*> myAggregatedSystemList;
196  std::vector<DtSimComponent*> myAggregatedComponentList;
197  std::vector<DtComponentSystem*> myDisaggregatedSystemList;
198  std::vector<DtSimComponent*> myDisaggregatedComponentList;
199 
202 };
203 
Definition: subordinateEntry.h:25
DtAggregatedResolutionPSR * myProcessState
Container for state data associated with this component.
Definition: aggregateModelResolutionController.h:190
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:144
std::vector< DtSimComponent * > myAggregatedComponentList
Definition: aggregateModelResolutionController.h:196
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
Definition: boolSetting.h:30
class DtSimRadio:
Definition: simRadio.h:25
virtual void setRadio(DtSimRadio *radio)
DtVrfObjectManager * myObjectManager
Definition: aggregateModelResolutionController.h:186
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
Instances of DtFormation are a list of DtFormationEntry objects which make up an aggregate formation...
Definition: formation.h:26
virtual bool init()
Calls setRadio()
virtual void disable()
DtVrfAggregateStateRepository * myAggregateStateRepository
Definition: aggregateModelResolutionController.h:192
class DtTrueAggregateResolutionPSR:
Definition: aggregatedResolutionPSR.h:24
DtAggregator * myAggregator
Definition: aggregateModelResolutionController.h:200
Definition: subordinateAggregateEntry.h:21
Definition: settingsObject.h:27
RW List which holds DtSubordinatesEntry subclasses.
Definition: subordinateObjectsList.h:21
Class DtAggregator is a helper class that knows how to transform an aggregate in the disaggregated st...
Definition: aggregator.h:32
virtual void enable()
Is this component enabled or not.
std::vector< DtComponentSystem * > myDisaggregatedSystemList
Definition: aggregateModelResolutionController.h:197
File: simMsg.h.
Definition: simMessage.h:35
class DtIfSubordinateList:
Definition: ifSubordinateList.h:34
virtual void tick()
This gives the thread of control to the component.
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
End User Description: This controller manages the switching of an aggregate between Aggregated (true ...
Definition: aggregateModelResolutionController.h:37
Definition: subordinateIndividualEntry.h:22
DtAggregateModelResolutionDescriptor; descriptor for the DtAggregateModelResolutionController compone...
Definition: aggregateModelResolutionDescriptor.h:20
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
class DtIfSubordinateListRequest: request information subordinateList of an aggregated entity ...
Definition: ifSubordinateListRequest.h:31
class DtVrfObjectManager:
Definition: vrfObjectManager.h:201
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtDisaggregator * myDisaggregator
Definition: aggregateModelResolutionController.h:201
Class DtDisaggregator is a helper class that knows how to transform an aggregate in the aggregate sta...
Definition: disaggregator.h:33
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
DtAggregateModelResolutionDescriptor * myAggregateModelResolutionDescriptor
Definition: aggregateModelResolutionController.h:193
Definition: vrfAggregateStateRepository.h:22
std::vector< DtComponentSystem * > myAggregatedSystemList
Definition: aggregateModelResolutionController.h:195
std::vector< DtSimComponent * > myDisaggregatedComponentList
Definition: aggregateModelResolutionController.h:198

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)