BVB Source Codes

CRYENGINE Show StdAfx.h Source code

Return Download CRYENGINE: download StdAfx.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #if !defined(AFX_STDAFX_H__81DAABA0_0054_42BF_8696_D99BA6832D03__INCLUDED_)
  4. #define AFX_STDAFX_H__81DAABA0_0054_42BF_8696_D99BA6832D03__INCLUDED_
  5.  
  6. #if _MSC_VER > 1000
  7.         #pragma once
  8. #endif // _MSC_VER > 1000
  9.  
  10. #include <CryCore/Project/CryModuleDefs.h>
  11. #define eCryModule   eCryM_AISystem
  12. #define RWI_NAME_TAG "RayWorldIntersection(AI)"
  13. #define PWI_NAME_TAG "PrimitiveWorldIntersection(AI)"
  14.  
  15. #define CRYAISYSTEM_EXPORTS
  16.  
  17. #include <CryCore/Platform/platform.h>
  18.  
  19. #if !defined(_RELEASE)
  20.         #define CRYAISYSTEM_DEBUG
  21.         #define CRYAISYSTEM_VERBOSITY
  22.         #define COMPILE_WITH_MOVEMENT_SYSTEM_DEBUG
  23. #endif
  24.  
  25. #include <stdio.h>
  26.  
  27. #include <memory>
  28. #include <limits>
  29. #include <vector>
  30. #include <map>
  31. #include <numeric>
  32. #include <algorithm>
  33. #include <list>
  34. #include <set>
  35. #include <deque>
  36.  
  37. // Reference additional interface headers your program requires here (not local headers)
  38.  
  39. #include <CryMath/Cry_Math.h>
  40. #include <CryMath/Cry_Camera.h>
  41. #include <CryCore/Containers/CryArray.h>
  42. #include <CryMath/Cry_XOptimise.h> // required by AMD64 compiler
  43. #include <CryMath/Cry_Geo.h>
  44. #include <CrySystem/ISystem.h>
  45. #include <CryScriptSystem/IScriptSystem.h>
  46. #include <CrySystem/IConsole.h>
  47. #include <CrySystem/ILog.h>
  48. #include <CryNetwork/ISerialize.h>
  49. #include <CryFlowGraph/IFlowSystem.h>
  50. #include <CryAISystem/IAIAction.h>
  51. #include <CryPhysics/IPhysics.h>
  52. #include <Cry3DEngine/I3DEngine.h>
  53. #include <CrySystem/ITimer.h>
  54. #include <CryAISystem/IAgent.h>
  55. #include <CryAISystem/IAIActorProxy.h>
  56. #include <CryAISystem/IAIGroupProxy.h>
  57. #include <CryEntitySystem/IEntity.h>
  58. #include <CryEntitySystem/IEntitySystem.h>
  59. #include <CrySystem/File/CryFile.h>
  60. #include <CrySystem/XML/IXml.h>
  61. #include <CryNetwork/ISerialize.h>
  62. #include <CryRenderer/IRenderAuxGeom.h>
  63. #include <CryMath/Random.h>
  64. #include "XMLUtils.h"
  65.  
  66. #include "Environment.h"
  67. #include "CodeCoverageTracker.h"
  68.  
  69. #include <CrySystem/Profilers/FrameProfiler/FrameProfiler_JobSystem.h>  // to be removed
  70.  
  71. #define AI_STRIP_OUT_LEGACY_LOOK_TARGET_CODE
  72.  
  73. /// This frees the memory allocation for a vector (or similar), rather than just erasing the contents
  74. template<typename T>
  75. void ClearVectorMemory(T& container)
  76. {
  77.         T().swap(container);
  78. }
  79.  
  80. // adding some headers here can improve build times... but at the cost of the compiler not registering
  81. // changes to these headers if you compile files individually.
  82. #include "AILog.h"
  83. #include "CAISystem.h"
  84. #include "ActorLookUp.h"
  85. // NOTE: (MATT) Reduced this list to the minimum. {2007/07/18:16:24:59}
  86. //////////////////////////////////////////////////////////////////////////
  87.  
  88. class CAISystem;
  89. ILINE CAISystem* GetAISystem()
  90. {
  91.         extern CAISystem* g_pAISystem;
  92.  
  93.         return g_pAISystem;
  94. }
  95.  
  96. //====================================================================
  97. // SetAABBCornerPoints
  98. //====================================================================
  99. inline void SetAABBCornerPoints(const AABB& b, Vec3* pts)
  100. {
  101.         pts[0].Set(b.min.x, b.min.y, b.min.z);
  102.         pts[1].Set(b.max.x, b.min.y, b.min.z);
  103.         pts[2].Set(b.max.x, b.max.y, b.min.z);
  104.         pts[3].Set(b.min.x, b.max.y, b.min.z);
  105.  
  106.         pts[4].Set(b.min.x, b.min.y, b.max.z);
  107.         pts[5].Set(b.max.x, b.min.y, b.max.z);
  108.         pts[6].Set(b.max.x, b.max.y, b.max.z);
  109.         pts[7].Set(b.min.x, b.max.y, b.max.z);
  110. }
  111.  
  112. ILINE float LinStep(float a, float b, float x)
  113. {
  114.         float w = (b - a);
  115.         if (w != 0.0f)
  116.         {
  117.                 x = (x - a) / w;
  118.                 return min(1.0f, max(x, 0.0f));
  119.         }
  120.         return 0.0f;
  121. }
  122.  
  123. //===================================================================
  124. // HasPointInRange
  125. // (To be replaced)
  126. //===================================================================
  127. ILINE bool HasPointInRange(const std::vector<Vec3>& list, const Vec3& pos, float range)
  128. {
  129.         float r(sqr(range));
  130.         for (uint32 i = 0; i < list.size(); ++i)
  131.                 if (Distance::Point_PointSq(list[i], pos) < r)
  132.                         return true;
  133.         return false;
  134. }
  135.  
  136. #ifndef OUT
  137.         #define OUT
  138. #endif
  139.  
  140. #ifndef IN
  141.         #define IN
  142. #endif
  143.  
  144. //{{AFX_INSERT_LOCATION}}
  145. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  146.  
  147. #endif // !defined(AFX_STDAFX_H__81DAABA0_0054_42BF_8696_D99BA6832D03__INCLUDED_)
  148.  
downloadStdAfx.h 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