gwnavruntime/queries/multiplefloortrianglesfromposquery.h Source File

multiplefloortrianglesfromposquery.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 
18 {
21 
24 
26 };
27 
30 {
35 };
36 
42 {
43 public:
44  // ------------------------------ Functions -----------------------------
45 
46  static QueryType GetStaticType() { return TypeMultipleFloorTrianglesFromPos; }
47  virtual QueryType GetType() const { return TypeMultipleFloorTrianglesFromPos; }
48 
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 inputs ----------------------------------
66 
69  void SetQueryDynamicOutput(QueryDynamicOutput* queryDynamicOutput);
70 
71  // ---------------------------------- write accessors for query parameters ----------------------------------
72 
76 
77  // ---------------------------------- Query framework functions ----------------------------------
78 
79  virtual void Advance(WorkingMemory* workingMemory);
80 
82  void PerformQuery(WorkingMemory* workingMemory = nullptr);
83 
84  // ---------------------------------- Accessors ----------------------------------
85 
87  const Vec3f& GetInputPos() const;
88  MultipleFloorTrianglesFromPosQueryType GetQueryType() const;
89  QueryDynamicOutput* GetQueryDynamicOutput() const;
90 
91 public: // internal
92  void SetInputIntegerPos(const WorldIntegerPos& integerPos);
93  const WorldIntegerPos& GetInputIntegerPos() const;
94  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
95 
96 private:
97  void SetResult(MultipleFloorTrianglesFromPosQueryResult result);
98 
99 private:
100  WorldIntegerPos m_inputIntegerPos;
101 
103 
109 
111 
116  Ptr<QueryDynamicOutput> m_queryDynamicOutput;
117 };
118 
119 }
120 
122 
123 
124 
void SetQueryType(MultipleFloorTrianglesFromPosQueryType queryType)
Write accessor for m_queryType.
Definition: multiplefloortrianglesfromposquery.inl:51
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: multiplefloortrianglesfromposquery.inl:44
Ptr< QueryDynamicOutput > m_queryDynamicOutput
A ref-counted Ptr to a QueryDynamicOutput instance, used to store the data encountered during the que...
Definition: multiplefloortrianglesfromposquery.h:116
The MultipleFloorTrianglesFromPosQuery class takes a position m_inputPos3f, and finds the triangles i...
Definition: multiplefloortrianglesfromposquery.h:41
Indicates the query was completed successfully, as at least one triangle was found.
Definition: multiplefloortrianglesfromposquery.h:25
Base class for all the queries that do not need to be time-sliced.
Definition: iquery.h:245
MultipleFloorTrianglesFromPosQueryResult m_result
Updated during processing to indicate the result of the query.
Definition: multiplefloortrianglesfromposquery.h:110
void PerformQuery(WorkingMemory *workingMemory=nullptr)
If workingMemory param is nullptr, m_database.GetWorkingMemory() will be used.
Definition: multiplefloortrianglesfromposquery.cpp:18
MultipleFloorTrianglesFromPosQueryType m_queryType
An element from the MultipleFloorTrianglesFromPosQueryType enumeration that indicates whether to look...
Definition: multiplefloortrianglesfromposquery.h:108
void BindToDatabase(Database *database)
Binds the query with the specified Database, clears all the inputs and outputs and sets all other par...
Definition: multiplefloortrianglesfromposquery.inl:16
Retrieves the first triangle that lies above the point provided, and the first triangle that lies bel...
Definition: multiplefloortrianglesfromposquery.h:34
void SetQueryDynamicOutput(QueryDynamicOutput *queryDynamicOutput)
Write accessor for m_queryDynamicOutput.
Definition: multiplefloortrianglesfromposquery.inl:53
QueryType
Enumerates all the type of query.
Definition: iquery.h:25
Vec3f m_inputPos3f
input position
Definition: multiplefloortrianglesfromposquery.h:102
MultipleFloorTrianglesFromPosQueryResult
Enumerates the possible results of a MultipleFloorTrianglesFromPosQuery.
Definition: multiplefloortrianglesfromposquery.h:17
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
MultipleFloorTrianglesFromPosQueryType
Enumerates the possible ways that a MultipleFloorTrianglesFromPosQuery chooses which triangles to ret...
Definition: multiplefloortrianglesfromposquery.h:29
Indicates the query has not yet been launched.
Definition: multiplefloortrianglesfromposquery.h:20
virtual QueryType GetType() const
Get query type.
Definition: multiplefloortrianglesfromposquery.h:47
Retrieves all triangles that lie above the point provided.
Definition: multiplefloortrianglesfromposquery.h:33
Indicates that the query has not yet been initialized.
Definition: iquery.h:295
Retrieves all triangles at the same (x,y) coordinates as the point provided, regardless of whether th...
Definition: multiplefloortrianglesfromposquery.h:31
Indicates the query was completed successfully, but not all the triangles found have been stored beca...
Definition: multiplefloortrianglesfromposquery.h:23
Indicates that the query has not yet been launched.
Definition: iquery.h:296
Indicates the query has not yet been initialized.
Definition: multiplefloortrianglesfromposquery.h:19
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
Retrieves all triangles that lie below the point provided.
Definition: multiplefloortrianglesfromposquery.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: multiplefloortrianglesfromposquery.h:22