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.

86 lines
2.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef MAPLINE_H
  8. #define MAPLINE_H
  9. #pragma once
  10. #include "MapHelper.h"
  11. class CRender3D;
  12. #define MAX_KEYNAME_SIZE 32
  13. class CMapLine : public CMapHelper
  14. {
  15. public:
  16. DECLARE_MAPCLASS(CMapLine,CMapHelper)
  17. //
  18. // Factory for building from a list of string parameters.
  19. //
  20. static CMapClass *Create(CHelperInfo *pInfo, CMapEntity *pParent);
  21. //
  22. // Construction/destruction:
  23. //
  24. CMapLine(void);
  25. CMapLine(const char *pszStartValueKey, const char *pszStartKey, const char *pszEndValueKey, const char *pszEndKey);
  26. ~CMapLine(void);
  27. void Initialize(void);
  28. void BuildLine(void);
  29. void CalcBounds(BOOL bFullUpdate = FALSE);
  30. virtual CMapClass *Copy(bool bUpdateDependencies);
  31. virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);
  32. void Render3D(CRender3D *pRender);
  33. void Render2D(CRender2D *pRender);
  34. int SerializeRMF(std::fstream &File, BOOL bRMF);
  35. int SerializeMAP(std::fstream &File, BOOL bRMF);
  36. bool IsVisualElement(void) { return(true); }
  37. virtual bool CanBeCulledByCordon() const { return false; } // We don't hide unless our parent hides.
  38. virtual CMapClass *PrepareSelection(SelectMode_t eSelectMode);
  39. const char* GetDescription() { return("Line helper"); }
  40. void OnAddToWorld(CMapWorld *pWorld);
  41. void OnNotifyDependent(CMapClass *pObject, Notify_Dependent_t eNotifyType);
  42. void OnParentKeyChanged( const char* key, const char* value );
  43. void OnRemoveFromWorld(CMapWorld *pWorld, bool bNotifyChildren);
  44. virtual void UpdateDependencies(CMapWorld *pWorld, CMapClass *pObject);
  45. protected:
  46. //
  47. // Implements CMapAtom transformation functions.
  48. //
  49. void DoTransform(const VMatrix &matrix);
  50. char m_szStartValueKey[80]; // The key in our parent entity to look at for our start target.
  51. char m_szStartKey[80]; // The value in our parent entity to look at for our start target.
  52. char m_szEndValueKey[80]; //
  53. char m_szEndKey[80]; //
  54. CMapEntity *m_pStartEntity; // Our start target.
  55. CMapEntity *m_pEndEntity; // Our end target.
  56. };
  57. #endif // MAPLINE_H