BVB Source Codes

CRYENGINE Show ParticleUpdate.h Source code

Return Download CRYENGINE: download ParticleUpdate.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  Created:     25/03/2015 by Filipe amim
  5. //  Description:
  6. // -------------------------------------------------------------------------
  7. //
  8. ////////////////////////////////////////////////////////////////////////////
  9.  
  10. #ifndef PARTICLEUPDATE_H
  11. #define PARTICLEUPDATE_H
  12.  
  13. #pragma once
  14.  
  15. namespace pfx2
  16. {
  17.  
  18. class CParticleComponentRuntime;
  19. class CParticleContainer;
  20.  
  21. struct SUpdateContext
  22. {
  23.         explicit SUpdateContext(CParticleComponentRuntime* pRuntime);
  24.         SUpdateContext(CParticleComponentRuntime* pRuntime, const SUpdateRange& updateRange);
  25.         CParticleSystem*           m_pSystem;
  26.         CParticleComponentRuntime& m_runtime;
  27.         CParticleContainer&        m_container;
  28.         CParticleContainer&        m_parentContainer;
  29.         const SComponentParams&    m_params;
  30.         const SUpdateRange         m_updateRange;
  31.         TParticleHeap*             m_pMemHeap;
  32.         const float                m_deltaTime;
  33.         const float                m_time;
  34.         mutable SChaosKey          m_spawnRng;
  35.         mutable SChaosKeyV         m_spawnRngv;
  36.         mutable SChaosKey          m_updateRng;
  37.         mutable SChaosKeyV         m_updateRngv;
  38. };
  39.  
  40. #define CRY_PFX2_FOR_RANGE_PARTICLES(updateRange) \
  41.   {                                               \
  42.     { for (TParticleId particleId = updateRange.m_firstParticleId; particleId < updateRange.m_lastParticleId; ++particleId) {
  43.  
  44. #define CRY_PFX2_FOR_RANGE_PARTICLESGROUP(updateRange)                                                                                          \
  45.   {                                                                                                                                             \
  46.     { const TParticleGroupId lastParticleId = CRY_PFX2_PARTICLESGROUP_LOWER(updateRange.m_lastParticleId + CRY_PFX2_PARTICLESGROUP_STRIDE - 1); \
  47.       for (TParticleGroupId particleGroupId = updateRange.m_firstParticleId; particleGroupId < lastParticleId; particleGroupId += CRY_PFX2_PARTICLESGROUP_STRIDE) {
  48.  
  49. #define CRY_PFX2_FOR_ACTIVE_PARTICLES(updateContext) \
  50.   CRY_PFX2_FOR_RANGE_PARTICLES((updateContext).m_updateRange)
  51.  
  52. #define CRY_PFX2_FOR_ACTIVE_PARTICLESGROUP(updateContext) \
  53.   CRY_PFX2_FOR_RANGE_PARTICLESGROUP((updateContext).m_updateRange)
  54.  
  55. #define CRY_PFX2_FOR_SPAWNED_PARTICLES(updateContext) \
  56.   CRY_PFX2_FOR_RANGE_PARTICLES(SUpdateRange((updateContext).m_container.GetFirstSpawnParticleId(), (updateContext).m_container.GetLastParticleId()))
  57.  
  58. #define CRY_PFX2_FOR_SPAWNED_PARTICLEGROUP(updateContext) \
  59.   CRY_PFX2_FOR_RANGE_PARTICLESGROUP(SUpdateRange((updateContext).m_container.GetFirstSpawnParticleId(), (updateContext).m_container.GetLastParticleId()))
  60.  
  61. #define CRY_PFX2_FOR_END } \
  62.   }                        \
  63.   }
  64.  
  65. }
  66.  
  67. #endif // PARTICLEUPDATE_H
  68.  
downloadParticleUpdate.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