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.

83 lines
2.6 KiB

  1. //====== Copyright � 1996-2007, Valve Corporation, All rights reserved. =======
  2. //
  3. // A class representing a projected "light"
  4. //
  5. //=============================================================================
  6. #ifndef DMEPROJECTEDLIGHT_H
  7. #define DMEPROJECTEDLIGHT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmelight.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declaration
  14. //-----------------------------------------------------------------------------
  15. struct LightDesc_t;
  16. struct FlashlightState_t;
  17. class CTextureReference;
  18. //-----------------------------------------------------------------------------
  19. // A spot light - includes shadow mapping parameters
  20. //-----------------------------------------------------------------------------
  21. class CDmeProjectedLight : public CDmePointLight
  22. {
  23. DEFINE_ELEMENT( CDmeProjectedLight, CDmePointLight );
  24. public:
  25. // Sets the spotlight direction
  26. void SetFOV( float flHorizontalFOV, float flVerticalFOV );
  27. float GetFOVx() const { return m_flHorizontalFOV; }
  28. float GetFOVy() const { return m_flVerticalFOV; }
  29. const char *GetFlashlightTexture() const { return m_Texture.Get(); }
  30. void GetFlashlightState( FlashlightState_t &flashlightState, CTextureReference &texture ) const;
  31. private:
  32. CDmaVar< float > m_flMinDistance;
  33. CDmaVar< float > m_flHorizontalFOV;
  34. CDmaVar< float > m_flVerticalFOV;
  35. CDmaVar< float > m_flAmbientIntensity;
  36. CDmaString m_Texture;
  37. CDmaVar< bool > m_bCastsShadows;
  38. CDmaVar< float > m_flRadius;
  39. CDmaVar< float > m_flShadowDepthBias;
  40. CDmaVar< float > m_flShadowSlopeScaleDepthBias;
  41. CDmaVar< float > m_flShadowFilterSize;
  42. CDmaVar< float > m_flShadowJitterSeed;
  43. CDmaVar< Vector2D > m_vPositionJitter;
  44. CDmaTime m_AnimationTime;
  45. CDmaVar< float > m_flFrameRate;
  46. CDmaVar< float > m_flShadowAtten;
  47. CDmaVar< bool > m_bDrawShadowFrustum;
  48. CDmaVar< float > m_flFarZAtten;
  49. CDmaVar< float > m_flAmbientOcclusion;
  50. // Uberlight parameters
  51. CDmaVar< bool > m_bUberlight;
  52. CDmaVar< float > m_flNearEdge;
  53. CDmaVar< float > m_flFarEdge;
  54. CDmaVar< float > m_flCutOn;
  55. CDmaVar< float > m_flCutOff;
  56. CDmaVar< float > m_flWidth;
  57. CDmaVar< float > m_flWedge;
  58. CDmaVar< float > m_flHeight;
  59. CDmaVar< float > m_flHedge;
  60. CDmaVar< float > m_flRoundness;
  61. CDmaVar< bool > m_bVolumetric;
  62. CDmaVar< float > m_flNoiseStrength;
  63. CDmaVar< float > m_flFlashlightTime;
  64. CDmaVar< int > m_nNumPlanes;
  65. CDmaVar< float > m_flPlaneOffset;
  66. CDmaVar< float > m_flVolumetricIntensity;
  67. };
  68. #endif // DMEPROJECTEDLIGHT_H