BVB Source Codes

CRYENGINE Show Range.h Source code

Return Download CRYENGINE: download Range.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:   Range.h
  6.    $Id$
  7.    $DateTime$
  8.    Description: Single Range donut
  9.    ---------------------------------------------------------------------
  10.    History:
  11.    - 24:08:2007 : Created by Ricardo Pillosu
  12.  
  13.  *********************************************************************/
  14. #ifndef _RANGE_H_
  15. #define _RANGE_H_
  16.  
  17. class CPersonalRangeSignaling;
  18.  
  19. class CRange
  20. {
  21.  
  22. public:
  23.         // Base ----------------------------------------------------------
  24.         CRange(CPersonalRangeSignaling* pPersonal);
  25.         virtual ~CRange();
  26.         void Init(float fRadius, float fBoundary, const char* sSignal, IAISignalExtraData* pData = NULL);
  27.  
  28.         // Utils ---------------------------------------------------------
  29.         bool IsInRange(const Vec3& vPos) const;
  30.         bool IsInRangePlusBoundary(const Vec3& vPos) const;
  31.  
  32.         bool operator<(const CRange& Range) const
  33.         {
  34.                 return(m_fRadius < Range.m_fRadius);
  35.         }
  36.  
  37.         bool IsInRange(float fSquaredDIst) const
  38.         {
  39.                 return(fSquaredDIst < m_fRadius);
  40.         }
  41.  
  42.         bool IsInRangePlusBoundary(float fSquaredDIst) const
  43.         {
  44.                 return(fSquaredDIst < m_fBoundary);
  45.         }
  46.  
  47.         const string& GetSignal() const
  48.         {
  49.                 return(m_sSignal);
  50.         }
  51.  
  52.         IAISignalExtraData* GetSignalData() const
  53.         {
  54.                 return(m_pSignalData);
  55.         }
  56.  
  57. private:
  58.  
  59. private:
  60.         CPersonalRangeSignaling* m_pPersonal;
  61.         IAISignalExtraData*      m_pSignalData;
  62.         float                    m_fRadius;
  63.         float                    m_fBoundary;
  64.         string                   m_sSignal;
  65. };
  66. #endif // _RANGE_H_
  67.  
downloadRange.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