BVB Source Codes

CRYENGINE Show BoundingVolume.h Source code

Return Download CRYENGINE: download BoundingVolume.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __BoundingVolume_h__
  4. #define __BoundingVolume_h__
  5.  
  6. #pragma once
  7.  
  8. namespace MNM
  9. {
  10. struct BoundingVolume
  11. {
  12.         BoundingVolume()
  13.                 : aabb(AABB::RESET)
  14.                 , height(0.0f)
  15.         {
  16.         }
  17.  
  18.         typedef std::vector<Vec3> Boundary;
  19.         Boundary vertices;
  20.         AABB     aabb;
  21.  
  22.         float    height;
  23.  
  24.         void Swap(BoundingVolume& other);
  25.  
  26.         bool Overlaps(const AABB& _aabb) const;
  27.  
  28.         enum ExtendedOverlap
  29.         {
  30.                 NoOverlap      = 0,
  31.                 PartialOverlap = 1,
  32.                 FullOverlap    = 2,
  33.         };
  34.  
  35.         ExtendedOverlap Contains(const AABB& _aabb) const;
  36.         bool            Contains(const Vec3& point) const;
  37.  
  38.         bool            IntersectLineSeg(const Vec3& start, const Vec3& end, float* t, size_t* segment) const;
  39.  
  40.         void            OffsetVerticesAndAABB(const Vec3& delta);
  41. };
  42.  
  43. struct HashBoundingVolume
  44. {
  45.         BoundingVolume vol;
  46.         uint32         hash;
  47. };
  48. }
  49.  
  50. #endif
  51.  
downloadBoundingVolume.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