gwnavruntime/navgraph/blobs/navgraphvertex.h Source File
Go to the documentation of this file.
9 #ifndef Navigation_NavGraphVertex_H
10 #define Navigation_NavGraphVertex_H
20 class NavGraphEdgeInfo
24 NavGraphEdgeInfo() : m_navTagIdx(NavTagIdx_Invalid) {}
25 NavTagIdx m_navTagIdx;
29 SwapEndianness(e,
self.m_navTagIdx);
45 KyUInt32 GetNeighborVertexCount() const;
46 const Vec3f& GetPosition() const;
47 NavTagIdx GetNavTagIdx() const;
52 const NavGraphEdgeInfo& GetNavGraphEdgeInfo(
KyUInt32 neighborIdx) const;
53 NavTagIdx GetNavGraphEdgeNavTagIdx(
KyUInt32 neighborIdx) const;
57 NavTagIdx m_navTagIdx;
61 BlobArray<CompactNavGraphVertexIdx> m_neigbhorVertices;
62 BlobArray<NavGraphEdgeInfo> m_edgesInfo;
64 inline
void SwapEndianness(Endianness::Target e, NavGraphVertex& self)
66 SwapEndianness(e,
self.m_position);
67 SwapEndianness(e,
self.m_navTagIdx);
68 SwapEndianness(e,
self.m_linkType);
69 SwapEndianness(e,
self.m_neigbhorVertices);
70 SwapEndianness(e,
self.m_edgesInfo);
75 KY_INLINE
KyUInt32 NavGraphVertex::GetNeighborVertexCount()
const {
return m_neigbhorVertices.GetCount(); }
76 KY_INLINE
const Vec3f& NavGraphVertex::GetPosition()
const {
return m_position; }
77 KY_INLINE NavTagIdx NavGraphVertex::GetNavTagIdx()
const {
return m_navTagIdx; }
82 KY_ASSERT(neighborIdx < m_neigbhorVertices.GetCount());
86 KY_INLINE
const NavGraphEdgeInfo& NavGraphVertex::GetNavGraphEdgeInfo(
KyUInt32 neighborIdx)
const
88 KY_ASSERT(neighborIdx < m_edgesInfo.GetCount());
89 return m_edgesInfo.GetValues()[neighborIdx];
92 KY_INLINE NavTagIdx NavGraphVertex::GetNavGraphEdgeNavTagIdx(
KyUInt32 neighborIdx)
const {
return GetNavGraphEdgeInfo(neighborIdx).m_navTagIdx; }
97 #endif // Navigation_NavGraphVertex_H
KyUInt16 NavGraphVertexLinkType
Defines a type for a tag that determines whether or not a vertex in a NavGraph should be connected to...
Definition: navgraphtypes.h:26
KyUInt32 NavGraphVertexIdx
An index that uniquely identifies a single vertex within the set of vertices owned by a NavGraph...
Definition: navgraphtypes.h:47
static const NavGraphVertexLinkType NavGraphVertexLinkType_LinkToNavMesh
Indicates that this vertex should be connected to the NavMesh. If the vertex is outside, we try to link it inside.
Definition: navgraphtypes.h:28
#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
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36