BVB Source Codes

CRYENGINE Show Environment.cpp Source code

Return Download CRYENGINE: download Environment.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   AIEnvironment.cpp
  5. //  Created:     29/02/2008 by Matthew
  6. //  Description: Simple global struct for accessing major module pointers
  7. // -------------------------------------------------------------------------
  8. //  History:
  9. //
  10. ////////////////////////////////////////////////////////////////////////////
  11.  
  12. #include "StdAfx.h"
  13. #include "Environment.h"
  14.  
  15. #include "ObjectContainer.h"
  16.  
  17. #include "CodeCoverageManager.h"
  18. #include "CodeCoverageGUI.h"
  19. #include "GoalOpFactory.h"
  20. #include "StatsManager.h"
  21. #include "TacticalPointSystem/TacticalPointSystem.h"
  22. #include "TargetSelection/TargetTrackManager.h"
  23. #include "Walkability/WalkabilityCacheManager.h"
  24. #include "NullAIDebugRenderer.h"
  25. #include "Navigation/NavigationSystem/NavigationSystem.h"
  26. #include "BehaviorTree/BehaviorTreeGraft.h"
  27.  
  28. static CNullAIDebugRenderer nullAIRenderer;
  29.  
  30. SAIEnvironment::SAIEnvironment()
  31.         : pActorLookUp(NULL)
  32.         , pGoalOpFactory(NULL)
  33.         , pObjectContainer(NULL)
  34. #if !defined(_RELEASE)
  35.         , pCodeCoverageTracker(NULL)
  36.         , pCodeCoverageManager(NULL)
  37.         , pCodeCoverageGUI(NULL)
  38. #endif
  39.         , pTacticalPointSystem(NULL)
  40.         , pTargetTrackManager(NULL)
  41.         , pStatsManager(NULL)
  42.         , pPipeManager(NULL)
  43.         , pAIActionManager(NULL)
  44.         , pSmartObjectManager(NULL)
  45.         , pPerceptionManager(NULL)
  46.         , pCommunicationManager(NULL)
  47.         , pCoverSystem(NULL)
  48.         , pNavigationSystem(NULL)
  49.         , pSelectionTreeManager(NULL)
  50.         , pBehaviorTreeManager(NULL)
  51.         , pGraftManager(NULL)
  52.         , pVisionMap(NULL)
  53.         , pFactionMap(NULL)
  54.         , pGroupManager(NULL)
  55.         , pCollisionAvoidanceSystem(NULL)
  56.         , pRayCaster(NULL)
  57.         , pIntersectionTester(NULL)
  58.         , pMovementSystem(NULL)
  59.         , pSequenceManager(NULL)
  60.         , pWalkabilityCacheManager(NULL)
  61.         , pAIObjectManager(NULL)
  62.         , pGraph(NULL)
  63.         , pPathfinderNavigationSystemUser(NULL)
  64.         , pMNMPathfinder(NULL)
  65.         , pNavigation(NULL)
  66.         , pClusterDetector(NULL)
  67.         , pWorld(NULL)
  68. {
  69.         SetDebugRenderer(0);
  70.         SetNetworkDebugRenderer(0);
  71.  
  72. #ifdef CRYAISYSTEM_DEBUG
  73.         pRecorder = NULL;
  74.         pBubblesSystem = NULL;
  75. #endif //CRYAISYSTEM_DEBUG
  76. }
  77.  
  78. SAIEnvironment::~SAIEnvironment()
  79. {
  80. }
  81.  
  82. void SAIEnvironment::ShutDown()
  83. {
  84.         SAFE_DELETE(pActorLookUp);
  85.         SAFE_DELETE(pFactionMap);
  86.         SAFE_DELETE(pWalkabilityCacheManager);
  87.         SAFE_DELETE(pGoalOpFactory);
  88. #if !defined(_RELEASE)
  89.         SAFE_DELETE(pCodeCoverageTracker);
  90.         SAFE_DELETE(pCodeCoverageManager);
  91.         SAFE_DELETE(pCodeCoverageGUI);
  92. #endif
  93.         SAFE_DELETE(pStatsManager);
  94.         SAFE_DELETE(pTacticalPointSystem);
  95.         SAFE_DELETE(pTargetTrackManager);
  96.         SAFE_DELETE(pObjectContainer);
  97. }
  98.  
  99. IAIDebugRenderer* SAIEnvironment::GetDebugRenderer()
  100. {
  101.         return pDebugRenderer;
  102. }
  103.  
  104. IAIDebugRenderer* SAIEnvironment::GetNetworkDebugRenderer()
  105. {
  106.         return pNetworkDebugRenderer;
  107. }
  108.  
  109. void SAIEnvironment::SetDebugRenderer(IAIDebugRenderer* pAIDebugRenderer)
  110. {
  111.         pDebugRenderer = pAIDebugRenderer ? pAIDebugRenderer : &nullAIRenderer;
  112. }
  113.  
  114. void SAIEnvironment::SetNetworkDebugRenderer(IAIDebugRenderer* pAINetworkDebugRenderer)
  115. {
  116.         pNetworkDebugRenderer = pAINetworkDebugRenderer ? pAINetworkDebugRenderer : &nullAIRenderer;
  117. }
  118.  
  119. #ifdef CRYAISYSTEM_DEBUG
  120.  
  121. CAIRecorder* SAIEnvironment::GetAIRecorder()
  122. {
  123.         return pRecorder;
  124. }
  125.  
  126. void SAIEnvironment::SetAIRecorder(CAIRecorder* pAIRecorder)
  127. {
  128.         pRecorder = pAIRecorder;
  129. }
  130.  
  131. #endif //CRYAISYSTEM_DEBUG
  132.  
  133. SAIEnvironment gAIEnv;
  134.  
downloadEnvironment.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top