VR-Forces 4.8 Class Documentation
 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 
13 #include "vlutil/vlString.h"
15 #include "vrfutil/rwVectorList.h"
16 #include "features/featureSet.h"
17 
20 
23 {
24 public:
27  DtSimManager * simManager, DtComponentDescriptor* desc = NULL,
28  DtReaderWriterRegistry * parentRegistry = 0);
29 
32 
34  virtual bool init();
35 
36 private:
39 
42 
43 public:
44 
45  virtual const char* type() const;
46 
48  static DtSimComponent* creator(const DtString & name, DtVrfObject* owner,
49  DtSimManager * simManager, DtComponentDescriptor* desc,
50  DtReaderWriterRegistry * parentRegistry);
51 
60  static void createCallback(DtSimMessage* msg, void* usr);
61 
65  virtual void processCreateTask(DtSimMessage* msg);
66 
75  static void improveCallback(DtSimMessage* msg, void* usr);
76 
80  virtual void processImproveTask(DtSimMessage* msg);
81 
84  virtual void registerTaskMsgCallbacks();
85 
87  virtual void clearTask();
88 
89 protected:
90 
92  virtual void breakUpLargeObjects(const DtRwVectorList& orig,
93  const DtVrfObjectParameters* parameterEntry,
94  DtRwShapeObjectList& result);
95 
99  virtual void queryForOverlappingProhibitedTerrain(const DtLocalVertexList* objectVertices);
100 
102  virtual void processIdleState();
103 
106  virtual void processSettingUpState();
107 
110  virtual void processAffectingState();
111 
114  virtual void processAffectingPausedState();
115 
118  virtual void processMovingIntoRangeState();
119 
122  virtual const DtVrfObject* createArealObject(const DtObjectType& objectType,
123  const DtRwVectorList& vertices, DtForceType forceType);
124 
126  virtual const DtVrfObject* createLinearObject(const DtObjectType& objectType,
127  const DtRwVectorList& vertices, DtForceType forceType);
128 
130  virtual const DtVrfObject* createPointObject(const DtObjectType& objectType,
131  const DtRwVector& location, DtForceType forceType);
132 
141  virtual bool updateImprovementRate(const DtVrfObject* obj, bool stop, bool forceSend,
142  DtString* failureReason = 0);
143 
144 protected:
146 
148  std::map<DtSimTaskMessageType, DtRwAffectableEngineeringObject*> myEngInfoByTaskType;
149 
151  std::map<DtObjectType, DtRwAffectableEngineeringObject*> myEngInfoByObjType;
152 
155  std::auto_ptr<MAKVRinTerra::DtFeatureSet> myOverlappingProhibitedTerrain;
156 };
157 
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:59
#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
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:42
*virtual const DtObjectType & objectType() const
Definition: readerWriterRegistry.h:39
const DtCreateEngineeringObjectControllerDescriptor * myCreateEngineeringObjDesc
Definition: createEngineeringObjectController.h:145
This controller is responsible for creating new engineering objects.
Definition: createEngineeringObjectController.h:22
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:151
virtual const char * type() const =0
Returns a string identifies the class type of component.
Definition: objectType.h:27
std::map< DtSimTaskMessageType, DtRwAffectableEngineeringObject * > myEngInfoByTaskType
Map of task types to engineering info.
Definition: createEngineeringObjectController.h:148
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:155
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...
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
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
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
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

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)