BVB Source Codes

CRYENGINE Show WorldMonitor.h Source code

Return Download CRYENGINE: download WorldMonitor.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __WorldMonitor_h__
  4. #define __WorldMonitor_h__
  5.  
  6. #pragma once
  7.  
  8. class WorldMonitor
  9. {
  10. public:
  11.         typedef Functor1<const AABB&> Callback;
  12.  
  13.         WorldMonitor();
  14.         WorldMonitor(const Callback& callback);
  15.  
  16.         void Start();
  17.         void Stop();
  18.  
  19.         // - fires all AABB changes that were queued asynchronously
  20.         // - should be called on a regular basis (i. e. typically on each frame)
  21.         void FlushPendingAABBChanges();
  22.  
  23. protected:
  24.  
  25.         bool IsEnabled() const;
  26.  
  27.         Callback m_callback;
  28.  
  29.         bool     m_enabled;
  30.  
  31. private:
  32.         // physics event handlers
  33.         static int StateChangeHandler(const EventPhys* pPhysEvent);
  34.         static int EntityRemovedHandler(const EventPhys* pPhysEvent);
  35.         static int EntityRemovedHandlerAsync(const EventPhys* pPhysEvent);
  36.  
  37.         // - common code for EntityRemovedHandler() and EntityRemovedHandlerAsync()
  38.         // - inspects the type of physics entity in given event, returns true if we're interested in this kind of entity and fills given AABB
  39.         static bool ShallEventPhysEntityDeletedBeHandled(const EventPhys* pPhysEvent, AABB& outAabb);
  40.  
  41.         CryMT::vector<AABB> m_queuedAABBChanges;    // changes from the physical world that have been queued asynchronously; will be fired by FlushPendingAABBChanges()
  42. };
  43.  
  44. #endif
  45.  
downloadWorldMonitor.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