gwnavruntime/navgraph/blobs/navgraphlinkinfoblob.h Source File

navgraphlinkinfoblob.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 // Primary contact: MAMU - secondary contact: NOBODY
8 #ifndef Navigation_NavGraph_LinkInfo_Blob_H
9 #define Navigation_NavGraph_LinkInfo_Blob_H
10 
17 
18 namespace Kaim
19 {
20 
21 class NavGraphLinkInfoBlob;
22 class NavGraphVertexLinkInfoBlob;
23 class NavGraphVertexSpatializationBlob;
24 class NavData;
25 
26 enum NavGraphVertexLinkStatus
27 {
28  NAVGRAPHVERTEX_NOTLINKABLE,
29  NAVGRAPHVERTEX_NOTLINKED,
30  NAVGRAPHVERTEX_LINKED
31 };
32 
33 class NavGraphLinkInfoBlob
34 {
35  KY_CLASS_WITHOUT_COPY(NavGraphLinkInfoBlob)
36 
37 public:
38  NavGraphLinkInfoBlob() {}
39 
40 public:
41  KyUInt32 m_graphIndex; // The graph index in the navdata
42  BlobArray<NavGraphVertexLinkInfoBlob > m_verticesLinkInfo;
43 };
44 inline void SwapEndianness(Endianness::Target e, NavGraphLinkInfoBlob& self)
45 {
46  SwapEndianness(e, self.m_graphIndex);
47  SwapEndianness(e, self.m_verticesLinkInfo);
48 }
49 
50 
51 class NavGraphVertexLinkInfoBlob
52 {
53  KY_CLASS_WITHOUT_COPY(NavGraphVertexLinkInfoBlob)
54 
55 public:
56  NavGraphVertexLinkInfoBlob() {}
57 
58 public:
59  KyUInt32 m_vertexStatus; // Cast this to NavGraphVertexLinkStatus
60  Vec3f m_vertexPosition;
61  BlobRef<NavGraphVertexSpatializationBlob> m_spatialization;
62 };
63 inline void SwapEndianness(Endianness::Target e, NavGraphVertexLinkInfoBlob& self)
64 {
65  SwapEndianness(e, self.m_vertexStatus);
66  SwapEndianness(e, self.m_vertexPosition);
67  SwapEndianness(e, self.m_spatialization);
68 }
69 
70 
71 class NavGraphVertexSpatializationBlob
72 {
73  KY_CLASS_WITHOUT_COPY(NavGraphVertexSpatializationBlob)
74 
75 public:
76  NavGraphVertexSpatializationBlob() {}
77 
78 public:
79  Triangle3f m_projectedTriangle; // The graph index in the navdata
80  Vec3f m_attachPoint; // When the vertex is outside, this is the point where the vertex is attached to the navmesh
81 };
82 inline void SwapEndianness(Endianness::Target e, NavGraphVertexSpatializationBlob& self)
83 {
84  SwapEndianness(e, self.m_projectedTriangle);
85  SwapEndianness(e, self.m_attachPoint);
86 }
87 
88 
89 class NavGraphArrayLinkInfoBlob
90 {
91  KY_ROOT_BLOB_CLASS(NavData, NavGraphArrayLinkInfoBlob, 0)
92  KY_CLASS_WITHOUT_COPY(NavGraphArrayLinkInfoBlob)
93 
94 public:
95  NavGraphArrayLinkInfoBlob() {}
96 
97 public:
98  KyUInt32 m_visualDebugId;
99  BlobArray<NavGraphLinkInfoBlob > m_graphArray;
100 };
101 inline void SwapEndianness(Endianness::Target e, NavGraphArrayLinkInfoBlob& self)
102 {
103  SwapEndianness(e, self.m_visualDebugId);
104  SwapEndianness(e, self.m_graphArray);
105 }
106 
107 }
108 
109 #endif
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36