VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
thresholder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
9 
10 #ifndef DtThresholder_H_
11 #define DtThresholder_H_
12 
13 #include <vlutil/vlMachineTypes.h>
14 #include <matrix/vlMath.h>
15 #include "artPartThresholder.h"
16 
21 {
22 public:
23 
25  DtThresholder();
26 
28  virtual ~DtThresholder();
29 
31  DtThresholder(const DtThresholder& orig);
32 
34  DtThresholder& operator=(const DtThresholder& orig);
35 
38  virtual void setRotationThreshold(double thresh);
39  virtual double rotationThreshold() const;
40 
42  virtual double rotationTraceThreshold() const;
43 
46  virtual void setTranslationThreshold(double thresh);
47  virtual double translationThreshold() const;
48  virtual double translationThresholdSquared() const;
49 
55  virtual void setAggDimensionThreshold(double thresh);
56  virtual double aggDimensionThreshold() const;
57 
63  virtual void setAntennaLocationThreshold(double thresh);
64  virtual double antennaLocationThreshold() const;
65 
71  virtual void setAntennaOrientationThreshold(double thresh);
72  virtual double antennaOrientationThreshold() const;
73 
76  virtual DtArtPartThresholder* artPartThresholder();
77  virtual const DtArtPartThresholder& artPartThresholder() const;
78 
79 public:
80 
82  static void setDfltTranslationThreshold(double thresh);
83  static double dfltTranslationThreshold();
84 
86  static void setDfltRotationThreshold(double thresh);
87  static double dfltRotationThreshold();
88 
90  static double dfltRotationTraceThreshold();
91 
96  static void setDfltAggDimensionThreshold(double thresh);
97  static double dfltAggDimensionThreshold();
98 
103  static void setDfltAntennaLocationThreshold(double thresh);
104  static double dfltAntennaLocationThreshold();
105 
110  static void setDfltAntennaOrientationThreshold(double thresh);
111  static double dfltAntennaOrientationThreshold();
112 
113 protected:
114 
116  double myTransThreshSquared; //For optimization only
117  double myRotThresh;
122 
128 
130 
131 protected:
132 
133  static double theDfltTransThresh;
134  static double theDfltRotThresh;
135  static double theDfltTraceRotThresh;
136  static double theDfltAggDimThresh;
137  static double theDfltAntennaLocThresh;
139 };
140 
142 {
143  theDfltTransThresh = thresh;
144 }
145 
147 {
148  return theDfltTransThresh;
149 }
150 
152 {
153  return theDfltRotThresh;
154 }
155 
156 inline void DtThresholder::setDfltRotationThreshold(double thresh)
157 {
158  theDfltRotThresh = DtLimit(thresh, -M_PI, M_PI);
159  theDfltTraceRotThresh = 2.0 * cos(dfltRotationThreshold()) + 1.0;
160 }
161 
163 {
164  return theDfltTraceRotThresh;
165 }
166 
168 {
169  theDfltAggDimThresh = thresh;
170 }
171 
173 {
174  return theDfltAggDimThresh;
175 }
176 
178 {
179  return &myArtPartThresh;
180 }
181 
183 {
184  return myArtPartThresh;
185 }
186 
187 #endif
188 
bool myUsingDfltAntennaOrient
Definition: thresholder.h:127
double myTransThreshSquared
Definition: thresholder.h:116
static double theDfltTraceRotThresh
Definition: thresholder.h:135
bool myUsingDfltAntennaLoc
Definition: thresholder.h:126
static double dfltRotationThreshold()
Definition: thresholder.h:151
Instances of DtThresholder store thresholding information used to determine what attributes of an ent...
Definition: thresholder.h:20
double myAggDimThresh
Definition: thresholder.h:119
This file provides a declaration of the class DtArtPartThresholder.
DtArtPartThresholder myArtPartThresh
Definition: thresholder.h:129
static double theDfltAggDimThresh
Definition: thresholder.h:136
static void setDfltRotationThreshold(double thresh)
Set/Get default rotation threshold in radians.
Definition: thresholder.h:156
static double dfltRotationTraceThreshold()
Returns the &quot;RotationTrace&quot; threshold.
Definition: thresholder.h:162
DtArtPartThresholder is used to store art-part-related thresholds, and to perform some art part thres...
Definition: artPartThresholder.h:21
double myRotThresh
Definition: thresholder.h:117
bool myUsingDfltAggDim
Definition: thresholder.h:125
virtual DtArtPartThresholder * artPartThresholder()
Returns a pointer to an object that maintains thresholds for articulated parts.
Definition: thresholder.h:177
T DtLimit(T x, T lo, T hi)
if x is outside the limits (hi and lo) then x is set to the nearest limit
Definition: vlMath.h:130
static double theDfltAntennaLocThresh
Definition: thresholder.h:137
This file defines math constants and methods which may be useful in simulations.
double myTraceRotThresh
Definition: thresholder.h:118
static double theDfltAntennaOrientThresh
Definition: thresholder.h:138
static double dfltTranslationThreshold()
Definition: thresholder.h:146
static double dfltAggDimensionThreshold()
Definition: thresholder.h:172
#define DT_DLL_VLPROTIND
Definition: vlMachineTypes.h:110
static double theDfltTransThresh
Definition: thresholder.h:133
#define M_PI
Definition: vlMath.h:58
static void setDfltTranslationThreshold(double thresh)
Set/Get default translation threshold in radians.
Definition: thresholder.h:141
bool myUsingDfltRot
Definition: thresholder.h:124
double myAntennaOrientThresh
Definition: thresholder.h:121
double myAntennaLocThresh
Definition: thresholder.h:120
static void setDfltAggDimensionThreshold(double thresh)
Set/Get aggregate dimension threshold.
Definition: thresholder.h:167
static double theDfltRotThresh
Definition: thresholder.h:134
double myTransThresh
Definition: thresholder.h:115
This file contains typedefs for machine dependant types.
bool myUsingDfltTrans
Definition: thresholder.h:123

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)