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.

80 lines
2.3 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef MAPVIEW2D_H
  8. #define MAPVIEW2D_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "MapView2DBase.h"
  13. #include "tier1/utlvector.h"
  14. class CMapInstance;
  15. class CMapView2D : public CMapView2DBase
  16. {
  17. protected:
  18. CMapView2D(); // protected constructor used by dynamic creation
  19. virtual ~CMapView2D();
  20. DECLARE_DYNCREATE(CMapView2D)
  21. virtual bool IsLogical() { return false; }
  22. virtual void OnRenderListDirty();
  23. void RenderInstance( CMapInstance *pInstanceClass, CMapClass *pMapClass, Vector &InstanceOrigin, QAngle &InstanceAngles );
  24. private:
  25. void DrawPointFile( CRender2D *pRender );
  26. void AddToRenderLists( CMapClass *pObject );
  27. void RenderFoW( void );
  28. void Render();
  29. void SetDrawType( DrawType_t drawType );
  30. virtual void ActivateView( bool bActivate );
  31. bool UpdateRenderObjects();
  32. void DrawCullingCircleHelper2D( CRender2D *pRender );
  33. void RenderInstanceMapClass_r( CMapClass *pObject );
  34. // general variables:
  35. bool m_bLastActiveView; // is this the last active view?
  36. CUtlVector<CMapClass *> m_RenderList; // list of current rendered objects
  37. bool m_bUpdateRenderObjects; // if true, update render list on next draw
  38. // bool m_bInstanceRendering; // if true, we are rendering an instance
  39. // Vector m_InstanceOrigin; // the origin offset of instance rendering
  40. // QAngle m_InstanceAngles; // the rotation of the instance rendering
  41. // VMatrix m_InstanceMatrix; // matrix of the origin and rotation of rendering
  42. // matrix3x4_t m_Instance3x4Matrix; // matrix of the origin and rotation of rendering
  43. // Overrides
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CMapView2D)
  46. protected:
  47. virtual void OnInitialUpdate(); // first time after construct
  48. afx_msg void OnView2dxy();
  49. afx_msg void OnView2dyz();
  50. afx_msg void OnView2dxz();
  51. afx_msg void OnUpdateEditSelection(CCmdUI *pCmdUI);
  52. afx_msg BOOL OnToolsAlign(UINT nID);
  53. afx_msg BOOL OnFlip(UINT nID);
  54. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. };
  58. inline bool CMapView2D::UpdateRenderObjects()
  59. {
  60. return m_bUpdateRenderObjects;
  61. }
  62. #endif // MAPVIEW2D_H