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.

67 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: A helper that measures the extents of the only non-NODRAW face of
  4. // its only solid sibling. Writes the extents as four vector keyvalues:
  5. //
  6. // lowerleft
  7. // upperleft
  8. // lowerright
  9. // upperright
  10. //
  11. // ASSUMPTIONS:
  12. //
  13. // 1. Only one solid sibling.
  14. // 2. That solid only has one face with a texture other than "toolsnodraw".
  15. //
  16. // $NoKeywords: $
  17. //=============================================================================//
  18. #ifndef MAPQUADBOUNDS_H
  19. #define MAPQUADBOUNDS_H
  20. #pragma once
  21. #include "MapHelper.h"
  22. class CHelperInfo;
  23. class CRender3D;
  24. class CMapQuadBounds : public CMapHelper
  25. {
  26. public:
  27. DECLARE_MAPCLASS(CMapQuadBounds,CMapHelper)
  28. //
  29. // Factory for building from a list of string parameters.
  30. //
  31. static CMapClass *CreateQuadBounds(CHelperInfo *pInfo, CMapEntity *pParent);
  32. //
  33. // Construction/destruction:
  34. //
  35. CMapQuadBounds(void);
  36. ~CMapQuadBounds(void);
  37. void PresaveWorld(void);
  38. virtual CMapClass *Copy(bool bUpdateDependencies);
  39. virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);
  40. int SerializeRMF(std::fstream &File, BOOL bRMF) { return(0); }
  41. int SerializeMAP(std::fstream &File, BOOL bRMF) { return(0); }
  42. bool IsVisualElement(void) { return(false); } // Only visible when the parent entity is selected.
  43. const char* GetDescription() { return("Quad bounds helper"); }
  44. protected:
  45. Vector m_vLowerLeft;
  46. Vector m_vUpperLeft;
  47. Vector m_vLowerRight;
  48. Vector m_vUpperRight;
  49. int m_nError;
  50. };
  51. #endif // MAPQUADBOUNDS_H