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.

64 lines
1.8 KiB

  1. //============ Copyright (c) Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===============================================================================//
  8. #ifndef IWORLD_H
  9. #define IWORLD_H
  10. #ifdef COMPILER_MSVC
  11. #pragma once
  12. #endif
  13. #include "worldrenderer/worldschema.h"
  14. #include "worldrenderer/iworldnode.h"
  15. struct WorldBuilderParams_t;
  16. class KeyValues;
  17. //-----------------------------------------------------------------------------
  18. enum BuildListAction_t
  19. {
  20. BUILD_ACTION_NONE = 0,
  21. BUILD_ACTION_RENDER_PARENT = 1
  22. };
  23. abstract_class IWorld
  24. {
  25. public:
  26. // Loading
  27. virtual void CreateAndDispatchLoadRequests( const Vector &vEye ) = 0;
  28. virtual void Destroy() = 0;
  29. // Reflection
  30. virtual int GetNumNodes() = 0;
  31. virtual const WorldBuilderParams_t *GetBuilderParams() = 0;
  32. virtual IWorldNode *GetNode( int n ) = 0;
  33. virtual bool IsAncestor( int nNodeInQuestion, int nPotentialAncestor ) = 0;
  34. virtual const NodeData_t *GetNodeData( int n ) = 0;
  35. virtual AABB_t GetNodeBounds( int n ) = 0;
  36. virtual Vector GetNodeOrigin( int n ) = 0;
  37. virtual float GetNodeMinDistance( int n ) = 0;
  38. // Resource updates
  39. virtual void ClearOutstandingLoadRequests() = 0;
  40. virtual void UpdateResources() = 0;
  41. // Visibility
  42. virtual int GetLeafNodeForPoint( Vector &vPosition ) = 0;
  43. virtual float GetMaxVisibleDistance( Vector &vPosition ) = 0;
  44. // Rendering
  45. virtual BuildListAction_t BuildRenderList( WorldNodeFlags_t nSkipFlags,
  46. const Vector &vEyePoint,
  47. float flLODScale,
  48. float flFarPlane,
  49. float flElapsedTime ) = 0;
  50. // Entities
  51. virtual void GetEntities( char *pEntityName, CUtlVector<KeyValues*> &entityList ) = 0;
  52. };
  53. #endif // IWORLD_H