BVB Source Codes

CRYENGINE Show AutoTypeStructs.h Source code

Return Download CRYENGINE: download AutoTypeStructs.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef AUTOTYPESTRUCT_H
  4. #define AUTOTYPESTRUCT_H
  5.  
  6. #if _MSC_VER > 1000
  7.         #pragma once
  8. #endif
  9.  
  10. /// All structures that use auto-type info should go in here - a single header
  11. /// that can get #included by AutoTypeInfo.cpp. This file should not include
  12. /// any other private headers, but interface headers are OK
  13.  
  14. #include <CryAISystem/IAISystem.h>
  15. #include <CryAISystem/IAgent.h>
  16.  
  17. //====================================================================
  18. // SLinkRecord
  19. // used in CWaypoint3DSurfaceNavRegion
  20. //====================================================================
  21. struct SLinkRecord
  22. {
  23.         SLinkRecord(int nodeIndex = 0, float radiusOut = 0, float radiusIn = 0) : nodeIndex(nodeIndex), radiusOut(radiusOut), radiusIn(radiusIn) {}
  24.         int   nodeIndex;
  25.         float radiusOut, radiusIn;
  26.         AUTO_STRUCT_INFO;
  27. };
  28.  
  29. struct SFlightLinkDesc
  30. {
  31.         SFlightLinkDesc(int i1, int i2) : index1(i1), index2(i2) {}
  32.         int index1, index2;
  33.         AUTO_STRUCT_INFO;
  34. };
  35.  
  36. //====================================================================
  37. // NodeDescriptor - used for saving/loading
  38. //====================================================================
  39. struct NodeDescriptor
  40. {
  41.         // the node ID used during quick load/save. Guaranteed to be unique (by resetting just before saving)
  42.         // and ID 1 is special = it signifies m_pSafeFirst
  43.         unsigned ID;
  44.         Vec3     dir;
  45.         Vec3     up;
  46.         Vec3     pos;
  47.         int      index; // building, span or volume
  48.         int      obstacle[3];
  49.  
  50.         uint16   navType; // cast from IAISystem::ENavigationType
  51.  
  52.         uint8    type               : 4; // 0-4 from EWaypointNodeType
  53.         uint8    bForbidden         : 1; // bool - just for triangular and forbidden areas
  54.         uint8    bForbiddenDesigner : 1; // bool - just for triangular and designer forbidden
  55.         uint8    bRemovable         : 1; // bool
  56.  
  57.         AUTO_STRUCT_INFO;
  58.  
  59.         NodeDescriptor() : ID(0), navType(0), bRemovable(0), bForbidden(0), type(0), dir(ZERO), up(ZERO), pos(ZERO), index(0) { obstacle[0] = obstacle[1] = obstacle[2] = 0; }
  60. };
  61.  
  62. //====================================================================
  63. // LinkDescriptor - used for saving/loading
  64. //====================================================================
  65. struct LinkDescriptor
  66. {
  67.         unsigned nSourceNode;
  68.         unsigned nTargetNode;
  69.         Vec3     vEdgeCenter;
  70.         float    fMaxPassRadius;
  71.         float    fExposure;
  72.         float    fLength;
  73.         float    fMaxWaterDepth;
  74.         float    fMinWaterDepth;
  75.         uint8    nStartIndex, nEndIndex;
  76.         uint8    bIsPureTriangularLink   : 1;
  77.         uint8    bSimplePassabilityCheck : 1;
  78.         AUTO_STRUCT_INFO;
  79. };
  80.  
  81. struct SVolumeHideSpot
  82. {
  83.         SVolumeHideSpot(const Vec3& pos = Vec3(0, 0, 0), const Vec3& dir = Vec3(0, 0, 0)) : pos(pos), dir(dir) {}
  84.         const Vec3& GetPos() const                          { return pos; }
  85.         void        GetMemoryUsage(ICrySizer* pSizer) const {}
  86.         Vec3        pos;
  87.         Vec3        dir;
  88.         AUTO_STRUCT_INFO;
  89. };
  90.  
  91. struct ObstacleDataDesc
  92. {
  93.         Vec3 vPos;
  94.         Vec3 vDir;
  95.         /// this radius is approximate - it is estimated during link generation. if -ve it means
  96.         /// that it shouldn't be used (i.e. object is significantly non-circular)
  97.         float fApproxRadius;
  98.         uint8 flags;
  99.         uint8 approxHeight;
  100.  
  101.         void  Serialize(TSerialize ser);
  102.  
  103.         AUTO_STRUCT_INFO;
  104. };
  105.  
  106. struct SFlightDesc
  107. {
  108.         float x, y;
  109.         float minz, maxz;
  110.         float maxRadius;
  111.         int   classification;
  112.         int   childIdx;
  113.         int   nextIdx;
  114.         AUTO_STRUCT_INFO;
  115. };
  116.  
  117. #endif
  118.  
downloadAutoTypeStructs.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