gwnavruntime/navmesh/identifiers/stitch1to1edgelink.h Source File
Go to the documentation of this file.
18 class Stitch1To1EdgeLink
29 Stitch1To1EdgeLink(NavFloor* navFloor,
KyUInt32 stitch1To1EdgeIdx);
34 void Set(NavFloor* navFloor,
KyUInt32 stitch1To1EdgeIdx);
41 bool operator==(const Stitch1To1EdgeLink& rhs) const;
42 bool operator!=(const Stitch1To1EdgeLink& rhs) const;
50 NavFloor* GetNavFloor() const;
54 const NavFloorBlob* GetNavFloorBlob() const;
59 KyUInt16 m_correspondingOfStitch1To1Idx;
64 KY_INLINE Stitch1To1EdgeLink::Stitch1To1EdgeLink() : m_navFloor(), m_stitch1To1EdgeIdx(
KyUInt16MAXVAL), m_correspondingOfStitch1To1Idx(KyUInt16MAXVAL) {}
66 KY_INLINE Stitch1To1EdgeLink::Stitch1To1EdgeLink(NavFloor* navFloor,
NavHalfEdgeIdx stitch1To1EdgeIdx) :
67 m_navFloor(navFloor), m_stitch1To1EdgeIdx((CompactNavHalfEdgeIdx)stitch1To1EdgeIdx), m_correspondingOfStitch1To1Idx(
KyUInt16MAXVAL) {}
69 KY_INLINE
void Stitch1To1EdgeLink::Set(NavFloor* navFloor,
NavHalfEdgeIdx stitch1To1EdgeIdx)
71 m_navFloor = navFloor;
72 m_stitch1To1EdgeIdx = (CompactNavHalfEdgeIdx)stitch1To1EdgeIdx;
76 KY_INLINE
bool Stitch1To1EdgeLink::IsValid()
const {
return m_navFloor !=
nullptr && m_stitch1To1EdgeIdx !=
KyUInt16MAXVAL; }
77 KY_INLINE
void Stitch1To1EdgeLink::Invalidate() { m_navFloor =
nullptr; m_stitch1To1EdgeIdx =
KyUInt16MAXVAL; m_correspondingOfStitch1To1Idx =
KyUInt16MAXVAL; }
79 KY_INLINE
bool Stitch1To1EdgeLink::operator==(
const Stitch1To1EdgeLink& rhs)
const {
return m_navFloor == rhs.m_navFloor && m_stitch1To1EdgeIdx == rhs.m_stitch1To1EdgeIdx;}
80 KY_INLINE
bool Stitch1To1EdgeLink::operator!=(
const Stitch1To1EdgeLink& rhs)
const {
return !(*
this == rhs); }
82 KY_INLINE NavFloor* Stitch1To1EdgeLink::GetNavFloor()
const {
return m_navFloor; }
83 KY_INLINE
const NavFloorBlob* Stitch1To1EdgeLink::GetNavFloorBlob()
const {
return m_navFloor->GetNavFloorBlob(); }
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
KyUInt32 NavHalfEdgeIdx
An index that uniquely identifies a single edge of a triangle within the set of edges owned by a NavF...
Definition: navmeshtypes.h:84
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
std::uint16_t KyUInt16
uint16_t
Definition: types.h:28
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
#define KyUInt16MAXVAL
KyUInt16 max value
Definition: types.h:67