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.

84 lines
2.2 KiB

  1. //========= Copyright � 1996-2009, Valve Corporation, All rights reserved. ====
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef MAPOCCLUDER_H
  7. #define MAPOCCLUDER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "fgdlib/WCKeyValues.h"
  12. #include "MapSphere.h"
  13. #include "ToolInterface.h"
  14. #include "MapPointHandle.h"
  15. class CToolSphere;
  16. class CHelperInfo;
  17. class CRender2D;
  18. class CRender3D;
  19. class IMesh;
  20. class CMapOccluder : public CMapSphere
  21. {
  22. friend class CToolSphere;
  23. public:
  24. DECLARE_MAPCLASS(CMapOccluder,CMapHelper)
  25. //
  26. // Factory for building from a list of string parameters.
  27. //
  28. static CMapClass *Create(CHelperInfo *pInfo, CMapEntity *pParent);
  29. //
  30. // Construction/destruction:
  31. //
  32. CMapOccluder(bool AddToFoW = true);
  33. ~CMapOccluder(void);
  34. virtual void CalcBounds(BOOL bFullUpdate = FALSE);
  35. virtual CMapClass *Copy(bool bUpdateDependencies);
  36. virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);
  37. virtual void OnParentKeyChanged(const char *szKey, const char *szValue);
  38. virtual void OnRemoveFromWorld(CMapWorld *pWorld, bool bNotifyChildren);
  39. virtual void Render2D(CRender2D *pRender);
  40. virtual void Render3D(CRender3D *pRender);
  41. virtual int SerializeRMF(std::fstream &File, BOOL bRMF) { return(0); }
  42. virtual int SerializeMAP(std::fstream &File, BOOL bRMF) { return(0); }
  43. virtual bool IsVisualElement(void) { return true; } // Only visible when the parent entity is selected.
  44. virtual bool IsScaleable(void) const { return false; } // TODO: allow for scaling the sphere by itself
  45. virtual bool IsClutter(void) const { return false; }
  46. virtual bool CanBeCulledByCordon() const { return false; } // We don't hide unless our parent hides.
  47. virtual CBaseTool *GetToolObject(int nHitData, bool bAttachObject );
  48. virtual bool HitTest2D(CMapView2D *pView, const Vector2D &point, HitInfo_t &HitData);
  49. virtual const char* GetDescription() { return "FoW Viewer helper"; }
  50. virtual void SetOrigin(Vector &vecOrigin);
  51. virtual SelectionState_t SetSelectionState(SelectionState_t eSelectionState);
  52. protected:
  53. virtual void DoTransform(const VMatrix &matrix);
  54. virtual void SetRadius(float flRadius);
  55. private:
  56. int m_FoWHandle;
  57. bool m_bWasSelected;
  58. };
  59. #endif // MAPOCCLUDER_H