gwnavruntime/queries/utils/cellfilter.h Source File

cellfilter.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 
9 #ifndef Navigation_CellFilter_H
10 #define Navigation_CellFilter_H
11 
19 #include "gwnavruntime/math/box2iiterator.h"
21 
22 namespace Kaim
23 {
24 
25 
26 class CellFilter : public RefCountBaseNTS<CellFilter, Stat_Default_Mem>
27 {
28  KY_CLASS_WITHOUT_COPY(CellFilter)
29 
30 public:
31  CellFilter();
32  ~CellFilter();
33 
34  void Clear();
35 
36  void ExpandCellBox(CellBox cellBox);
37 
38  void AddCellPos(const CellPos& cellPos);
39 
40  void AddAllPosInCellBox(CellBox cellBox);
41 
42  bool IsInFilter(const CellPos& cellPos) const;
43 
44  Ptr<CellFilter> Clone() const;
45 
46  void Display(ScopedDisplayList& displayList, const DatabaseGenMetrics& genMetrics) const;
47 
48 public: //internal
49  template <class BitFieldClass>
50  void AddCellFilter(const CellBox& cellBox, const BitFieldClass& bitField);
51 
52  template <class BitFieldClass>
53  static void Display(ScopedDisplayList& displayList, const DatabaseGenMetrics& genMetrics, const CellBox& cellBox, const BitFieldClass& cellBoxCoverage);
54 
55 public:
56  CellBox m_cellBox;
57  BitField* m_cellBoxCoverage;
58 };
59 
60 }
61 
62 #include "gwnavruntime/queries/utils/cellfilter.inl"
63 
64 #endif // Navigation_CellFilter_H
Box2i CellBox
A type that represents a bounding box around cells in a 2D grid.
Definition: navmeshtypes.h:34
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Definition: gamekitcrowddispersion.h:20