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.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #pragma once
  14. #include "BoundBox.h"
  15. #include "MapClass.h"
  16. class CCullTreeNode;
  17. class CCullTreeNode : public BoundBox
  18. {
  19. public:
  20. CCullTreeNode(void);
  21. ~CCullTreeNode(void);
  22. //
  23. // Children.
  24. //
  25. inline int GetChildCount(void) { return(m_Children.Count()); }
  26. inline CCullTreeNode *GetCullTreeChild(int nChild) { return(m_Children[nChild]); }
  27. void AddCullTreeChild(CCullTreeNode *pChild);
  28. //
  29. // Objects.
  30. //
  31. inline int GetObjectCount(void) { return(m_Objects.Count()); }
  32. inline CMapClass *GetCullTreeObject(int nObject) { return(m_Objects[nObject]); }
  33. void AddCullTreeObject(CMapClass *pObject);
  34. void AddCullTreeObjectRecurse(CMapClass *pObject);
  35. CCullTreeNode *FindCullTreeObjectRecurse(CMapClass *pObject);
  36. void RemoveAllCullTreeObjects(void);
  37. void RemoveAllCullTreeObjectsRecurse(void);
  38. void RemoveCullTreeObject(CMapClass *pObject);
  39. void RemoveCullTreeObjectRecurse(CMapClass *pObject);
  40. void UpdateAllCullTreeObjects(void);
  41. void UpdateAllCullTreeObjectsRecurse(void);
  42. void UpdateCullTreeObject(CMapClass *pObject);
  43. void UpdateCullTreeObjectRecurse(CMapClass *pObject);
  44. protected:
  45. CUtlVector<CCullTreeNode*> m_Children; // The child nodes. This is an octree.
  46. CMapObjectList m_Objects; // The objects contained in this node.
  47. };