VR-Forces 4.0.4 Class Documentation
include/makArchives/DtCacheSettingsRecord.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtCacheSettingsRecord.h,v $ $Revision: 1.3 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <makArchives/makArchives.h>
00015 
00016 namespace makArchives
00017 {
00020    class DT_DLL_MAKARCHIVES DtCacheSettingsRecord
00021    {
00022    public:
00024       DtCacheSettingsRecord();
00025 
00027       DtCacheSettingsRecord(const DtCacheSettingsRecord& orig);
00028 
00030       DtCacheSettingsRecord& operator=(const DtCacheSettingsRecord& orig);
00031 
00033       ~DtCacheSettingsRecord();
00034 
00036       void setAccelerationCachingEnabled(bool enabled);
00037 
00039       bool accelerationCachingEnabled() const;
00040 
00042       void setInstancingEnabled(bool enabled);
00043 
00045       bool instancingEnabled() const;
00046 
00048       void setCompressTextures(bool enabled);
00049 
00051       bool compressTextures() const;
00052 
00054       void setClearInstancesOnNewScene(bool enabled);
00055 
00057       bool clearInstancesOnNewScene() const;
00058 
00059    protected:
00060 
00061       friend class boost::serialization::access;
00062 
00066       template<class Archive>
00067          void serialize(Archive & ar, const unsigned int version)
00068       {
00069 
00070          if (version >= 2)
00071          {
00072             ar & BOOST_SERIALIZATION_NVP(myCachingEnabled);
00073          }
00074 
00075          if (version >= 3)
00076          {
00077             ar & BOOST_SERIALIZATION_NVP(myCompressTextures);
00078          }
00079 
00080          if (version >= 4)
00081          {
00082             ar & BOOST_SERIALIZATION_NVP(myInstancingEnabled);
00083          }
00084 
00085          if (version >= 5)
00086          {
00087             ar & BOOST_SERIALIZATION_NVP(myClearInstancesOnNew);
00088          }
00089       }
00090 
00091       bool myCachingEnabled;
00092       bool myCompressTextures;
00093       bool myInstancingEnabled;
00094       bool myClearInstancesOnNew;
00095    };
00096 }
00097 
00098 BOOST_CLASS_VERSION(makArchives::DtCacheSettingsRecord, 5)

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)