![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: groundOrbitController.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00014 00015 #ifndef groundOrbitController_H_ 00016 #define groundOrbitController_H_ 00017 00018 #include "vrfmodel/gndAutoCntlr.h" 00019 #include "vrfobjcore/automotivePSR.h" 00020 #include "vrftasks/orbitTask.h" 00021 00022 00031 #include "vrfmodel/vrfmodelDefines.h" 00032 class DT_DLL_vrfmodel DtGroundOrbitController : public DtGroundAutoControllerComponent 00033 { 00034 public: 00035 00038 DtGroundOrbitController(const DtString& name, 00039 DtVrfObject* owner, 00040 DtSimManager* simManager, 00041 DtComponentDescriptor* desc = NULL, 00042 DtReaderWriterRegistry* parentRegistry = NULL); 00043 00045 virtual ~DtGroundOrbitController(); 00046 00049 virtual DtString type() const; 00050 00054 static void orbitTaskCallback(DtSimMessage* msg, void* usr); 00055 virtual void processOrbitTask(DtSimMessage* msg); 00056 00058 virtual void tick(); 00059 00063 static DtSimComponent * creator(const DtString& name, 00064 DtVrfObject* owner, 00065 DtSimManager* simManager, 00066 DtComponentDescriptor* desc = 0, 00067 DtReaderWriterRegistry* parentRegistry = 0); 00068 00070 virtual void registerTaskMsgCallbacks(); 00071 00072 protected: 00073 00076 DtVector center() const; 00077 void setCenter(const DtVector& newCenter); 00079 00082 double radius() const; 00083 void setRadius(double newRadius); 00085 00088 bool clockwise() const; 00089 void setClockwise(bool yesOrNo); 00091 00092 void setActuatorsState(double currentHeading, 00093 double desiredHeading, 00094 double desiredSpeed, 00095 double desiredBreak, 00096 DtAutoTransmissionGearEnum desiredGear); 00097 00098 private: 00100 DtGroundOrbitController(const DtGroundOrbitController& original); 00101 DtGroundOrbitController& operator=(const DtGroundOrbitController& original); 00102 00103 private: 00104 00106 mutable double myOrbitRadiusSquared; 00107 }; 00108 00109 #endif