![]() |
VR-Link API Documentation for DIS
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 00006 00007 #if DtDIS 00008 00012 00013 #ifndef dDesignatrEnc_H_ 00014 #define dDesignatrEnc_H_ 00015 00016 #include "dStateEncoder.h" 00017 #include "designatePdu.h" 00018 #include "designatorSR.h" 00019 00022 class DT_DLL_VL DtDesignatorEncoder : public DtStateEncoder 00023 { 00024 public: 00026 DtDesignatorEncoder( double _relPosThreshold = 1.0, 00027 double _absPosThreshold = 1.0, double _accelThreshold = 0.2 ); 00028 00030 virtual ~DtDesignatorEncoder(); 00031 00033 DtDesignatorEncoder(const DtDesignatorEncoder& orig); 00034 00036 DtDesignatorEncoder& operator=(const DtDesignatorEncoder& orig); 00037 00042 virtual DtDesignatorPdu* stateMsg( 00043 const DtDesignatorRepository& stateRep, 00044 const DtDesignatorRepository& asSeenByRemote ); 00045 00047 00048 virtual inline void setRelPosThreshold( double val ); 00049 virtual inline double relPosThreshold() const; 00051 00053 00054 virtual inline void setAbsPosThreshold( double val ); 00055 virtual inline double absPosThreshold() const; 00057 00059 00060 virtual inline void setAccelThreshold( double val ); 00061 virtual inline double accelThreshold() const; 00063 00064 protected: 00066 virtual bool sendNeeded( 00067 const DtDesignatorRepository& stateRep, 00068 const DtDesignatorRepository& asSeenByRemote ); 00069 00070 protected: 00071 double myRelPosThreshold; 00072 double myAbsPosThreshold; 00073 double myAccelThreshold; 00074 DtDesignatorPdu myPdu; 00075 }; 00076 00077 inline void DtDesignatorEncoder::setRelPosThreshold( double val ) 00078 { 00079 myRelPosThreshold = val; 00080 } 00081 00082 inline double DtDesignatorEncoder::relPosThreshold() const 00083 { 00084 return myRelPosThreshold; 00085 } 00086 00087 inline void DtDesignatorEncoder::setAbsPosThreshold( double val ) 00088 { 00089 myAbsPosThreshold = val; 00090 } 00091 00092 inline double DtDesignatorEncoder::absPosThreshold() const 00093 { 00094 return myAbsPosThreshold; 00095 } 00096 00097 inline double DtDesignatorEncoder::accelThreshold() const 00098 { 00099 return myAccelThreshold; 00100 } 00101 00102 inline void DtDesignatorEncoder::setAccelThreshold( double val ) 00103 { 00104 myAccelThreshold = val; 00105 } 00106 #endif //! DtDisDesignatorEncoder_H_ 00107 #endif //! DtDIS 00108