gwnavruntime/navgraph/blobs/navgraphlinkinfoblob.h Source File

navgraphlinkinfoblob.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 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 #pragma once
8 
15 
16 namespace Kaim
17 {
18 
19 class NavGraphLinkInfoBlob;
20 class NavGraphVertexLinkInfoBlob;
21 class NavGraphVertexSpatializationBlob;
22 class NavData;
23 
24 enum NavGraphVertexLinkStatus
25 {
26  NAVGRAPHVERTEX_NOTLINKABLE,
27  NAVGRAPHVERTEX_NOTLINKED,
28  NAVGRAPHVERTEX_LINKED
29 };
30 
31 class NavGraphLinkInfoBlob
32 {
33  KY_CLASS_WITHOUT_COPY(NavGraphLinkInfoBlob)
34 
35 public:
36  NavGraphLinkInfoBlob() {}
37 
38 public:
39  KyUInt32 m_graphIndex; // The graph index in the navdata
40  BlobArray<NavGraphVertexLinkInfoBlob > m_verticesLinkInfo;
41 };
42 inline void SwapEndianness(Endianness::Target e, NavGraphLinkInfoBlob& self)
43 {
44  SwapEndianness(e, self.m_graphIndex);
45  SwapEndianness(e, self.m_verticesLinkInfo);
46 }
47 
48 
49 class NavGraphVertexLinkInfoBlob
50 {
51  KY_CLASS_WITHOUT_COPY(NavGraphVertexLinkInfoBlob)
52 
53 public:
54  NavGraphVertexLinkInfoBlob() {}
55 
56 public:
57  KyUInt32 m_vertexStatus; // Cast this to NavGraphVertexLinkStatus
58  Vec3f m_vertexPosition;
59  BlobRef<NavGraphVertexSpatializationBlob> m_spatialization;
60 };
61 inline void SwapEndianness(Endianness::Target e, NavGraphVertexLinkInfoBlob& self)
62 {
63  SwapEndianness(e, self.m_vertexStatus);
64  SwapEndianness(e, self.m_vertexPosition);
65  SwapEndianness(e, self.m_spatialization);
66 }
67 
68 
69 class NavGraphVertexSpatializationBlob
70 {
71  KY_CLASS_WITHOUT_COPY(NavGraphVertexSpatializationBlob)
72 
73 public:
74  NavGraphVertexSpatializationBlob() {}
75 
76 public:
77  Triangle3f m_projectedTriangle; // The graph index in the navdata
78  Vec3f m_attachPoint; // When the vertex is outside, this is the point where the vertex is attached to the navmesh
79 };
80 inline void SwapEndianness(Endianness::Target e, NavGraphVertexSpatializationBlob& self)
81 {
82  SwapEndianness(e, self.m_projectedTriangle);
83  SwapEndianness(e, self.m_attachPoint);
84 }
85 
86 
87 class NavGraphArrayLinkInfoBlob
88 {
89  KY_ROOT_BLOB_CLASS(NavData, NavGraphArrayLinkInfoBlob, 0)
90  KY_CLASS_WITHOUT_COPY(NavGraphArrayLinkInfoBlob)
91 
92 public:
93  NavGraphArrayLinkInfoBlob() {}
94 
95 public:
96  KyUInt32 m_visualDebugId;
97  BlobArray<NavGraphLinkInfoBlob > m_graphArray;
98 };
99 inline void SwapEndianness(Endianness::Target e, NavGraphArrayLinkInfoBlob& self)
100 {
101  SwapEndianness(e, self.m_visualDebugId);
102  SwapEndianness(e, self.m_graphArray);
103 }
104 
105 }
106 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17