VR-Forces 4.3 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 <vrvUtil/DtUnicode.h>
17 #include <boost/unordered_map.hpp>
18 
19 class DtVector;
20 class DtTaitBryan;
21 
22 namespace makVrv
23 {
24 
30  {
31  public:
32 
38  {
46  End_DisplayUnitTypes
47  };
48 
51 
54 
57 
60 
62  double convertDistance(
64  double distance ) const;
65 
67  double convertSpeed(
69  double speed ) const;
70 
72  DtVector convertVelocity(
74  const DtVector& velocity ) const;
75 
77  double convertAcceleration(
79  double accel ) const;
80 
82  DtVector convertAcceleration(
84  const DtVector& accel ) const;
85 
87  DtTaitBryan convertOrientation(
89  const DtTaitBryan& orientation ) const;
90 
92  double convertAngle(
94  double angle ) const;
95 
97  DtVector convertRotationalVelocity(
99  const DtVector& rotVel ) const;
100 
102 
105 
107  double revertDistance(
109  double distance ) const;
110 
112  double revertSpeed(
114  double speed ) const;
115 
117  DtVector revertVelocity(
119  const DtVector& velocity ) const;
120 
122  DtVector revertAcceleration(
124  DtVector accel ) const;
125 
127  double revertAcceleration(
129  double accel ) const;
130 
132  DtTaitBryan revertOrientation(
134  const DtTaitBryan& ori ) const;
135 
137  double revertAngle(
139  double angle ) const;
140 
142  DtVector revertRotationalVelocity(
144  const DtVector& rotVel ) const;
145 
147 
151  void addUnitConverter(DisplayUnitType type,
152  unsigned int unit, const DtUnitConverter* converter );
153 
154 
157 
159  const DtTimeUnitConverter* timeConverterFor(
161 
163  const DtDistanceUnitConverter* distanceConverterFor(
165 
167  const DtOrientationUnitConverter* orientationConverterFor(
169 
171 
172  protected:
173 
175  void addDefaultConverters();
176 
179 
181  double distanceConversionFactor(
183 
185  double velocityConversionFactor(
187 
189  double accelerationConversionFactor(
191 
193  double angleConversionFactor(
195 
197  double rotationalVelocityConversionFactor(
199 
201 
202  protected:
203 
204  typedef boost::unordered_map<unsigned int,const DtUnitConverter*>
206  typedef boost::unordered_map<unsigned int,UnitConverterMap>
208 
210 
211  private:
212 
215 
216  };
217 
218 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)