BVB Source Codes

CRYENGINE Show ColorGradientManager.h Source code

Return Download CRYENGINE: download ColorGradientManager.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.  
  5. -------------------------------------------------------------------------
  6. History:
  7. - 15:05:2009   Created by Federico Rebora
  8.  
  9. *************************************************************************/
  10.  
  11. #ifndef COLOR_GRADIENT_MANAGER_H_INCLUDED
  12. #define COLOR_GRADIENT_MANAGER_H_INCLUDED
  13.  
  14. #include <CryRenderer/IColorGradingController.h>
  15.  
  16. class CColorGradientManager
  17. {
  18. public:
  19.         CColorGradientManager();
  20.  
  21.         void TriggerFadingColorGradient(const string& filePath, const float fadeInTimeInSeconds);
  22.  
  23.         void UpdateForThisFrame(const float frameTimeInSeconds);
  24.         void Reset();
  25.         void Serialize(TSerialize serializer);
  26.  
  27. private:
  28.         void FadeInLastLayer(const float frameTimeInSeconds);
  29.         void FadeOutCurrentLayers();
  30.         void RemoveZeroWeightedLayers();
  31.         void SetLayersForThisFrame();
  32.         void LoadGradients();
  33.  
  34.         IColorGradingController& GetColorGradingController();
  35.  
  36. private:
  37.  
  38.         class LoadedColorGradient
  39.         {
  40.         public:
  41.                 LoadedColorGradient(const string& filePath, const SColorChartLayer& layer, const float fadeInTimeInSeconds);
  42.  
  43.         public:
  44.                 void FadeIn(const float frameTimeInSeconds);
  45.                 void FadeOut(const float blendAmountOfFadingInGradient);
  46.  
  47.                 void FreezeMaximumBlendAmount();
  48.  
  49.                 SColorChartLayer m_layer;
  50.                 string m_filePath;
  51.                 float m_fadeInTimeInSeconds;
  52.                 float m_elapsedTime;
  53.                 float m_maximumBlendAmount;
  54.         };
  55.  
  56.         class LoadingColorGradient
  57.         {
  58.         public:
  59.                 LoadingColorGradient(const string& filePath, const float fadeInTimeInSeconds);
  60.  
  61.                 LoadedColorGradient Load(IColorGradingController& colorGradingController) const;
  62.  
  63.         public:
  64.                 string m_filePath;
  65.                 float m_fadeInTimeInSeconds;
  66.         };
  67.  
  68. private:
  69.  
  70.         std::vector<LoadingColorGradient> m_colorGradientsToLoad;
  71.         std::vector<LoadedColorGradient> m_currentGradients;
  72. };
  73.  
  74. #endif //COLOR_GRADIENT_MANAGER_H_INCLUDED
downloadColorGradientManager.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top