VR-Forces 4.0.4 Class Documentation
include/makArchives/DtEntitySettingsRecord.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 2012 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <makArchives/makArchives.h>
00013 
00014 namespace makArchives
00015 {
00016 
00019    class DT_DLL_MAKARCHIVES DtEntitySettingsRecord
00020    {
00021    public:
00022 
00024       DtEntitySettingsRecord();
00025 
00027       DtEntitySettingsRecord( const DtEntitySettingsRecord& copy );
00028 
00030       DtEntitySettingsRecord& operator = ( const DtEntitySettingsRecord& obj );
00031 
00033       ~DtEntitySettingsRecord();
00034 
00037 
00038       bool groundClampingEnabled() const;
00039       void setGroundClampingEnabled( bool enabled );
00040 
00041       float groundClampingRadiusScale() const;
00042       void setGroundClampingRadiusScale( float scale );
00043 
00044       bool groundClampingCullingEnabled() const;
00045       void setGroundClampingCullingEnabled( bool enabled );
00046 
00047       bool orientationClampingEnabled() const;
00048       void setOrientationClampingEnabled( bool enabled );
00049 
00050       bool lifeformsUprightEnabled() const;
00051       void setLifeformsUprightEnabled( bool enabled );
00052 
00053       bool smoothingEnabled() const;
00054       void setSmoothingEnabled( bool enabled );
00055 
00056       float smoothingPeriod() const;
00057       void setSmoothingPeriod( float period );
00058 
00059       bool showEntityLabels() const;
00060       void setShowEntityLabels( bool show );
00061 
00062       bool showStealthsEnabled() const;
00063       void setShowStealthsEnabled( bool enabled );
00064 
00065       bool infoPopupsOnSelectEnabled() const;
00066       void setInfoPopupsOnSelectEnabled( bool enabled );
00067 
00068       bool fireDetonateLinesEnabled() const;
00069       void setFireDetonateLinesEnabled( bool enabled );
00070 
00071       bool entitySensorVolumesEnabled() const;
00072       void setEntitySensorVolumesEnabled( bool enabled );
00073 
00074       bool entityHeightAboveTerrainLinesEnabled() const;
00075       void setEntityHeightAboveTerrainLinesEnabled( bool enabled );
00076 
00077       unsigned entityHeightAboveTerrainMode() const;
00078       void setEntityHeightAboveTerrainMode( unsigned mode );
00079 
00080       bool entitySimDataEnabled() const;
00081       void setEntitySimDataEnabled( bool enabled );
00082 
00083       unsigned colorizedModelColorType() const;
00084       void setColorizedModelColorType( unsigned type );
00085 
00086       float entityIconScale() const;
00087       void setEntityIconScale( float scale );
00088 
00089       void setHideEmbarked2DObjects( bool b );
00090       bool hideEmbarked2DObjects() const;
00091 
00093 
00094    protected:
00095 
00096       friend class boost::serialization::access;
00097 
00101       template<class Archive>
00102          void serialize(Archive & ar, const unsigned int version)
00103       {
00104          if ( version <= 6 )
00105          {
00106             //Deprecated
00107             bool myTrailingEffectsEnabled;
00108             bool myTrackHistoryEnabled;
00109             bool myDecalEffectsEnabled;
00110             ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
00111             ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
00112             ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
00113          }
00114          ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
00115          ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
00116          ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
00117          ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
00118          ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
00119          ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
00120 
00121          if(version >= 1 && version != 7 )
00122          {
00123             ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
00124          }
00125 
00126          if (version >= 2)
00127          {
00128             ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
00129          }
00130 
00131          if (version >= 3)
00132          {
00133             ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
00134          }
00135 
00136          if (version >= 4 && version != 7 )
00137          {
00138             ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
00139          }
00140          
00141          if (version >= 5)
00142          {
00143             if ( version != 7 )
00144             {
00145                ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
00146             }
00147             ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
00148          }
00149          
00150          if (version >=6)
00151          {
00152             ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
00153          }
00154          
00155          if (version >= 9 )
00156          {
00157             ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
00158          }
00159 
00160          if (version == 10 )
00161          {
00162             int myEntityIconScale;
00163             ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
00164             myEntityIconScaleFactor =
00165                pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
00166          }
00167 
00168          if (version >= 11 )
00169          {
00170             ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
00171          }
00172 
00173          if (version >= 12 )
00174          {
00175             ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
00176          }
00177          if ( version >= 13 )
00178          {
00179             ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
00180          }
00181          if ( version >= 14 )
00182          {
00183             ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
00184          }
00185          else
00186          {
00187             myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
00188          }
00189 
00190       }
00191 
00192    protected:
00193 
00194       bool myGroundClampingEnabled;
00195       float myGroundClampingRadiusScale;
00196       bool myGroundClampingCullingEnabled;
00197       bool myOrientationClampingEnabled;
00198       bool myLifeformsUprightEnabled;
00199       bool mySmoothingEnabled;
00200       float mySmoothingPeriod;
00201       bool myShowEntityLabels;
00202       bool myShowStealthsEnabled;
00203       bool myInfoPopupsOnSelectEnabled;
00204       bool myFireDetonateLinesEnabled;
00205       bool myEntitySensorVolumesEnabled;
00206       bool myEntityHeightAboveTerrainLinesEnabled;
00207       unsigned myEntityHeightAboveTerrainMode;
00208       bool myEntitySimDataEnabled;
00209       unsigned myColorizedModelColorType;
00210       float myEntityIconScaleFactor;
00211       bool myHideEmbarked2DObjects;
00212 
00213    };
00214 
00215 }
00216 
00217 BOOST_CLASS_VERSION( makArchives::DtEntitySettingsRecord, 14 )

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)