![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2000 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: rotWngMvAlg.h,v $ $Revision: 1.31 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00014 00015 #ifndef DtRotMoveAlongControllerComponent_H_ 00016 #define DtRotMoveAlongControllerComponent_H_ 00017 00018 #include "vrfmodel/rotWingTaskCtl.h" 00019 #include "vrfutil/lclVecIter.h" 00020 00021 class DtString; 00022 class DtSimManager; 00023 class DtRouteState; 00024 class DtSimMessage; 00025 00030 #include "vrfmodel/vrfmodelDefines.h" 00031 class DT_DLL_vrfmodel DtRotaryWingMoveAlongControllerComponent : public DtRotaryWingTaskController 00032 { 00033 00034 public: 00035 00038 DtRotaryWingMoveAlongControllerComponent(const DtString& name, 00039 DtVrfObject* owner, 00040 DtSimManager* simManager, 00041 DtComponentDescriptor* desc = 0, 00042 DtReaderWriterRegistry* parentRegistry = 0); 00043 00045 virtual ~DtRotaryWingMoveAlongControllerComponent(); 00046 00047 00049 virtual bool init(); 00050 00052 virtual void tick(); 00053 00056 virtual DtString type() const; 00057 00061 static void moveAlongCallback(DtSimMessage * msg, void * usr); 00062 00064 virtual void processMoveAlongTask(DtSimMessage * msg); 00065 00067 virtual void registerTaskMsgCallbacks(); 00068 00070 static void routeChangedCallback(DtVrfObject * obj, void * usr); 00071 virtual void processRouteChanged(DtVrfObject * obj); 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 bool setupRoute(); 00084 00087 virtual bool isMovingToward(const DtVector& ENUpoint); 00088 00090 virtual void routeLogic(); 00091 00094 virtual void desiredVelocityAndPosition(); 00095 00096 protected: 00097 00099 DtRotaryWingMoveAlongControllerComponent(); 00101 DtRotaryWingMoveAlongControllerComponent( 00102 const DtRotaryWingMoveAlongControllerComponent& orig); 00103 00105 DtRotaryWingMoveAlongControllerComponent& operator=( 00106 const DtRotaryWingMoveAlongControllerComponent& orig); 00107 00123 virtual void pilotProperties(); 00124 00128 virtual void buildLocalRoute(); 00129 00132 virtual void emptyVertexList(); 00133 00134 protected: 00135 00136 double myDistanceSquared; 00137 00140 DtVrfObject* myRoute; 00141 00142 bool myRouteHasChanged; 00143 bool myVerticesChangedCallbackRegistered; 00144 00145 }; 00146 00147 #endif