VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtUnitConverterCollection.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (c) 2011 MaK Technologies, Inc.
3  * All rights reserved.
4  ********************************************************************/
5 /********************************************************************
6  * $RCSfile: DtUnitConverterCollection.h,v $ $Revision: 1.8 $ $State: Exp $
7  ********************************************************************/
8 
12 
13 #pragma once
14 #include <vrvUtil/vrvUtil.h>
16 #include <boost/unordered_map.hpp>
17 #include <matrix/vlVector.h>
18 
19 class DtTaitBryan;
20 
21 namespace makVrv
22 {
23 
29  {
30  public:
31 
37  {
45  End_DisplayUnitTypes
46  };
47 
50 
53 
56 
59 
61  double convertDistance(
63  double distance ) const;
64 
66  double convertSpeed(
68  double speed ) const;
69 
71  DtVector convertVelocity(
73  const DtVector& velocity ) const;
74 
76  double convertAcceleration(
78  double accel ) const;
79 
81  DtVector convertAcceleration(
83  const DtVector& accel ) const;
84 
86  DtTaitBryan convertOrientation(
88  const DtTaitBryan& orientation ) const;
89 
91  double convertAngle(
93  double angle ) const;
94 
96  DtVector convertRotationalVelocity(
98  const DtVector& rotVel ) const;
99 
101 
104 
106  double revertDistance(
108  double distance ) const;
109 
111  double revertSpeed(
113  double speed ) const;
114 
116  DtVector revertVelocity(
118  const DtVector& velocity ) const;
119 
121  DtVector revertAcceleration(
123  DtVector accel ) const;
124 
126  double revertAcceleration(
128  double accel ) const;
129 
131  DtTaitBryan revertOrientation(
133  const DtTaitBryan& ori ) const;
134 
136  double revertAngle(
138  double angle ) const;
139 
141  DtVector revertRotationalVelocity(
143  const DtVector& rotVel ) const;
144 
146 
150  void addUnitConverter(DisplayUnitType type,
151  unsigned int unit, const DtUnitConverter* converter );
152 
153 
156 
158  const DtTimeUnitConverter* timeConverterFor(
160 
162  const DtDistanceUnitConverter* distanceConverterFor(
164 
166  const DtOrientationUnitConverter* orientationConverterFor(
168 
170 
171  protected:
172 
174  void addDefaultConverters();
175 
178 
180  double distanceConversionFactor(
182 
184  double velocityConversionFactor(
186 
188  double accelerationConversionFactor(
190 
192  double angleConversionFactor(
194 
196  double rotationalVelocityConversionFactor(
198 
200 
201  protected:
202 
203  typedef boost::unordered_map<unsigned int,const DtUnitConverter*>
205  typedef boost::unordered_map<unsigned int,UnitConverterMap>
207 
209 
210  private:
211 
214 
215  };
216 
217 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)