gwnavruntime/database/activedata.h Source File

activedata.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 
12 
13 namespace Kaim
14 {
15 
16 class Database;
17 
23 {
24  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_WorldFwk)
26 
27 public: // internal
28  ActiveData(Database* database);
29  ~ActiveData();
30 
31  void Clear();
32 
33 public:
34  // ------------------------------ Functions -----------------------------
35 
38  const CellBox& GetCellBox() const;
39 
40  KyUInt32 GetNavGraphCount() const;
41  NavGraph* GetNavGraph(NavGraphIdxInActiveData idx) const;
42 
45  CellIdxInActiveData GetCellIdxInActiveDataFromCellPos(const CellPos& cellPos) const;
46 
49  CellIdxInActiveData GetCellIdxInActiveDataFromCellPos_Unsafe(const CellPos& cellPos) const;
50 
52  bool IsActiveNavFloorAtThisCellPos(const CellPos& cellPos) const;
53 
54  ActiveCell* GetActiveCellFromCellPos(const CellPos& cellPos) const;
55  ActiveCell& GetActiveCellFromCellPos_Unsafe(const CellPos& cellPos) const;
56  ActiveCell& GetActiveCellFromIndex_Unsafe(CellIdxInActiveData idxInActiveData) const;
57 
58 public: // internal
59  Database* m_database;
60 
61  ActiveCell* m_bufferOfActiveCell; /*< For internal use. Do not modify. */
62  KyUInt32 m_sizeOfCellBuffer; /*< For internal use. Do not modify. */
63 
64  KyArrayPOD<NavGraph*, MemStat_NavData> m_navGraphs; /*< For internal use. Do not modify. */
65 
66  CellBox m_cellBox; /*< A bounding box that encloses all NavCells currently added to the ActiveData. Do not modify. */
67 };
68 
69 }
70 
72 
73 
74 
75 
General purpose array for movable objects that DOES NOT require construction/destruction.
Definition: kyarray.h:194
2d axis aligned box of 32bits integers. Very Important: CountX() returns m_max.x - m_min...
Definition: box2i.h:17
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
This class gathers all the navigation data that are currently active in a Database.
Definition: activedata.h:22
bool IsActiveNavFloorAtThisCellPos(const CellPos &cellPos) const
Returns true if at least one NavFloor is active at the input CellPos.
Definition: activedata.inl:47
This object gathers all the active NavFloors at a CellPos.
Definition: activecell.h:19
CellIdxInActiveData GetCellIdxInActiveDataFromCellPos_Unsafe(const CellPos &cellPos) const
Returns the index in the buffer of ActiveCell of this CellPos.
Definition: activedata.inl:22
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:57
2d vector using KyInt32
Definition: vec2i.h:18
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
const CellBox & GetCellBox() const
Retrieves a CellBox that encloses all the navigation data in this ActiveData.
Definition: activedata.inl:18
CellIdxInActiveData GetCellIdxInActiveDataFromCellPos(const CellPos &cellPos) const
Return the index in the buffer of ActiveCell of this CellPos Returns CellIdxInActiveData_Invalid if G...
Definition: activedata.inl:31
This class is a runtime wrapper of a NavGraphBlob, it gathers all the runtime information associated ...
Definition: navgraph.h:22