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.

61 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ====
  2. //
  3. // Defines the cordon tool. The cordon tool defines a rectangular
  4. // volume that acts as a visibility filter. Only objects that intersect
  5. // the cordon are rendered in the views. When saving the MAP file while
  6. // the cordon tool is active, only brushes that intersect the cordon
  7. // bounds are saved. The cordon box is replaced by brushes in order to
  8. // seal the map.
  9. //
  10. //=============================================================================
  11. #ifndef CORDON3D_H
  12. #define CORDON3D_H
  13. #pragma once
  14. #include "Box3D.h"
  15. #include "ToolInterface.h"
  16. class CChunkFile;
  17. class CSaveInfo;
  18. class CMapWorld;
  19. class CMapView2D;
  20. class CMapView3D;
  21. enum ChunkFileResult_t;
  22. class Cordon3D : public Box3D
  23. {
  24. typedef Box3D BaseClass;
  25. public:
  26. Cordon3D(void);
  27. // CBaseTool implementation.
  28. virtual void OnActivate();
  29. virtual ToolID_t GetToolID(void) { return TOOL_EDITCORDON; }
  30. virtual void RefreshToolState();
  31. virtual bool OnLMouseDown2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  32. virtual bool OnLMouseUp2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  33. virtual bool OnMouseMove2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  34. virtual bool OnKeyDown2D(CMapView2D *pView, UINT nChar, UINT nRepCnt, UINT nFlags);
  35. virtual bool OnKeyDown3D(CMapView3D *pView, UINT nChar, UINT nRepCnt, UINT nFlags);
  36. virtual void RenderTool2D( CRender2D *pRender );
  37. private:
  38. void OnDelete();
  39. void OnEscape();
  40. static Vector m_vecLastMins; // Last mins & maxs the user dragged out with this tool;
  41. static Vector m_vecLastMaxs; // used to fill in the third axis when starting a new box.
  42. };
  43. #endif // CORDON3D_H