Kaim::NavCell Class Reference

Kaim::NavCell Class Reference

#include <navcell.h>

Class Description

This class is a runtime wrapper of a NavCellBlob.

NavCells are managed by the NavCellGrid. This is the NavMesh unit it term of activation - Deactivation in term of sector and overlaps (using the parent NavMeshElement GuidCompound). It maintains, for each NavFloorBlob, an instance of NavFloor. It also maintains dynamic versions of NavFloor if present.

Functions

const CellPosGetCellPos () const
 
KyUInt32 GetNavFloorCount () const
 
NavFloorGetNavFloor (NavFloorIdx floorIdx) const
 
const GuidCompound & GetGuidCompound () const
 Returns the GuidCompound that identifies the NavMeshElement that contains this NavCell. More...
 
NavMeshElementGetParentNavMeshElement () const
 Returns a pointer to the NavMeshElement that contains this NavCell. More...
 
bool IsNavCellBlobEmpty () const
 Returns true if the NavCellBlob contains no NavFloor ie no triangle. More...
 
bool IsNavCellActive () const
 Indicates whether or not this NavCell has been considered active by the NavCellGrid in term of overlap and GuidCompound. More...
 

For internal use only

enum  ActivenessStatus
 
NavMeshElementm_parentNavMeshElement
 The NavMeshElement that contains this NavCell. Do not modify. More...
 
const NavCellBlobm_navCellBlob
 The NavCellBlob that contains the static data for this NavCell. Do not modify. More...
 
MetaNavFloor * m_metaNavFloorBuffer
 m_metaNavFloorBuffer More...
 
Ptr< DynamicNavMeshQuerym_dynamicNavMeshQuery
 
KyUInt32 m_navCellIdxInNavMesh
 The index of the NavCell within the buffer of NavCell in its NavMeshElement. Equal to the index of NavCellBlob within the NavMeshElementBlob. Do not modify. More...
 
KyUInt16 m_idxOfNavCellVersionCollection
 the idx of this NavCell in the SmallPtrTrackedCollection located at this CellPos in the NavCellGrid. For internal use. Do not modify. More...
 
KyUInt16 m_numberOfFloors
 The total number of NavFloors in m_metaNavFloorBuffer. never change. Do not modify. More...
 
KyUInt16 m_numberOfActiveDynamicFloors
 The number of dynamicNavFloors in the m_metaNavFloorBuffer buffer. Do not modify. More...
 
KyUInt8 m_currentActivenessStatus
 Current ActivenessStatus. Do not modify. More...
 
KyUInt8 m_nextActivenessStatus
 this is a temporary ActivenessStatus value used by the NavCellGrid when updating the database. For Internal Use. Do not modify. More...
 
bool m_navFloorsAreStitched
 Indicates whether or not the NavFloors in this NavCell have been stitched into a Database. For Internal Use. Do not modify. More...
 
bool m_mustLaunchRuntimStitchQuery
 
 NavCell (const NavCellBlob &navCellBlob)
 
 ~NavCell ()
 
void OnRemove ()
 
void OnDeActivate ()
 
KyUInt32 GetIndexInCollection () const
 
void SetIndexInCollection (KyUInt32 indexInCollection)
 
NavFloorGetStaticNavFloorVersion (NavFloorIdx floorIdx) const
 
void RestoreStaticNavFloorAsActive (NavFloorIdx floorIdx)
 
void SetNewDynamicVersionOfNavFloor (NavFloorIdx floorIdx, BlobHandler< NavFloorBlob > *navFloorBlobHandler)
 
ActivenessStatus GetActivenessStatus () const
 
ActivenessStatus GetNextActivenessStatus () const
 
void SetActivenessStatus (ActivenessStatus status)
 
void SetNextActivenessStatus (ActivenessStatus status)
 
const NavFloorBlobGetFutureActiveNavFloorBlob (KyUInt32 floorIdx)
 
static KyUInt32 ComputeSizeForNavCell (const NavCellBlob &navCellBlob)
 
static NavCellPlaceNavCellInBuffer (const BlobRef< NavCellBlob > &navCellRef, Database *database, NavMeshElement *navMeshElement, char *&currentMemoryPlace)
 

Member Function Documentation

const GuidCompound& Kaim::NavCell::GetGuidCompound ( ) const
inline

Returns the GuidCompound that identifies the NavMeshElement that contains this NavCell.

NavMeshElement* Kaim::NavCell::GetParentNavMeshElement ( ) const
inline

Returns a pointer to the NavMeshElement that contains this NavCell.

bool Kaim::NavCell::IsNavCellActive ( ) const
inline

Indicates whether or not this NavCell has been considered active by the NavCellGrid in term of overlap and GuidCompound.

If so, all the NavFloor (dynamic if present, static otherwise) of this NavCell are accessible from ActiveData and are used by the bots, queries, etc...

bool Kaim::NavCell::IsNavCellBlobEmpty ( ) const
inline

Returns true if the NavCellBlob contains no NavFloor ie no triangle.

Member Data Documentation

KyUInt8 Kaim::NavCell::m_currentActivenessStatus

Current ActivenessStatus. Do not modify.

KyUInt16 Kaim::NavCell::m_idxOfNavCellVersionCollection

the idx of this NavCell in the SmallPtrTrackedCollection located at this CellPos in the NavCellGrid. For internal use. Do not modify.

MetaNavFloor* Kaim::NavCell::m_metaNavFloorBuffer

m_metaNavFloorBuffer

const NavCellBlob* Kaim::NavCell::m_navCellBlob

The NavCellBlob that contains the static data for this NavCell. Do not modify.

KyUInt32 Kaim::NavCell::m_navCellIdxInNavMesh

The index of the NavCell within the buffer of NavCell in its NavMeshElement. Equal to the index of NavCellBlob within the NavMeshElementBlob. Do not modify.

bool Kaim::NavCell::m_navFloorsAreStitched

Indicates whether or not the NavFloors in this NavCell have been stitched into a Database. For Internal Use. Do not modify.

KyUInt8 Kaim::NavCell::m_nextActivenessStatus

this is a temporary ActivenessStatus value used by the NavCellGrid when updating the database. For Internal Use. Do not modify.

KyUInt16 Kaim::NavCell::m_numberOfActiveDynamicFloors

The number of dynamicNavFloors in the m_metaNavFloorBuffer buffer. Do not modify.

KyUInt16 Kaim::NavCell::m_numberOfFloors

The total number of NavFloors in m_metaNavFloorBuffer. never change. Do not modify.

NavMeshElement* Kaim::NavCell::m_parentNavMeshElement

The NavMeshElement that contains this NavCell. Do not modify.


The documentation for this class was generated from the following files:
  • gwnavruntime/navmesh/navcell.h
  • gwnavruntime/navmesh/navcell.cpp