![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1999 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: balGunJoy.h,v $ $Revision: 1.15 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00014 00015 #ifndef DtBallisticGunJoy_H_ 00016 #define DtBallisticGunJoy_H_ 00017 00018 #include "vrfmodel/balGun.h" 00019 #include <vl/fireInter.h> 00020 #include <vl/detonateInter.h> 00021 #include "vrfcore/timer.h" 00022 #include <vl/hostStructs.h> 00023 00024 class DtSimManager; 00025 class DtConstrainedAnalogInputPort; 00026 class DtBooleanInputPort; 00027 class DtBallisticGunDescriptor; 00028 class DtVrfObject; 00029 00034 #include "vrfmodel/vrfmodelDefines.h" 00035 class DT_DLL_vrfmodel DtBallisticGunJoy : public DtBallisticGun 00036 { 00037 public: 00038 00041 DtBallisticGunJoy(const DtString & name, DtVrfObject* owner, 00042 DtSimManager *simManager, DtComponentDescriptor* desc, 00043 DtReaderWriterRegistry * const parentRegistry = 0); 00044 00045 public: 00047 virtual ~DtBallisticGunJoy(); 00048 00051 virtual DtString type() const; 00052 00054 virtual bool createPorts(); 00055 00058 virtual void setComponentDescriptor(DtComponentDescriptor * descriptor); 00059 00062 virtual void tick(); 00063 00064 virtual DtReal setTarget(DtArticulatedPartStateRepository *rotBody); 00065 00066 virtual DtFireInteraction* manualFireInteraction( 00067 DtArticulatedPartStateRepository *rotBody); 00068 00069 virtual DtDetonationInteraction* manualDetonationInteraction( 00070 DtArticulatedPartStateRepository *rotBody, DtReal& detTime, DtReal dist); 00071 00072 virtual DtVrfObject *targetSelection( 00073 DtArticulatedPartStateRepository *rotBody, DtReal &dist); 00074 00075 virtual DtReal distanceToTarget(); 00076 00084 static void detonationCallback(DtTimer * timer); 00085 00089 static DtSimComponent * creator(const DtString& name, 00090 DtVrfObject* owner, 00091 DtSimManager* simManager, 00092 DtComponentDescriptor* desc = 0, 00093 DtReaderWriterRegistry* parentRegistry = 0); 00094 00095 private: 00098 DtBallisticGunJoy(); 00099 00101 DtBallisticGunJoy(const DtBallisticGunJoy & orig); 00102 00104 const DtBallisticGunJoy & operator=(const DtBallisticGunJoy & orig); 00105 00106 protected: 00107 00110 00116 DtConstrainedAnalogInputPort* myElevationPort; 00117 00123 DtBooleanInputPort* myActiveJoystickPort; 00124 00126 00127 }; 00128 00129 #endif