![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: gndInterceptAndDestroyController.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 ** Created: 8/7/07 MEM 00008 *******************************************************************************/ 00009 00012 00014 00015 #ifndef gndInterceptAndDestroyController_H_ 00016 #define gndInterceptAndDestroyController_H_ 00017 00018 00019 #include "vrfmodel/gndMvToDestinationCntlr.h" 00020 00021 #include <vlutil/vlString.h> 00022 #include <matrix/vlVector.h> 00023 00024 class DtSimManager; 00025 class DtSimMessage; 00026 class DtStringOutputPort; 00027 class DtGroundInterceptAndDestroyControllerDescriptor; 00028 00029 00038 #include "vrfmodel/vrfmodelDefines.h" 00039 class DT_DLL_vrfmodel DtGroundInterceptAndDestroyController : public DtGroundMoveToDestinationControllerComponent 00040 { 00041 00042 public: 00043 00046 DtGroundInterceptAndDestroyController(const DtString& name, 00047 DtVrfObject* owner, 00048 DtSimManager* simManager, 00049 DtComponentDescriptor* desc = 0, 00050 DtReaderWriterRegistry* parentRegistry = 0); 00051 00053 virtual ~DtGroundInterceptAndDestroyController(); 00054 00057 virtual DtString type() const; 00058 00062 static void interceptAndDestroyCallback(DtSimMessage* msg, void* usrData); 00063 00064 virtual void processInterceptAndDestroyTask(DtSimMessage* msg); 00065 00070 virtual const DtString& entityToInterceptAndDestroy(); 00071 virtual void setEntityToInterceptAndDestroy(const DtString& entity); 00072 00076 static DtSimComponent * creator(const DtString& name, 00077 DtVrfObject* owner, 00078 DtSimManager* simManager, 00079 DtComponentDescriptor* desc = 0, 00080 DtReaderWriterRegistry* parentRegistry = 0); 00081 00083 virtual void registerTaskMsgCallbacks(); 00084 00088 virtual bool setupDestination(); 00089 00090 virtual void moveToDestination(); 00091 00094 virtual bool nearDestination(); 00095 00098 virtual bool atDestination(); 00099 00102 virtual bool passedDestination(); 00103 00106 virtual double findDesiredSpeed(); 00107 00111 virtual double findDesiredHeading(); 00112 00123 virtual void setupDestinationVector() const; 00124 00129 virtual DtAutoTransmissionGear determineGearSetting(); 00130 00134 virtual void stop(); 00135 00136 protected: 00139 DtGroundInterceptAndDestroyController(); 00140 00142 DtGroundInterceptAndDestroyController(const DtGroundInterceptAndDestroyController & 00143 orig); 00144 00146 const DtGroundInterceptAndDestroyController & operator=(const 00147 DtGroundInterceptAndDestroyController & orig); 00148 00149 bool createPorts(); 00150 00151 protected: 00152 00154 DtVrfObject* myTargetp; 00155 DtStringOutputPort * myInterceptAndDestroyOutputPort; 00156 double myCurrentSeperation; 00159 double myTargetBR; 00160 00161 bool myFirstTick; 00162 }; 00163 00164 #endif 00165 00166 00167