gwnavruntime/database/activecell.h Source File

activecell.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 
11 
12 namespace Kaim
13 {
14 
15 class NavFloor;
16 
20 {
21  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavData)
22 public:
23  ActiveCell();
24  ~ActiveCell();
25  void Clear();
26  void CopyFrom(ActiveCell& other);
27 
28  // ------------------------------ Functions -----------------------------
29 
30  KyUInt32 GetActiveNavFloorsCount() const;
31  NavFloor** GetActiveNavFloorBuffer() const;
32 
33 public: // internal
34  ActiveNavFloorCollection m_activeNavFloors;
35  KyUInt32 m_navMeshChangeIdx;
36 };
37 
38 
39 KY_INLINE ActiveCell::ActiveCell() : m_navMeshChangeIdx(0) {}
40 KY_INLINE ActiveCell::~ActiveCell()
41 {
42  Clear();
43 }
44 
45 KY_INLINE KyUInt32 ActiveCell::GetActiveNavFloorsCount() const { return m_activeNavFloors.GetCount(); }
46 KY_INLINE NavFloor** ActiveCell::GetActiveNavFloorBuffer() const { return m_activeNavFloors.GetNavFloors(); }
47 
48 KY_INLINE void ActiveCell::CopyFrom(ActiveCell& other)
49 {
50  m_navMeshChangeIdx = other.m_navMeshChangeIdx;
51  m_activeNavFloors.GetOwnershipOfData(other.m_activeNavFloors);
52 }
53 
54 KY_INLINE void ActiveCell::Clear()
55 {
56  m_activeNavFloors.ForceClear();
57  m_navMeshChangeIdx = 0;
58 }
59 
60 }
61 
62 
This class is a runtime wrapper of a NavFloorBlob, it gathers all the runtime information associated ...
Definition: navfloor.h:32
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
This object gathers all the active NavFloors at a CellPos.
Definition: activecell.h:19
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17