VR-Forces 4.0.4 Class Documentation
include/vrvUtil/DtObserverConfiguration.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2008 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: DtObserverConfiguration.h,v $ $Revision: 1.13 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008  
00012  
00013 #ifndef DtObserverConfiguration_H_ 
00014 #define DtObserverConfiguration_H_ 
00015  
00016 #include <vrvUtil/vrvUtil.h> 
00017 #include <vrvUtil/DtConfiguration.h>
00018  
00019 namespace makVrv 
00020 { 
00026    class DT_DLL_VRVUTIL DtObserverConfiguration : public DtConfiguration
00027    { 
00028 
00029    public:
00030 
00031       static const char* ObserverConfigurationString;
00032 
00035       DtObserverConfiguration(const std::string& name = "");
00036 
00038       DtObserverConfiguration(const DtObserverConfiguration&);
00039 
00041       DtObserverConfiguration& operator=(const DtObserverConfiguration&);
00042 
00044       virtual ~DtObserverConfiguration();
00045       
00047 
00048       virtual const std::string& defaultMode() const;
00049       virtual void setDefaultMode(const std::string& defaultMode);
00051 
00053 
00054       virtual double minLinearSpeed() const;
00055       virtual void setMinLinearSpeed( double speed );
00057       
00059 
00060       virtual double maxLinearSpeed() const;
00061       virtual void setMaxLinearSpeed( double speed );
00063       
00065 
00066       virtual double linearSpeed() const;
00067       virtual void setLinearSpeed( double speed );
00069      
00071 
00072       virtual double minRotationSpeed() const;
00073       virtual void setMinRotationSpeed( double speed );
00075       
00077 
00078       virtual double maxRotationSpeed() const;
00079       virtual void setMaxRotationSpeed( double speed );
00081       
00083 
00084       virtual double rotationSpeed() const;
00085       virtual void setRotationSpeed( double speed );
00087      
00088      
00090 
00091       virtual double minOrbitSpeed() const;
00092       virtual void setMinOrbitSpeed( double speed );
00094       
00096 
00097       virtual double maxOrbitSpeed() const;
00098       virtual void setMaxOrbitSpeed( double speed );
00100       
00102 
00103       virtual double orbitSpeed() const;
00104       virtual void setOrbitSpeed( double speed );
00106      
00108 
00109 
00110 
00111        virtual double sceneCenterOffsetX() const;
00112       virtual void setSceneCenterOffsetX( double offset );
00114       
00116 
00117 
00118 
00119       virtual double sceneCenterOffsetY() const;
00120       virtual void setSceneCenterOffsetY( double offset );
00122       
00124 
00125 
00126 
00127       virtual double sceneCenterOffsetZ() const;
00128       virtual void setSceneCenterOffsetZ( double offset );
00130       
00132 
00133 
00134 
00135       virtual const std::string& observerMode() const;
00136       virtual void setObserverMode( const std::string& observerMode );
00138   
00144       DT_DECLARE_ALL_serialize_FUNCTIONS
00145 
00146    protected:
00147 
00148       template<class Archive>
00149       void _serialize(Archive & ar, const unsigned int version)
00150       {
00152          ar & DT_SERIALIZE_BASE(DtConfiguration);
00153 
00154          ar & DT_SERIALIZE_MEMBER(myDefaultMode);
00155          if ( version < 2 )
00156          {
00157             ar & DT_SERIALIZE_MEMBER(myOrbitSpeedGain);
00158             ar & DT_SERIALIZE_MEMBER(myLinearScaledSpeedGain);
00159             ar & DT_SERIALIZE_MEMBER(myLinearUnscaledSpeedGain);
00160             ar & DT_SERIALIZE_MEMBER(myRotationSpeedGain);
00161             ar & DT_SERIALIZE_MEMBER(myGainPrecision);
00162          }
00163          ar & DT_SERIALIZE_MEMBER(myMinOrbitSpeed);
00164          ar & DT_SERIALIZE_MEMBER(myMinLinearSpeed);
00165          ar & DT_SERIALIZE_MEMBER(myMinRotationSpeed);
00166          ar & DT_SERIALIZE_MEMBER(myMaxOrbitSpeed);
00167          ar & DT_SERIALIZE_MEMBER(myMaxLinearSpeed);
00168          ar & DT_SERIALIZE_MEMBER(myMaxRotationSpeed);
00169          ar & DT_SERIALIZE_MEMBER(myOrbitSpeed);
00170          ar & DT_SERIALIZE_MEMBER(myLinearSpeed);
00171          ar & DT_SERIALIZE_MEMBER(myRotationSpeed);
00172          ar & DT_SERIALIZE_MEMBER(mySceneCenterOffsetX);
00173          ar & DT_SERIALIZE_MEMBER(mySceneCenterOffsetY);
00174          ar & DT_SERIALIZE_MEMBER(mySceneCenterOffsetZ);
00175          if ( version >= 2 )
00176          {
00177             ar & DT_SERIALIZE_MEMBER(myObserverMode);
00178          }
00179       }
00180       
00181       std::string myDefaultMode;
00182       int myOrbitSpeedGain;
00183       int myLinearScaledSpeedGain;
00184       int myLinearUnscaledSpeedGain;
00185       int myRotationSpeedGain;
00186       int myGainPrecision;
00187       double myMinLinearSpeed;
00188       double myMaxLinearSpeed;
00189       double myLinearSpeed;
00190       double myMinRotationSpeed;
00191       double myMaxRotationSpeed;
00192       double myRotationSpeed;
00193       double myMinOrbitSpeed;
00194       double myMaxOrbitSpeed;
00195       double myOrbitSpeed;
00196       
00197       double mySceneCenterOffsetX;
00198       double mySceneCenterOffsetY;
00199       double mySceneCenterOffsetZ;
00200       std::string myObserverMode;
00201    };
00202 }
00203 
00204 BOOST_CLASS_VERSION(makVrv::DtObserverConfiguration, 2)
00205 
00206 #endif
00207 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)