BVB Source Codes

CRYENGINE Show MaterialFGManager.h Source code

Return Download CRYENGINE: download MaterialFGManager.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   MaterialFGManager
  5. //  Version:     v1.00
  6. //  Created:     29/11/2006 by AlexL-Benito GR
  7. //  Compilers:   Visual Studio.NET
  8. //  Description: This class manage all the FlowGraph HUD effects related to a
  9. //                                                              material FX.
  10. // -------------------------------------------------------------------------
  11. //  History:
  12. //
  13. ////////////////////////////////////////////////////////////////////////////
  14.  
  15. #ifndef __MATERIALFGMANAGER_H__
  16. #define __MATERIALFGMANAGER_H__
  17.  
  18. #pragma once
  19.  
  20. #include <CryFlowGraph/IFlowSystem.h>
  21. #include "MaterialEffects/MFXFlowGraphEffect.h"
  22.  
  23. class CMaterialFGManager
  24. {
  25. public:
  26.         CMaterialFGManager();
  27.         virtual ~CMaterialFGManager();
  28.  
  29.         // load FlowGraphs from specified path
  30.         bool LoadLibs(const char* path = "Libs/MaterialEffects/FlowGraphs");
  31.  
  32.         // reset (deactivate all FlowGraphs)
  33.         void Reset(bool bCleanUp);
  34.  
  35.         // serialize
  36.         void          Serialize(TSerialize ser);
  37.  
  38.         bool          StartFGEffect(const SMFXFlowGraphParams& fgParams, float curDistance);
  39.         bool          EndFGEffect(const string& fgName);
  40.         bool          EndFGEffect(IFlowGraphPtr pFG);
  41.         bool          IsFGEffectRunning(const string& fgName);
  42.         void          SetFGCustomParameter(const SMFXFlowGraphParams& fgParams, const char* customParameter, const SMFXCustomParamValue& customParameterValue);
  43.  
  44.         void          ReloadFlowGraphs();
  45.  
  46.         int           GetFlowGraphCount() const;
  47.         IFlowGraphPtr GetFlowGraph(int index, string* pFileName = NULL) const;
  48.         bool          LoadFG(const string& filename, IFlowGraphPtr* pGraphRet = NULL);
  49.  
  50.         void          GetMemoryUsage(ICrySizer* s) const;
  51.  
  52.         void          PreLoad();
  53.  
  54. protected:
  55.         struct SFlowGraphData
  56.         {
  57.                 SFlowGraphData()
  58.                 {
  59.                         m_startNodeId = InvalidFlowNodeId;
  60.                         m_endNodeId = InvalidFlowNodeId;
  61.                         m_bRunning = false;
  62.                 }
  63.  
  64.                 void GetMemoryUsage(ICrySizer* pSizer) const
  65.                 {
  66.                         pSizer->AddObject(m_name);
  67.                 }
  68.                 string        m_name;
  69.                 string        m_fileName;
  70.                 IFlowGraphPtr m_pFlowGraph;
  71.                 TFlowNodeId   m_startNodeId;
  72.                 TFlowNodeId   m_endNodeId;
  73.                 bool          m_bRunning;
  74.         };
  75.  
  76.         SFlowGraphData* FindFG(const string& fgName);
  77.         SFlowGraphData* FindFG(IFlowGraphPtr pFG);
  78.         bool            InternalEndFGEffect(SFlowGraphData* pFGData, bool bInitialize);
  79.  
  80. protected:
  81.  
  82.         typedef std::vector<SFlowGraphData> TFlowGraphData;
  83.         TFlowGraphData m_flowGraphVector;     //List of FlowGraph Effects
  84. };
  85.  
  86. #endif
  87.  
downloadMaterialFGManager.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