![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2010 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtObserverModeRecord.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 00015 #include <makArchives/makArchives.h> 00016 00017 #include <string> 00018 #include <map> 00019 00020 namespace makArchives 00021 { 00026 class DT_DLL_MAKARCHIVES DtObserverModeRecord 00027 { 00028 public: 00029 00030 typedef std::map< std::string, bool> ObserverSettingsMap; 00031 00033 DtObserverModeRecord(); 00034 00036 DtObserverModeRecord( const DtObserverModeRecord& orig ); 00037 00039 ~DtObserverModeRecord(); 00040 00042 DtObserverModeRecord& operator=( const DtObserverModeRecord& orig ); 00043 00048 void setModeKey( const std::string& modeKey ); 00049 00051 const std::string& modeKey() const; 00052 00054 void setName( const std::string& name ); 00055 00057 const std::string& name() const; 00058 00061 void setIs2D( bool trueOrFalse ); 00062 00064 bool is2D() const; 00065 00067 void setModelSet( int modelSet ); 00068 00070 int modelSet() const; 00071 00073 void setKeyMap( const std::string& keyMap ); 00074 00076 const std::string& keyMap() const; 00077 00079 00080 int gainPrecision() const; 00081 void setGainPrecision( int amt ); 00083 00085 00086 int orbitSpeedGain() const; 00087 void setOrbitSpeedGain( int gain ); 00089 00091 00092 int linearScaledSpeedGain() const; 00093 void setLinearScaledSpeedGain( int gain ); 00095 00097 00098 int linearUnscaledSpeedGain() const; 00099 void setLinearUnscaledSpeedGain( int gain ); 00101 00103 00104 int rotationSpeedGain() const; 00105 void setRotationSpeedGain( int gain ); 00107 00109 00110 double modelScaleFactor() const; 00111 void setModelScaleFactor( double modelScaleFactor ); 00113 00115 00116 unsigned modelScaleType() const; 00117 void setModelScaleType( unsigned modelScaleFactor ); 00119 00121 00122 double maxModelScaleFactor() const; 00123 void setMaxModelScaleFactor( double maxModelScaleFactor ); 00125 00127 00128 void setObserverSetting( std::string key, bool enabled ); 00129 bool observerSetting( std::string key ) const; 00131 00132 00133 const ObserverSettingsMap& observerSettingsMap() const; 00134 00135 00136 protected: 00137 friend class boost::serialization::access; 00138 00139 template <typename Archive> 00140 void serialize(Archive& ar, unsigned int version) 00141 { 00142 ar & BOOST_SERIALIZATION_NVP(myModeKey); 00143 ar & BOOST_SERIALIZATION_NVP(myName); 00144 ar & BOOST_SERIALIZATION_NVP(myIs2D); 00145 ar & BOOST_SERIALIZATION_NVP(myModelSet); 00146 ar & BOOST_SERIALIZATION_NVP(myKeyMap); 00147 ar & BOOST_SERIALIZATION_NVP(myOrbitSpeedGain); 00148 ar & BOOST_SERIALIZATION_NVP(myLinearScaledSpeedGain); 00149 ar & BOOST_SERIALIZATION_NVP(myLinearUnscaledSpeedGain); 00150 ar & BOOST_SERIALIZATION_NVP(myRotationSpeedGain); 00151 ar & BOOST_SERIALIZATION_NVP(myGainPrecision); 00152 if ( version >= 1 ) 00153 { 00154 ar & BOOST_SERIALIZATION_NVP(myModelScaleFactor); 00155 } 00156 if ( version >= 2 ) 00157 { 00158 ar & BOOST_SERIALIZATION_NVP(myModelScaleType); 00159 ar & BOOST_SERIALIZATION_NVP(myMaxModelScaleFactor); 00160 } 00161 ar & BOOST_SERIALIZATION_NVP(myObserverSettingsMap); 00162 } 00163 00164 protected: 00165 std::string myModeKey; 00166 std::string myName; 00167 bool myIs2D; 00168 std::string myKeyMap; 00169 int myModelSet; 00170 int myOrbitSpeedGain; 00171 int myLinearScaledSpeedGain; 00172 int myLinearUnscaledSpeedGain; 00173 int myRotationSpeedGain; 00174 int myGainPrecision; 00175 double myModelScaleFactor; 00176 ObserverSettingsMap myObserverSettingsMap; 00177 unsigned myModelScaleType; 00178 double myMaxModelScaleFactor; 00179 }; 00180 } 00181 00182 BOOST_CLASS_VERSION(makArchives::DtObserverModeRecord,2) 00183 00184