gwnavruntime/database/navtagptr.h Source File
Go to the documentation of this file.
10 #ifndef Navigation_NavTagPtr_H
11 #define Navigation_NavTagPtr_H
59 const NavTag* GetNavTag()
const
65 return &m_navFloorPtr->m_navTags[m_navTagIdx];
67 return &m_navGraphPtr->m_navTags[m_navTagIdx];
71 mutable Ptr<NavFloor> m_navFloorPtr;
72 mutable Ptr<NavGraph> m_navGraphPtr;
73 NavTagIdx m_navTagIdx;
79 if (navTrianglePtr.IsValid())
81 m_navFloorPtr = navTrianglePtr.GetNavFloor();
82 m_navTagIdx = navTrianglePtr.GetNavFloorBlob_Unsafe()->NavTriangleIdxToNavConnexIdx(navTrianglePtr.GetTriangleIdx());
87 if (navGraphEdgePtr.IsValid())
89 m_navGraphPtr = navGraphEdgePtr.GetNavGraph();
90 m_navTagIdx = navGraphEdgePtr.GetNavGraphBlob_UnSafe()->GetNavGraphEdgeNavTagIdx(navGraphEdgePtr.m_edgeSmartIdx);
95 if (navGraphVertexPtr.IsValid())
97 m_navGraphPtr = navGraphVertexPtr.GetNavGraph();
98 m_navTagIdx = navGraphVertexPtr.GetNavGraphBlob_UnSafe()->GetNavGraphVertexNavTagIdx(navGraphVertexPtr.GetNavGraphVertexIdx());
105 KY_INLINE
bool NavTagPtr::operator==(
const NavTagPtr& rhs)
const {
return m_navFloorPtr == rhs.m_navFloorPtr && m_navGraphPtr == rhs.m_navGraphPtr && m_navTagIdx == rhs.m_navTagIdx; }
106 KY_INLINE
bool NavTagPtr::operator!=(
const NavTagPtr& rhs)
const {
return m_navFloorPtr != rhs.m_navFloorPtr || m_navGraphPtr != rhs.m_navGraphPtr || m_navTagIdx != rhs.m_navTagIdx; }
110 #endif //Navigation_NavTagPtr_H
#define KY_NULL
Null value.
Definition: types.h:247
Each instance of this class uniquely identifies a single NavFloor.
Definition: navtagptr.h:26
bool operator!=(const NavTagPtr &rhs) const
Definition: navtagptr.h:119
Definition: gamekitcrowddispersion.h:20
Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.
Definition: navgraphvertexptr.h:22
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
bool IsValid() const
Definition: navtagptr.h:116
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
NavTagPtr()
Creates an invalid NavTagPtr.
Definition: navtagptr.h:89
Each instance of this class uniquely identifies a single and mono-directionnal NavGraphEdge in a NavG...
Definition: navgraphedgeptr.h:25
void Invalidate()
Invalidates this object.
Definition: navtagptr.h:115
bool operator==(const NavTagPtr &rhs) const
Definition: navtagptr.h:118