VR-Vantage API Documentation
DtObserverConfiguration.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtObserverConfiguration.h,v $ $Revision: 1.13 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtObserverConfiguration_H_
14 #define DtObserverConfiguration_H_
15 
16 #include <vrvUtil/vrvUtil.h>
18 
19 namespace makVrv
20 {
27  {
28 
29  public:
30 
31  static const char* ObserverConfigurationString;
32 
35  DtObserverConfiguration(const std::string& name = "");
36 
39 
42 
44  virtual ~DtObserverConfiguration();
45 
47 
48  virtual const std::string& defaultMode() const;
49  virtual void setDefaultMode(const std::string& defaultMode);
51 
53 
54  virtual double minLinearSpeed() const;
55  virtual void setMinLinearSpeed( double speed );
57 
59 
60  virtual double maxLinearSpeed() const;
61  virtual void setMaxLinearSpeed( double speed );
63 
65 
66  virtual double linearSpeed() const;
67  virtual void setLinearSpeed( double speed );
69 
71 
72  virtual double minRotationSpeed() const;
73  virtual void setMinRotationSpeed( double speed );
75 
77 
78  virtual double maxRotationSpeed() const;
79  virtual void setMaxRotationSpeed( double speed );
81 
83 
84  virtual double rotationSpeed() const;
85  virtual void setRotationSpeed( double speed );
87 
88 
90 
91  virtual double minOrbitSpeed() const;
92  virtual void setMinOrbitSpeed( double speed );
94 
96 
97  virtual double maxOrbitSpeed() const;
98  virtual void setMaxOrbitSpeed( double speed );
100 
102 
103  virtual double orbitSpeed() const;
104  virtual void setOrbitSpeed( double speed );
106 
108 
109 
110 
111  virtual double sceneCenterOffsetX() const;
112  virtual void setSceneCenterOffsetX( double offset );
114 
116 
117 
118 
119  virtual double sceneCenterOffsetY() const;
120  virtual void setSceneCenterOffsetY( double offset );
122 
124 
125 
126 
127  virtual double sceneCenterOffsetZ() const;
128  virtual void setSceneCenterOffsetZ( double offset );
130 
132 
133 
134 
135  virtual const std::string& observerMode() const;
136  virtual void setObserverMode( const std::string& observerMode );
138 
145 
146  protected:
147 
148  template<class Archive>
149  void _serialize(Archive & ar, const unsigned int version)
150  {
153 
154  ar & DT_SERIALIZE_MEMBER(myDefaultMode);
155  if ( version < 2 )
156  {
157  ar & DT_SERIALIZE_MEMBER(myOrbitSpeedGain);
158  ar & DT_SERIALIZE_MEMBER(myLinearScaledSpeedGain);
159  ar & DT_SERIALIZE_MEMBER(myLinearUnscaledSpeedGain);
160  ar & DT_SERIALIZE_MEMBER(myRotationSpeedGain);
161  ar & DT_SERIALIZE_MEMBER(myGainPrecision);
162  }
163  ar & DT_SERIALIZE_MEMBER(myMinOrbitSpeed);
164  ar & DT_SERIALIZE_MEMBER(myMinLinearSpeed);
165  ar & DT_SERIALIZE_MEMBER(myMinRotationSpeed);
166  ar & DT_SERIALIZE_MEMBER(myMaxOrbitSpeed);
167  ar & DT_SERIALIZE_MEMBER(myMaxLinearSpeed);
168  ar & DT_SERIALIZE_MEMBER(myMaxRotationSpeed);
169  ar & DT_SERIALIZE_MEMBER(myOrbitSpeed);
170  ar & DT_SERIALIZE_MEMBER(myLinearSpeed);
171  ar & DT_SERIALIZE_MEMBER(myRotationSpeed);
172  ar & DT_SERIALIZE_MEMBER(mySceneCenterOffsetX);
173  ar & DT_SERIALIZE_MEMBER(mySceneCenterOffsetY);
174  ar & DT_SERIALIZE_MEMBER(mySceneCenterOffsetZ);
175  if ( version >= 2 )
176  {
177  ar & DT_SERIALIZE_MEMBER(myObserverMode);
178  }
179  }
180 
181  std::string myDefaultMode;
195  double myOrbitSpeed;
196 
200  std::string myObserverMode;
201  };
202 }
203 
205 
206 #endif
207 


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)