/*******************************************************************************
** Copyright (c) 2021 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/

//! \file DtOceanRenderSettingsRecord.h
//! \brief Contains makArchives::DtOceanRenderSettingsRecord class.
//! \ingroup makArchives

#pragma once
#include <makArchives/makArchives.h>

namespace makArchives
{
   //! \brief A DtOceanRenderSettingsRecord contains the information to regarding
   //! the rendering settings the applications saves.
   //! \ingroup makArchives
   class DT_DLL_MAKARCHIVES DtOceanRenderSettingsRecord
   {
   public:

      //! CTOR
      DtOceanRenderSettingsRecord();

      //! Copy CTOR
      DtOceanRenderSettingsRecord(const DtOceanRenderSettingsRecord& orig);

      //! DTOR
      ~DtOceanRenderSettingsRecord();

      //! Assignment OP
      DtOceanRenderSettingsRecord& operator=(DtOceanRenderSettingsRecord rhs);

      //! Swap data from this object with another.
      void swap(DtOceanRenderSettingsRecord& other);

      //!@{
      bool oceanPlanarReflectionsEnabled() const;
      void setOceanPlanarReflectionsEnabled(bool setting);
      //!@}

      //!@{
      float oceanPlanarReflectionsLODScale() const;
      void setOceanPlanarReflectionsLODScale(float setting);
      //!@}

      //!@{
      bool oceanPlanarReflectionsSpecifyFarClip() const;
      void setOceanPlanarReflectionsSpecifyFarClip(bool setting);
      //!@}

      //!@{
      double oceanPlanarReflectionsFarClip() const;
      void setOceanPlanarReflectionsFarClip(double setting);
      //!@}

     //!@{
      bool waveSprayEffectEnabled() const;
      void setWaveSprayEffectEnabled(bool setting);
      //!@}

      //!@{
      bool rotorWashDecalEnabled() const;
      void setRotorWashDecalEnabled(bool setting);
      //!@}

      //!@{
      bool waveSplashEffectEnabled() const;
      void setWaveSplashEffectEnabled(bool setting);
      //!@}

      //!@{
      double oceanHeightMapResolution() const;
      void setOceanHeightMapResolution(double setting);
      //!@}

      //!@{
      bool tidalStreamWakesEnabled() const;
      void setTidalStreamWakesEnabled(bool setting);
      //!@}
	  
      //!@{
      double regenerateCubeMapThreshold() const;
      void setRegenerateCubeMapThreshold(double threshold);
      //!@}
      //!@{
      double regenerateHeightMapPercThreshold() const;
      void setRegenerateHeightMapPercThreshold(double threshold);
      //!@}
      //!@{
      bool omitCloudInCubeMap() const;
      void setOmitCloudInCubeMap(bool omit);
      //!@}
      //!@{
      int oceanHeightMapTextureSize() const;
      void setOceanHeightMapTextureSize(int omit);
      //!@}

      //!@{
      double staticOceanLodRange() const;
      void setStaticOceanLodRange(double range);
      //!@} 

      //!@{
      int planarReflectionTextureWidth() const;
      void setPlanarReflectionTextureWidth( int w );
      //!@} 

      //!@{
      int planarReflectionTextureHeight() const;
      void setPlanarReflectionTextureHeight( int h );
      //!@} 

      unsigned int oceanQuality() const;
      void setOceanQuality( unsigned int quality );

      unsigned int oceanSpectralModel() const;
      void setOceanSpectralModel(unsigned int spectralModel);

      //!@{
      bool planarReflectionsShowSpeedTrees() const;
      void setPlanarReflectionsShowSpeedTrees(bool f);
      //!@}

   protected:

      //! Serialization
      friend class boost::serialization::access;

      //! When the class Archive corresponds to an output archive, the
      //! & operator is defined similar to <<.  Likewise, when the class Archive
      //! is a type of input archive the & operator is defined similar to >>.
      template<class Archive>
         void serialize(Archive & ar, const unsigned int version)
      {
         ar & BOOST_SERIALIZATION_NVP(myOceanPlanarReflectionsEnabled);
         ar & BOOST_SERIALIZATION_NVP(myOceanPlanarReflectionsLODScale);
         ar & BOOST_SERIALIZATION_NVP(myWaveSprayEffectEnabled);
         ar & BOOST_SERIALIZATION_NVP(myRotorWashDecalEnabled);
         ar & BOOST_SERIALIZATION_NVP(myWaveSplashEffectEnabled);
         ar & BOOST_SERIALIZATION_NVP(myOceanHeightMapResolution);
         ar & BOOST_SERIALIZATION_NVP(myOceanPlanarReflectionsSpecifyFarClip);
         ar & BOOST_SERIALIZATION_NVP(myOceanPlanarReflectionsFarClip);
         ar & BOOST_SERIALIZATION_NVP(myTidalStreamWakesEnabled);
         ar & BOOST_SERIALIZATION_NVP(myRegenerateCubeMapThreshold);
         ar & BOOST_SERIALIZATION_NVP(myRegenerateHeightMapPercThreshold);
         ar & BOOST_SERIALIZATION_NVP(myOmitCloudInCubeMap);
         ar & BOOST_SERIALIZATION_NVP(myOceanHeightMapTextureSize);
         ar & BOOST_SERIALIZATION_NVP(myStaticOceanLodRange);
         if ( version >= 2 )
         {
            ar & BOOST_SERIALIZATION_NVP(myPlanarReflectionTextureWidth);
            ar & BOOST_SERIALIZATION_NVP(myPlanarReflectionTextureHeight);
         }

         if ( version >= 3 )
         {
            ar & BOOST_SERIALIZATION_NVP(myOceanQuality);
         }

         if( version >= 4 )
         {
            ar & BOOST_SERIALIZATION_NVP(myPlanarReflectionsShowSpeedTrees);
         }

         if (version >= 5)
         {
            ar& BOOST_SERIALIZATION_NVP(myOceanSpectralModel);
         }
     }
   protected:

      bool myOceanPlanarReflectionsEnabled;
      float myOceanPlanarReflectionsLODScale;
      bool myOceanPlanarReflectionsSpecifyFarClip;
      double myOceanPlanarReflectionsFarClip;
      bool myWaveSprayEffectEnabled;
      bool myRotorWashDecalEnabled;
      bool myWaveSplashEffectEnabled;
      double myOceanHeightMapResolution;
      bool myTidalStreamWakesEnabled;
      double myRegenerateCubeMapThreshold;
      double myRegenerateHeightMapPercThreshold;
      bool myOmitCloudInCubeMap;
      int myOceanHeightMapTextureSize;
      double myStaticOceanLodRange;
      int myPlanarReflectionTextureWidth;
      int myPlanarReflectionTextureHeight;
      unsigned int myOceanQuality;
      bool myPlanarReflectionsShowSpeedTrees;
      unsigned int myOceanSpectralModel;
   };
}


BOOST_CLASS_VERSION(makArchives::DtOceanRenderSettingsRecord, 5)
