VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
affectEngineeringObjectController.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 
12 #include "vlutil/vlString.h"
15 
18 
22 {
23 public:
26  DtSimulationServices * simManager, DtComponentDescriptor* desc = NULL,
27  DtReaderWriterRegistry * parentRegistry = 0);
28 
31 
33  virtual bool init();
34 
35 private:
38 
41 
42 public:
43 
45  virtual bool createPSR();
46 
47  virtual const char* type() const = 0;
48 
49  virtual void tick();
50 
53  virtual void registerTaskMsgCallbacks();
54 
55  static void taskCompleteReportCallback(DtSimMessage* msg, void* usr);
56 
57  virtual void processTaskCompleteReport(DtSimMessage* msg);
58 
62  virtual bool tickWhileDestroyed() const;
63 
64 protected:
65 
67  virtual void processIdleState() = 0;
68 
71  virtual void processSettingUpState() = 0;
72 
75  virtual void processAffectingState() = 0;
76 
80  virtual void processAffectingPausedState() = 0;
81 
84  virtual void processMovingIntoRangeState() = 0;
85 
87  virtual void moveInRange(const DtSimObject* obj, double range,
88  double objectRadius);
89 
92  virtual void moveInRange(const DtLocalVertexList& vertices,
93  double range, double objectRadius);
94 
97  virtual void moveInRange(const DtVector& location, double range,
98  double objectRadius);
99 
101  virtual bool isInRange(const DtSimObject* obj, double range,
102  double objectRadius) const;
103 
105  virtual bool isInRange(const DtLocalVertexList& vertices, double range,
106  double objectRadius) const;
107 
109  virtual bool isInRange(const DtVector& location, double range,
110  double objectRadius) const;
111 
113  virtual bool isArealEngineeringObject(const DtObjectType& objectType) const;
114 
116  virtual bool isLinearEngineeringObject(const DtObjectType& objectType) const;
117 
119  virtual bool isPointEngineeringObject(const DtObjectType& objectType) const;
120 
121 protected:
122 
126 
127 };
128 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAffectEngineeringObjectPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: affectEngineeringObjectController.h:125
This is a process state repository for the DtAffectEngineeringObjectController.
Definition: affectEngineeringObjectPSR.h:30
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
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
Definition: objectType.h:27
virtual bool init() override
Calls setRadio()
This is the base class for controllers which affect the creation and destruction of engineering objec...
Definition: affectEngineeringObjectController.h:21
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
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:88
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtRwAffectableEngineeringObject holds a the information needed to know how a unit may create a type o...
Definition: rwAffectableEngineeringObject.h:22
class DtLocalVertexList:
Definition: localVertexList.h:20
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)