VR-Link API Documentation for DIS
 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 
static double theDfltTransThresh
Definition: artPartThresholder.h:121
static double dfltRotationThreshold()
Definition: artPartThresholder.h:149
bool myUsingDfltMode
Definition: artPartThresholder.h:112
This file exists to provide backwards compatibility only, and may be removed in a future release...
bool myUsingDfltRot
Definition: artPartThresholder.h:114
static double theDfltRotThresh
Definition: artPartThresholder.h:122
double myTraceRotThresh
Definition: artPartThresholder.h:110
static double theDfltTraceRotThresh
Definition: artPartThresholder.h:123
static void setDfltFractionalThreshold(DtFloat32 thresh)
Set/Get fractional threshold value.
Definition: artPartThresholder.h:126
This file provides a declaration of the class DtArticulatedPartCollection.
DtArtPartThresholdType
Definition: artPartThresholder.h:26
static void setDfltRotationThreshold(double r)
Set/Get rotational threshold value.
Definition: artPartThresholder.h:154
DtArtPartThresholder is used to store art-part-related thresholds, and to perform some art part thres...
Definition: artPartThresholder.h:21
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 DtArtPartThresholdType dfltThreshMode()
Definition: artPartThresholder.h:144
DtArtPartThresholdType myThreshMode
Definition: artPartThresholder.h:106
static double dfltTranslationThreshold()
Definition: artPartThresholder.h:160
A DtArticulatedPartCollection is a collection of articulated parts typically of an entity...
Definition: articulatedPartCollection.h:29
bool myUsingDfltFrac
Definition: artPartThresholder.h:115
static void setDfltThreshMode(DtArtPartThresholdType mode)
Set/Get the threshold mode.
Definition: artPartThresholder.h:137
double myTransThresh
Definition: artPartThresholder.h:108
#define DT_DLL_VLPROTIND
Definition: vlMachineTypes.h:110
float myFracThresh
Definition: artPartThresholder.h:107
#define M_PI
Definition: vlMath.h:58
static void setDfltTranslationThreshold(double t)
Set/Get translational threshold value.
Definition: artPartThresholder.h:165
static DtArtPartThresholdType theDfltThreshMode
Definition: artPartThresholder.h:119
static DtFloat32 dfltFractionalThreshold()
Definition: artPartThresholder.h:132
provides basic Operating Independent Methods useful to a federate
double myRotThresh
Definition: artPartThresholder.h:109
bool myUsingDfltTrans
Definition: artPartThresholder.h:113
static float theDfltFracThresh
Definition: artPartThresholder.h:120

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)