gwnavruntime/database/activecell.h Source File

activecell.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 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 
8 // ---------- Primary contact: JUBA - secondary contact: NOBODY
9 #ifndef Navigation_ActiveCell_H
10 #define Navigation_ActiveCell_H
11 
14 
15 namespace Kaim
16 {
17 
18 class NavFloor;
19 
22 class ActiveCell
23 {
24  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavData)
25 public:
26  ActiveCell();
27  ~ActiveCell();
28  void Clear();
29  void CopyFrom(ActiveCell& other);
30 
31  // ---------------------------------- Public Member Functions ----------------------------------
32 
33  KyUInt32 GetActiveNavFloorsCount() const;
34  NavFloor** GetActiveNavFloorBuffer() const;
35 
36 public : // Internal
37  ActiveNavFloorCollection m_activeNavFloors;
38  KyUInt32 m_navDataChangeIdx;
39 };
40 
41 
42 KY_INLINE ActiveCell::ActiveCell() : m_navDataChangeIdx(0) {}
43 KY_INLINE ActiveCell::~ActiveCell()
44 {
45  Clear();
46 }
47 
48 KY_INLINE KyUInt32 ActiveCell::GetActiveNavFloorsCount() const { return m_activeNavFloors.GetCount(); }
49 KY_INLINE NavFloor** ActiveCell::GetActiveNavFloorBuffer() const { return m_activeNavFloors.GetNavFloors(); }
50 
51 KY_INLINE void ActiveCell::CopyFrom(ActiveCell& other)
52 {
53  m_navDataChangeIdx = other.m_navDataChangeIdx;
54  m_activeNavFloors.GetOwnershipOfData(other.m_activeNavFloors);
55 }
56 
57 KY_INLINE void ActiveCell::Clear()
58 {
59  m_activeNavFloors.ForceClear();
60  m_navDataChangeIdx = 0;
61 }
62 
63 }
64 
65 #endif //Navigation_ActiveCell_H
66 
This class is a runtime wrapper of a NavFloorBlob, it gathers all the runtime information associated ...
Definition: navfloor.h:40
This object gathers all the active NavFloors at a CellPos.
Definition: activecell.h:23
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