Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.8 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef PARTICLE_LITSMOKEEMITTER_H
  7. #define PARTICLE_LITSMOKEEMITTER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "particles_simple.h"
  12. #include "tier0/memdbgon.h"
  13. //==================================================
  14. // CLitSmokeEmitter
  15. //==================================================
  16. class CLitSmokeEmitter : public CSimpleEmitter
  17. {
  18. public:
  19. explicit CLitSmokeEmitter( const char *pDebugName );
  20. virtual void Update( float flTimeDelta );
  21. virtual void StartRender( VMatrix &effectMatrix );
  22. virtual void RenderParticles( CParticleRenderIterator *pIterator );
  23. virtual void SimulateParticles( CParticleSimulateIterator *pIterator );
  24. virtual void Init( const char *materialName, Vector sortOrigin );
  25. // Get the material we were initialized with.
  26. PMaterialHandle GetSmokeMaterial() const;
  27. // Color values are 0-1.
  28. virtual void SetDirectionalLight( Vector position, Vector color, float intensity );
  29. virtual void SetLight( Vector position, Vector color, float intensity );
  30. static CSmartPtr<CLitSmokeEmitter> Create( const char *pDebugName )
  31. {
  32. return new CLitSmokeEmitter( pDebugName );
  33. }
  34. CParticleSphereRenderer m_Renderer;
  35. class LitSmokeParticle : public Particle
  36. {
  37. public:
  38. Vector m_vecVelocity;
  39. byte m_uchColor[4];
  40. float m_flLifetime;
  41. float m_flDieTime;
  42. byte m_uchStartSize;
  43. byte m_uchEndSize;
  44. };
  45. private:
  46. CLitSmokeEmitter( const CLitSmokeEmitter & ); // not defined, not accessible
  47. private:
  48. bool m_bInitted;
  49. PMaterialHandle m_hSmokeMaterial;
  50. };
  51. inline PMaterialHandle CLitSmokeEmitter::GetSmokeMaterial() const
  52. {
  53. return m_hSmokeMaterial;
  54. }
  55. #include "tier0/memdbgoff.h"
  56. #endif // PARTICLE_LITSMOKEEMITTER_H