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.

68 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // cs_nav_mesh.h
  9. // The Navigation Mesh interface
  10. // Author: Michael S. Booth ([email protected]), January 2003
  11. //
  12. // Author: Michael S. Booth ([email protected]), 2003
  13. //
  14. // NOTE: The Navigation code uses Doxygen-style comments. If you run Doxygen over this code, it will
  15. // auto-generate documentation. Visit www.doxygen.org to download the system for free.
  16. //
  17. #ifndef _CS_NAV_MESH_H_
  18. #define _CS_NAV_MESH_H_
  19. #include "filesystem.h"
  20. #include "nav_mesh.h"
  21. #include "cs_nav.h"
  22. #include "nav_area.h"
  23. #include "nav_colors.h"
  24. class CNavArea;
  25. class CCSNavArea;
  26. class CBaseEntity;
  27. //--------------------------------------------------------------------------------------------------------
  28. /**
  29. * The CSNavMesh is the global interface to the Navigation Mesh.
  30. * @todo Make this an abstract base class interface, and derive mod-specific implementations.
  31. */
  32. class CSNavMesh : public CNavMesh
  33. {
  34. public:
  35. CSNavMesh( void );
  36. virtual ~CSNavMesh();
  37. virtual CNavArea *CreateArea( void ) const; // CNavArea factory
  38. virtual unsigned int GetSubVersionNumber( void ) const; // returns sub-version number of data format used by derived classes
  39. virtual void SaveCustomData( CUtlBuffer &fileBuffer ) const; // store custom mesh data for derived classes
  40. virtual void LoadCustomData( CUtlBuffer &fileBuffer, unsigned int subVersion ); // load custom mesh data for derived classes
  41. virtual void Reset( void ); ///< destroy Navigation Mesh data and revert to initial state
  42. virtual void Update( void ); ///< invoked on each game frame
  43. virtual NavErrorType Load( void ); // load navigation data from a file
  44. virtual NavErrorType PostLoad( unsigned int version ); // (EXTEND) invoked after all areas have been loaded - for pointer binding, etc
  45. virtual bool Save( void ) const; ///< store Navigation Mesh to a file
  46. void ClearPlayerCounts( void ); ///< zero player counts in all areas
  47. protected:
  48. virtual void BeginCustomAnalysis( bool bIncremental );
  49. virtual void PostCustomAnalysis( void ); // invoked when custom analysis step is complete
  50. virtual void EndCustomAnalysis();
  51. private:
  52. };
  53. #endif // _CS_NAV_MESH_H_