![]() |
VR-Link API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 00009 00010 #ifndef DtThresholder_H_ 00011 #define DtThresholder_H_ 00012 00013 #include <vlutil/vlMachineTypes.h> 00014 #include <matrix/vlMath.h> 00015 #include "artPartThresh.h" 00016 00020 class DT_DLL_VLPROTIND DtThresholder 00021 { 00022 public: 00023 00025 DtThresholder(); 00026 00028 virtual ~DtThresholder(); 00029 00031 DtThresholder(const DtThresholder& orig); 00032 00034 DtThresholder& operator=(const DtThresholder& orig); 00035 00038 virtual void setRotationThreshold(double thresh); 00039 virtual double rotationThreshold() const; 00040 00042 virtual double rotationTraceThreshold() const; 00043 00046 virtual void setTranslationThreshold(double thresh); 00047 virtual double translationThreshold() const; 00048 00054 virtual void setAggDimensionThreshold(double thresh); 00055 virtual double aggDimensionThreshold() const; 00056 00062 virtual void setAntennaLocationThreshold(double thresh); 00063 virtual double antennaLocationThreshold() const; 00064 00070 virtual void setAntennaOrientationThreshold(double thresh); 00071 virtual double antennaOrientationThreshold() const; 00072 00075 virtual DtArtPartThresholder* artPartThresholder(); 00076 virtual const DtArtPartThresholder& artPartThresholder() const; 00077 00078 public: 00079 00081 static void setDfltTranslationThreshold(double thresh); 00082 static double dfltTranslationThreshold(); 00083 00085 static void setDfltRotationThreshold(double thresh); 00086 static double dfltRotationThreshold(); 00087 00089 static double dfltRotationTraceThreshold(); 00090 00095 static void setDfltAggDimensionThreshold(double thresh); 00096 static double dfltAggDimensionThreshold(); 00097 00102 static void setDfltAntennaLocationThreshold(double thresh); 00103 static double dfltAntennaLocationThreshold(); 00104 00109 static void setDfltAntennaOrientationThreshold(double thresh); 00110 static double dfltAntennaOrientationThreshold(); 00111 00112 protected: 00113 00114 double myTransThresh; 00115 double myRotThresh; 00116 double myTraceRotThresh; 00117 double myAggDimThresh; 00118 double myAntennaLocThresh; 00119 double myAntennaOrientThresh; 00120 00121 bool myUsingDfltTrans; 00122 bool myUsingDfltRot; 00123 bool myUsingDfltAggDim; 00124 bool myUsingDfltAntennaLoc; 00125 bool myUsingDfltAntennaOrient; 00126 00127 DtArtPartThresholder myArtPartThresh; 00128 00129 protected: 00130 00131 static double theDfltTransThresh; 00132 static double theDfltRotThresh; 00133 static double theDfltTraceRotThresh; 00134 static double theDfltAggDimThresh; 00135 static double theDfltAntennaLocThresh; 00136 static double theDfltAntennaOrientThresh; 00137 }; 00138 00139 inline void DtThresholder::setDfltTranslationThreshold(double thresh) 00140 { 00141 theDfltTransThresh = thresh; 00142 } 00143 00144 inline double DtThresholder::dfltTranslationThreshold() 00145 { 00146 return theDfltTransThresh; 00147 } 00148 00149 inline double DtThresholder::dfltRotationThreshold() 00150 { 00151 return theDfltRotThresh; 00152 } 00153 00154 inline void DtThresholder::setDfltRotationThreshold(double thresh) 00155 { 00156 theDfltRotThresh = DtLimit(thresh, -M_PI, M_PI); 00157 theDfltTraceRotThresh = 2.0 * cos(dfltRotationThreshold()) + 1.0; 00158 } 00159 00160 inline double DtThresholder::dfltRotationTraceThreshold() 00161 { 00162 return theDfltTraceRotThresh; 00163 } 00164 00165 inline void DtThresholder::setDfltAggDimensionThreshold(double thresh) 00166 { 00167 theDfltAggDimThresh = thresh; 00168 } 00169 00170 inline double DtThresholder::dfltAggDimensionThreshold() 00171 { 00172 return theDfltAggDimThresh; 00173 } 00174 00175 inline DtArtPartThresholder* DtThresholder::artPartThresholder() 00176 { 00177 return &myArtPartThresh; 00178 } 00179 00180 inline const DtArtPartThresholder& DtThresholder::artPartThresholder() const 00181 { 00182 return myArtPartThresh; 00183 } 00184 00185 #endif 00186