BVB Source Codes

CRYENGINE Show MFXContainer.h Source code

Return Download CRYENGINE: download MFXContainer.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:   MFXContainer.h
  5. //  Description: Contains a set of effects to be executed (particles, sound, decals, ...)
  6. //
  7. ////////////////////////////////////////////////////////////////////////////////////////////
  8.  
  9. #ifndef _MFX_CONTAINER_H_
  10. #define _MFX_CONTAINER_H_
  11.  
  12. #pragma once
  13.  
  14. #include "MFXEffectBase.h"
  15.  
  16. struct SMFXRunTimeEffectParams;
  17. struct SMFXResourceList;
  18.  
  19. //////////////////////////////////////////////////////////////////////////
  20.  
  21. class CMFXContainer : public _i_reference_target_t
  22. {
  23.  
  24. protected:
  25.         typedef std::vector<TMFXEffectBasePtr> TMFXEffects;
  26.  
  27. public:
  28.  
  29.         struct SParams
  30.         {
  31.                 SParams()
  32.                         : effectId(InvalidEffectId)
  33.                         , delay(0.0f)
  34.                 {
  35.  
  36.                 }
  37.  
  38.                 TMFXNameId   libraryName;     // only top level effects have valid lib name
  39.                 TMFXNameId   name;            // only top level effects have valid effect name
  40.                 TMFXEffectId effectId;        // only top level effects have valid ids!
  41.  
  42.                 float        delay;
  43.         };
  44.  
  45. public:
  46.  
  47.         virtual ~CMFXContainer();
  48.  
  49.         void BuildFromXML(const XmlNodeRef& paramsNode);
  50.  
  51.         void Execute(const SMFXRunTimeEffectParams& params);
  52.  
  53.         void SetCustomParameter(const char* customParameter, const SMFXCustomParamValue& customParameterValue);
  54.         void GetResources(SMFXResourceList& resourceList) const;
  55.  
  56.         void SetLibraryAndId(const TMFXNameId& libraryName, const TMFXEffectId effectId)
  57.         {
  58.                 m_params.libraryName = libraryName;
  59.                 m_params.effectId = effectId;
  60.         }
  61.  
  62.         const SParams& GetParams() const
  63.         {
  64.                 return m_params;
  65.         }
  66.  
  67.         void PreLoadAssets();
  68.         void ReleasePreLoadAssets();
  69.         void GetMemoryUsage(ICrySizer* pSizer) const;
  70.  
  71. protected:
  72.  
  73.         virtual void BuildChildEffects(const XmlNodeRef& paramsNode);
  74.  
  75. private:
  76.  
  77.         void LoadParamsFromXml(const XmlNodeRef& paramsNode);
  78.  
  79. protected:
  80.         TMFXEffects m_effects;
  81.  
  82. private:
  83.         SParams m_params;
  84. };
  85.  
  86. typedef _smart_ptr<CMFXContainer> TMFXContainerPtr;
  87.  
  88. //////////////////////////////////////////////////////////////////////////
  89. // This is used by dedicated server (no sound, particles, etc...)
  90.  
  91. class CMFXDummyContainer : public CMFXContainer
  92. {
  93. protected:
  94.         virtual void BuildChildEffects(const XmlNodeRef& paramsNode) override;
  95. };
  96.  
  97. #endif // _MFX_CONTAINER_H_
  98.  
downloadMFXContainer.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