VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
createEngineeringObjectController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
14 #include "vlutil/vlString.h"
16 #include "vrfutil/rwVectorList.h"
17 #include "features/featureSet.h"
18 
22 
25 {
26 public:
29  DtSimulationServices * simManager, DtComponentDescriptor* desc = NULL,
30  DtReaderWriterRegistry * parentRegistry = 0);
31 
34 
36  virtual bool init();
37 
38 private:
41 
44 
45 public:
46 
47  virtual const char* type() const;
48 
50  static DtSimComponent* creator(const DtString & name, DtLocalObject* owner,
51  DtSimulationServices * simManager, DtComponentDescriptor* desc,
52  DtReaderWriterRegistry * parentRegistry);
53 
62  static void createCallback(DtSimMessage* msg, void* usr);
63 
67  virtual void processCreateTask(DtSimMessage* msg);
68 
77  static void improveCallback(DtSimMessage* msg, void* usr);
78 
82  virtual void processImproveTask(DtSimMessage* msg);
83 
86  virtual void registerTaskMsgCallbacks();
87 
89  virtual void clearTask();
90 
91 protected:
92 
94  virtual void breakUpLargeObjects(const DtRwVectorList& orig,
95  const DtVrfObjectParameters* parameterEntry,
96  DtRwShapeObjectList& result);
97 
101  virtual void queryForOverlappingProhibitedTerrain(const DtLocalVertexList* objectVertices);
102 
104  virtual void processIdleState();
105 
108  virtual void processSettingUpState();
109 
112  virtual void processAffectingState();
113 
116  virtual void processAffectingPausedState();
117 
120  virtual void processMovingIntoRangeState();
121 
124  virtual DtCreateObjectHandle createArealObject(const DtObjectType& objectType,
125  const DtRwVectorList& vertices, DtForceType forceType);
126 
128  virtual DtCreateObjectHandle createLinearObject(const DtObjectType& objectType,
129  const DtRwVectorList& vertices, DtForceType forceType);
130 
132  virtual DtCreateObjectHandle createPointObject(const DtObjectType& objectType,
133  const DtRwVector& location, DtForceType forceType);
134 
143  virtual bool updateImprovementRate(const DtSimObject* obj, bool stop, bool forceSend,
144  DtString* failureReason = 0);
145 
146 protected:
148 
150  std::map<DtSimTaskMessageType, DtRwAffectableEngineeringObject*> myEngInfoByTaskType;
151 
153  std::map<DtObjectType, DtRwAffectableEngineeringObject*> myEngInfoByObjType;
154 
157  std::auto_ptr<MAKVRinTerra::DtFeatureSet> myOverlappingProhibitedTerrain;
158 };
159 
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:63
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Handle returned from Create Object Service calls.
Definition: createObjectHandle.h:12
virtual bool init()
Initializes the controller.
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
const DtCreateEngineeringObjectControllerDescriptor * myCreateEngineeringObjDesc
Definition: createEngineeringObjectController.h:147
This controller is responsible for creating new engineering objects.
Definition: createEngineeringObjectController.h:24
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
std::map< DtObjectType, DtRwAffectableEngineeringObject * > myEngInfoByObjType
Map of object types to engineering info.
Definition: createEngineeringObjectController.h:153
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
Definition: objectType.h:27
std::map< DtSimTaskMessageType, DtRwAffectableEngineeringObject * > myEngInfoByTaskType
Map of task types to engineering info.
Definition: createEngineeringObjectController.h:150
Definition: rwVector.h:23
virtual void processIdleState()=0
Determines the next step to take during tick when in the idle state.
This is the base class for controllers which affect the creation and destruction of engineering objec...
Definition: affectEngineeringObjectController.h:21
std::auto_ptr< MAKVRinTerra::DtFeatureSet > myOverlappingProhibitedTerrain
Feature set of prohibited terrain that overlaps the desired engineering object construction location...
Definition: createEngineeringObjectController.h:157
File: simMsg.h.
Definition: simMessage.h:35
virtual void processAffectingPausedState()=0
Determines the next step to take during tick when in the affecting paused state (something has caused...
virtual void processMovingIntoRangeState()=0
Determines the next step to take during tick when in the moving into range state. ...
virtual void processAffectingState()=0
Determines the next step to take during tick when in the affecting state (while actively affecting an...
virtual void processSettingUpState()=0
Determines the next step to take during tick when in the setting up state (preparing to affect an obj...
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
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
virtual void registerTaskMsgCallbacks()
Registers interest in create engineering object tasks by calling addTaskProcessorCallback.
DtCreateEngineeringObjectControllerDescriptor is a DtComponentDescriptor that has additional informat...
Definition: createEngineeringObjectControllerDescriptor.h:18
DtRwAffectableEngineeringObject holds a the information needed to know how a unit may create a type o...
Definition: rwAffectableEngineeringObject.h:22
DtAffectEngineeringObjectController & operator=(const DtAffectEngineeringObjectController &orig)
Not implemented.
class DtLocalVertexList:
Definition: localVertexList.h:20
class DtRwVectorList:
Definition: rwVectorList.h:22
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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)