VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
artPartThresholder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
10 #ifndef artPartThresh_h_
11 #define artPartThresh_h_
12 
14 
15 #include <matrix/LibMatrix.h>
16 #include <vlutil/vlUtil.h>
17 
22 {
23 
24 public:
25 
27  {
28  DtArtPartDfltThreshMode = -1,
29  DtArtPartIndividualThresh = 0,
30  DtArtPartAggregateThresh = 1
31  };
32 
33 public:
34 
37 
39  virtual ~DtArtPartThresholder();
40 
43 
45  DtArtPartThresholder& operator=(const DtArtPartThresholder& orig);
46 
49  virtual void setRotationThreshold(double thresh);
50  virtual double rotationThreshold() const;
51 
53  virtual double rotationTraceThreshold() const;
54 
57  virtual void setTranslationThreshold(double thresh);
58  virtual double translationThreshold() const;
59 
62  virtual void setFractionalThreshold(double thresh);
63  virtual double fractionalThreshold() const;
64 
67  virtual void setThreshMode(DtArtPartThresholdType mode);
68  virtual DtArtPartThresholdType threshMode() const;
69 
72  virtual bool artPartsExceedAggThreshold(
73  const DtArticulatedPartCollection& localList,
74  const DtArticulatedPartCollection& remoteList) const;
75 
78  virtual bool artPartsExceedIndivThreshold(
79  const DtArticulatedPartCollection& localList,
80  const DtArticulatedPartCollection& remoteList) const;
81 
84  virtual float artPartThreshold(int paramType) const;
85 
86 public:
87 
89  static void setDfltThreshMode(DtArtPartThresholdType mode);
90  static DtArtPartThresholdType dfltThreshMode();
91 
93  static void setDfltFractionalThreshold(DtFloat32 thresh);
94  static DtFloat32 dfltFractionalThreshold();
95 
97  static void setDfltRotationThreshold(double r);
98  static double dfltRotationThreshold();
99 
101  static void setDfltTranslationThreshold(double t);
102  static double dfltTranslationThreshold();
103 
104 protected:
105 
109  double myRotThresh;
111 
116 
117 protected:
118 
120  static float theDfltFracThresh;
121  static double theDfltTransThresh;
122  static double theDfltRotThresh;
123  static double theDfltTraceRotThresh;
124 };
125 
127  DtFloat32 thresh)
128 {
129  theDfltFracThresh = thresh;
130 }
131 
133 {
134  return theDfltFracThresh;
135 }
136 
139 {
140  theDfltThreshMode = mode;
141 }
142 
145 {
146  return theDfltThreshMode;
147 }
148 
150 {
151  return theDfltRotThresh;
152 }
153 
155 {
156  theDfltRotThresh = DtLimit(thresh, -M_PI, M_PI);
157  theDfltTraceRotThresh = 2.0 * cos(dfltRotationThreshold()) + 1.0;
158 }
159 
161 {
162  return theDfltTransThresh;
163 }
164 
166 {
167  theDfltTransThresh = t;
168 }
169 
170 #endif
171 

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)