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.

59 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef FX_ENVELOPE_H
  7. #define FX_ENVELOPE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "cbase.h"
  12. #include "fx.h"
  13. #include "view.h"
  14. #include "view_scene.h"
  15. #include "materialsystem/imaterialvar.h"
  16. class C_EnvelopeFX : public CDefaultClientRenderable
  17. {
  18. public:
  19. typedef CDefaultClientRenderable BaseClass;
  20. C_EnvelopeFX();
  21. virtual ~C_EnvelopeFX();
  22. virtual void Update( void );
  23. // IClientRenderable
  24. virtual const Vector& GetRenderOrigin( void ) { return m_worldPosition; }
  25. virtual void SetRenderOrigin( const Vector &origin ) { m_worldPosition = origin; }
  26. virtual const QAngle& GetRenderAngles( void ) { return vec3_angle; }
  27. virtual const matrix3x4_t & RenderableToWorldTransform();
  28. virtual bool ShouldDraw( void ) { return true; }
  29. virtual RenderableTranslucencyType_t ComputeTranslucencyType( void ) { return RENDERABLE_IS_TRANSLUCENT; }
  30. virtual bool ShouldReceiveProjectedTextures( int flags ) { return false; }
  31. void SetTime( float t ) { m_t = t; }
  32. void LimitTime( float tmax ) { m_tMax = tmax; }
  33. void SetActive( bool state = true ) { m_active = state; }
  34. bool IsActive( void ) const { return m_active; }
  35. virtual void EffectInit( int entityIndex, int attachment );
  36. virtual void EffectShutdown( void );
  37. protected:
  38. void RemoveRenderable();
  39. int m_entityIndex;
  40. int m_attachment;
  41. bool m_active;
  42. float m_t;
  43. float m_tMax;
  44. Vector m_worldPosition;
  45. };
  46. #endif // FX_ENVELOPE_H