gwnavruntime/queries/tagvolumesfromposquery.h Source File

tagvolumesfromposquery.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 
8 #pragma once
9 
14 
15 namespace Kaim
16 {
17 
18 class ActiveCell;
19 class NavCell;
20 class NavFloorBlob;
21 template <class T> class WorkingMemArray;
22 
23 
26 {
29 
32 
34 };
35 
36 
37 // Note that this query returns the TagVolumes that are integrated at runtime.
38 // Added tagVolumes that are not integrated yet or already fully deIntegrated won't be retrieved.
39 class TagVolumesFromPosQuery : public IAtomicQuery
40 {
41 public:
42  static QueryType GetStaticType() { return TypeTagVolumesFromPos; }
43  virtual QueryType GetType() const { return TypeTagVolumesFromPos; }
44 
45  // ------------------------------ Functions -----------------------------
46 
47  TagVolumesFromPosQuery();
48  virtual ~TagVolumesFromPosQuery() {}
49 
50  // ---------------------------------- Functions to set up the query ----------------------------------
51 
55  void BindToDatabase(Database* database);
56 
61  void Initialize(const Vec3f& pos);
62 
63  // ---------------------------------- write accessors for query parameters ----------------------------------
64 
67  void SetQueryDynamicOutput(QueryDynamicOutput* queryDynamicOutput);
68 
71  void SetPositionSpatializationRange(const PositionSpatializationRange& positionSpatializationRange);
72 
73  // ---------------------------------- Query framework functions ----------------------------------
74 
75  virtual void Advance(WorkingMemory* workingMemory);
76 
78  void PerformQuery(WorkingMemory* workingMemory = nullptr);
79 
80  // ---------------------------------- Accessors ----------------------------------
81 
82  TagVolumesFromPosQueryResult GetResult() const;
83  const Vec3f& GetInputPos() const;
84  QueryDynamicOutput* GetQueryDynamicOutput() const;
85 
86  const PositionSpatializationRange& GetPositionSpatializationRange() const;
87 
88 public: // internal
89  void SetInputIntegerPos(const WorldIntegerPos& integerPos);
90  const WorldIntegerPos& GetInputIntegerPos() const;
91  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
92 
93 private:
94  void SetResult(TagVolumesFromPosQueryResult result);
95  void GetTagVolumesFromPos(WorkingMemory* workingMemory);
96 
97 private:
98  WorldIntegerPos m_inputIntegerPos;
99 
100  Vec3f m_inputPos3f;
101 
106  Ptr<QueryDynamicOutput> m_queryDynamicOutput;
107 
108  PositionSpatializationRange m_positionSpatializationRange;
109 
111 };
112 
113 }
114 
116 
117 
118 
119 
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: tagvolumesfromposquery.h:30
Indicates that insufficient working memory caused the query to stop.
Definition: tagvolumesfromposquery.h:31
Indicates the query has not yet been initialized.
Definition: tagvolumesfromposquery.h:27
QueryType
Enumerates all the type of query.
Definition: iquery.h:25
TagVolumesFromPosQueryResult
Enumerates the possible results of a TagVolumesFromPosQuery.
Definition: tagvolumesfromposquery.h:25
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Indicates that the query was completed successfully; a triangle was found.
Definition: tagvolumesfromposquery.h:33
Indicates that the query has not yet been initialized.
Definition: iquery.h:295
Indicates the query has not yet been launched.
Definition: tagvolumesfromposquery.h:28
Indicates that the query has not yet been launched.
Definition: iquery.h:296
void Initialize()
Should be called by the derived class prior to perform the query or to push it in a QueryQueue...
Definition: iquery.h:220