BVB Source Codes

CRYENGINE Show CoverPath.h Source code

Return Download CRYENGINE: download CoverPath.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __CoverPath_h__
  4. #define __CoverPath_h__
  5. #pragma once
  6.  
  7. #include "Cover.h"
  8.  
  9. class CoverPath
  10. {
  11. public:
  12.         enum PathFlags
  13.         {
  14.                 Looped = 1 << 0,
  15.         };
  16.  
  17.         struct Point
  18.         {
  19.                 Point()
  20.                         : position(ZERO)
  21.                         , distance(0.0f)
  22.                 {
  23.                 }
  24.                 Point(const Vec3& pos, float dist)
  25.                         : position(pos)
  26.                         , distance(dist)
  27.                 {
  28.                 }
  29.  
  30.                 Vec3  position;
  31.                 float distance;
  32.         };
  33.  
  34.         CoverPath();
  35.  
  36.         typedef std::vector<Point> Points;
  37.         const Points& GetPoints() const;
  38.  
  39.         bool          Empty() const;
  40.         void          Clear();
  41.         void          Reserve(uint32 pointCount);
  42.         void          AddPoint(const Vec3& point);
  43.  
  44.         Vec3          GetPointAt(float distance) const;
  45.         Vec3          GetClosestPoint(const Vec3& point, float* distanceToPath, float* distanceOnPath = 0) const;
  46.         float         GetDistanceAt(const Vec3& point, float tolerance = 0.05f) const;
  47.         Vec3          GetNormalAt(const Vec3& point) const;
  48.  
  49.         float         GetLength() const;
  50.  
  51.         uint32        GetFlags() const;
  52.         void          SetFlags(uint32 flags);
  53.  
  54.         bool          Intersect(const Vec3& origin, const Vec3& dir, float* distance, Vec3* point) const;
  55.  
  56.         void          DebugDraw();
  57.  
  58. private:
  59.         Points m_points;
  60.         uint32 m_flags;
  61. };
  62.  
  63. #endif //__CoverPath_h__
  64.  
downloadCoverPath.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