BVB Source Codes

CRYENGINE Show WalkabilityCache.h Source code

Return Download CRYENGINE: download WalkabilityCache.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __WalkabilityCache_h__
  4. #define __WalkabilityCache_h__
  5.  
  6. #include "FloorHeightCache.h"
  7.  
  8. class WalkabilityCache
  9. {
  10. public:
  11.         typedef StaticDynArray<IPhysicalEntity*, 768> Entities;
  12.         typedef StaticDynArray<AABB, 768>             AABBs;
  13.  
  14.         WalkabilityCache(tAIObjectID actorID);
  15.  
  16.         void        Reset(bool resetFloorCache = true);
  17.         bool        Cache(const AABB& aabb);
  18.         void        Draw();
  19.  
  20.         const AABB& GetAABB() const;
  21.         bool        FullyContaints(const AABB& aabb) const;
  22.  
  23.         size_t      GetOverlapping(const AABB& aabb, Entities& entities) const;
  24.         size_t      GetOverlapping(const AABB& aabb, Entities& entities, AABBs& aabbs) const;
  25.  
  26.         bool        IsFloorCached(const Vec3& position, Vec3& floor) const;
  27.  
  28.         bool        FindFloor(const Vec3& position, Vec3& floor);
  29.         bool        FindFloor(const Vec3& position, Vec3& floor, IPhysicalEntity** entities, AABB* aabbs, size_t entityCount,
  30.                               const AABB& enclosingAABB);
  31.         bool        CheckWalkability(const Vec3& origin, const Vec3& target, float radius, Vec3* finalFloor = 0, bool* flatFloor = 0);
  32.         bool        OverlapTorsoSegment(const Vec3& start, const Vec3& end, float radius, IPhysicalEntity** entities, size_t entityCount);
  33.  
  34.         size_t      GetMemoryUsage() const;
  35.  
  36. private:
  37.         Vec3             m_center;
  38.         AABB             m_aabb;
  39.  
  40.         size_t           m_entititesHash;
  41.         tAIObjectID      m_actorID;
  42.  
  43.         Entities         m_entities;
  44.         AABBs            m_aabbs;
  45.  
  46.         FloorHeightCache m_floorCache;
  47. };
  48.  
  49. #endif
  50.  
downloadWalkabilityCache.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