gwnavruntime/queries/tagvolumesfromposquery.h Source File

tagvolumesfromposquery.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_TagVolumesFromPosQuery_H
10 #define Navigation_TagVolumesFromPosQuery_H
11 
16 
17 namespace Kaim
18 {
19 
20 class ActiveCell;
21 class NavCell;
22 class NavFloorBlob;
23 template <class T> class WorkingMemArray;
24 
25 
28 {
31 
34 
36 };
37 
38 
39 // Note that this query returns the TagVolumes that are integrated at runtime.
40 // Added tagVolumes that are not integrated yet or already fully deIntegrated won't be retrieved.
41 class TagVolumesFromPosQuery : public IAtomicQuery
42 {
43 public:
44  static QueryType GetStaticType() { return TypeTagVolumesFromPos; }
45  virtual QueryType GetType() const { return TypeTagVolumesFromPos; }
46 
47  // ---------------------------------- Public Member Functions ----------------------------------
48 
49  TagVolumesFromPosQuery();
50  virtual ~TagVolumesFromPosQuery() {}
51 
52  // ---------------------------------- Functions to set up the query ----------------------------------
53 
57  void BindToDatabase(Database* database);
58 
63  void Initialize(const Vec3f& pos);
64 
65  // ---------------------------------- write accessors for query parameters ----------------------------------
66 
69  void SetQueryDynamicOutput(QueryDynamicOutput* queryDynamicOutput);
70 
73  void SetPositionSpatializationRange(const PositionSpatializationRange& positionSpatializationRange);
74 
75  // ---------------------------------- Query framework functions ----------------------------------
76 
77  virtual void Advance(WorkingMemory* workingMemory);
78 
82  void PerformQuery(WorkingMemory* workingMemory = KY_NULL);
83 
84  // ---------------------------------- Accessors ----------------------------------
85 
86  TagVolumesFromPosQueryResult GetResult() const;
87  const Vec3f& GetInputPos() const;
88  QueryDynamicOutput* GetQueryDynamicOutput() const;
89 
90  const PositionSpatializationRange& GetPositionSpatializationRange() const;
91 
92 public: // internal
93  void SetInputIntegerPos(const WorldIntegerPos& integerPos);
94  const WorldIntegerPos& GetInputIntegerPos() const;
95  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
96 
97 private :
98  void SetResult(TagVolumesFromPosQueryResult result);
99  void GetTagVolumesFromPos(WorkingMemory* workingMemory);
100 
101 private:
102  WorldIntegerPos m_inputIntegerPos;
103 
104  Vec3f m_inputPos3f;
105 
110  Ptr<QueryDynamicOutput> m_queryDynamicOutput;
111 
112  PositionSpatializationRange m_positionSpatializationRange;
113 
115 };
116 
117 }
118 
120 
121 
122 
123 #endif //Navigation_TagVolumesFromPosQuery_H
124 
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: tagvolumesfromposquery.h:32
Indicates that insufficient working memory caused the query to stop.
Definition: tagvolumesfromposquery.h:33
#define KY_NULL
Null value.
Definition: types.h:247
Indicates the query has not yet been initialized.
Definition: tagvolumesfromposquery.h:29
QueryType
Enumerates all the type of query.
Definition: iquery.h:29
TagVolumesFromPosQueryResult
Enumerates the possible results of a TagVolumesFromPosQuery.
Definition: tagvolumesfromposquery.h:27
Definition: gamekitcrowddispersion.h:20
Indicates that the query was completed successfully; a triangle was found.
Definition: tagvolumesfromposquery.h:35
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
Indicates the query has not yet been launched.
Definition: tagvolumesfromposquery.h:30
Indicates that the query has not yet been launched.
Definition: iquery.h:347
void Initialize()
Should be called by the derived class before trying to perform the query or to push it in a QueryQueu...
Definition: iquery.h:372