BVB Source Codes

CRYENGINE Show GlobalPerceptionScaleHandler.h Source code

Return Download CRYENGINE: download GlobalPerceptionScaleHandler.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /********************************************************************
  4.    -------------------------------------------------------------------------
  5.    File name:   GlobalPerceptionScaleHandler.h
  6.    $Id$
  7.    Description: Handler to manage global perception scale values
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    22:12:2011 -  Created by Francesco Roccucci
  12.  
  13.  *********************************************************************/
  14.  
  15. #ifndef __GlobalPerceptionScale_h__
  16. #define __GlobalPerceptionScale_h__
  17.  
  18. #pragma once
  19.  
  20. #include <CryCore/Containers/CryListenerSet.h>
  21.  
  22. struct IAIObject;
  23.  
  24. class CGlobalPerceptionScaleHandler
  25. {
  26. public:
  27.         CGlobalPerceptionScaleHandler();
  28.  
  29.         void SetGlobalPerception(const float visual, const float audio, const EAIFilterType filterType, uint8 factionID);
  30.         void ResetGlobalPerception();
  31.  
  32.         // Return the specific visual/audio perception scale value for the pObject
  33.         // in relation of the global settings
  34.         float GetGlobalVisualScale(const IAIObject* pAIObject) const;
  35.         float GetGlobalAudioScale(const IAIObject* pAIObject) const;
  36.  
  37.         void  RegisterListener(IAIGlobalPerceptionListener* plistener);
  38.         void  UnregisterListener(IAIGlobalPerceptionListener* plistener);
  39.  
  40.         void  Reload();
  41.         void  Serialize(TSerialize ser);
  42.  
  43.         void  DebugDraw() const;
  44.  
  45. private:
  46.  
  47.         bool IsObjectAffected(const IAIObject* pAIObject) const;
  48.         void NotifyEvent(const IAIGlobalPerceptionListener::EGlobalPerceptionScaleEvent event);
  49.  
  50.         float         m_visual;
  51.         float         m_audio;
  52.         EAIFilterType m_filterType;
  53.         uint8         m_factionID;
  54.         uint8         m_playerFactionID;
  55.  
  56.         typedef CListenerSet<IAIGlobalPerceptionListener*> Listeners;
  57.         Listeners m_listenersList;
  58. };
  59.  
  60. #endif // __GlobalPerceptionScale_h__
  61.  
downloadGlobalPerceptionScaleHandler.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