Team Fortress 2 Source Code as on 22/4/2020
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.

55 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: 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. // $NoKeywords: $
  11. //=============================================================================//
  12. #ifndef CORDON3D_H
  13. #define CORDON3D_H
  14. #pragma once
  15. #include "Box3D.h"
  16. #include "ToolInterface.h"
  17. class CChunkFile;
  18. class CSaveInfo;
  19. class CMapWorld;
  20. class CMapView2D;
  21. class CMapView3D;
  22. enum ChunkFileResult_t;
  23. class Cordon3D : public Box3D
  24. {
  25. typedef Box3D BaseClass;
  26. public:
  27. Cordon3D(void);
  28. // CBaseTool implementation.
  29. virtual void OnActivate();
  30. virtual ToolID_t GetToolID(void) { return TOOL_EDITCORDON; }
  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. private:
  37. void OnEscape(void);
  38. };
  39. #endif // CORDON3D_H