gwnavruntime/queries/multiplefloortrianglesfromposquery.h Source File

multiplefloortrianglesfromposquery.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_TrianglesFromPosQuery_H
10 #define Navigation_TrianglesFromPosQuery_H
11 
15 
16 namespace Kaim
17 {
18 
21 {
24 
27 
29 };
30 
33 {
38 };
39 
44 class MultipleFloorTrianglesFromPosQuery : public IAtomicQuery
45 {
46 public:
47  // ---------------------------------- Public Member Functions ----------------------------------
48 
49  static QueryType GetStaticType() { return TypeMultipleFloorTrianglesFromPos; }
50  virtual QueryType GetType() const { return TypeMultipleFloorTrianglesFromPos; }
51 
54 
55  // ---------------------------------- Functions to set up the query ----------------------------------
56 
60  void BindToDatabase(Database* database);
61 
66  void Initialize(const Vec3f& pos);
67 
68  // ---------------------------------- write accessors for query inputs ----------------------------------
69 
72  void SetQueryDynamicOutput(QueryDynamicOutput* queryDynamicOutput);
73 
74  // ---------------------------------- write accessors for query parameters ----------------------------------
75 
79 
80  // ---------------------------------- Query framework functions ----------------------------------
81 
82  virtual void Advance(WorkingMemory* workingMemory);
83 
87  void PerformQuery(WorkingMemory* workingMemory = KY_NULL);
88 
89  // ---------------------------------- Accessors ----------------------------------
90 
92  const Vec3f& GetInputPos() const;
93  MultipleFloorTrianglesFromPosQueryType GetQueryType() const;
94  QueryDynamicOutput* GetQueryDynamicOutput() const;
95 
96 public: // internal
97  void SetInputIntegerPos(const WorldIntegerPos& integerPos);
98  const WorldIntegerPos& GetInputIntegerPos() const;
99  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
100 
101 private:
102  void SetResult(MultipleFloorTrianglesFromPosQueryResult result);
103 
104 private:
105  WorldIntegerPos m_inputIntegerPos;
106 
108 
114 
116 
121  Ptr<QueryDynamicOutput> m_queryDynamicOutput;
122 };
123 
124 }
125 
127 
128 
129 #endif //Navigation_TrianglesFromPosQuery_H
130 
void SetQueryType(MultipleFloorTrianglesFromPosQueryType queryType)
Write accessor for m_queryType.
Definition: multiplefloortrianglesfromposquery.inl:53
This class gather the data encountered along some query process.
Definition: querydynamicoutput.h:61
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: multiplefloortrianglesfromposquery.inl:46
Ptr< QueryDynamicOutput > m_queryDynamicOutput
A ref-counted Ptr to a QueryDynamicOutput instance, used to store the data encountered during the que...
Definition: multiplefloortrianglesfromposquery.h:156
The MultipleFloorTrianglesFromPosQuery class takes a position in 3D space (m_inputPos3f), and finds the triangles in the NavMesh that lie at the same (X,Y) coordinates.
Definition: multiplefloortrianglesfromposquery.h:45
Indicates the query was completed successfully, as at least one triangle was found.
Definition: multiplefloortrianglesfromposquery.h:28
MultipleFloorTrianglesFromPosQueryResult m_result
Updated during processing to indicate the result of the query.
Definition: multiplefloortrianglesfromposquery.h:149
#define KY_NULL
Null value.
Definition: types.h:247
MultipleFloorTrianglesFromPosQueryType m_queryType
An element from the MultipleFloorTrianglesFromPosQueryType enumeration that indicates whether to look...
Definition: multiplefloortrianglesfromposquery.h:147
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:18
Instructs the query to retrieve the first triangle that lies above the point provided, and the first triangle that lies below the point provided.
Definition: multiplefloortrianglesfromposquery.h:37
void SetQueryDynamicOutput(QueryDynamicOutput *queryDynamicOutput)
Write accessor for m_queryDynamicOutput.
Definition: multiplefloortrianglesfromposquery.inl:55
QueryType
Enumerates all the type of query.
Definition: iquery.h:29
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
Vec3f m_inputPos3f
The position on the (X,Y) plane for which the triangles will be retrieved.
Definition: multiplefloortrianglesfromposquery.h:141
MultipleFloorTrianglesFromPosQueryResult
Enumerates the possible results of a MultipleFloorTrianglesFromPosQuery.
Definition: multiplefloortrianglesfromposquery.h:20
Definition: gamekitcrowddispersion.h:20
void PerformQuery(WorkingMemory *workingMemory=0)
Performs the query.
MultipleFloorTrianglesFromPosQueryType
Enumerates the possible ways that a MultipleFloorTrianglesFromPosQuery chooses which triangles to ret...
Definition: multiplefloortrianglesfromposquery.h:32
Indicates the query has not yet been launched.
Definition: multiplefloortrianglesfromposquery.h:23
Instructs the query to retrieve all triangles that lie above the point provided.
Definition: multiplefloortrianglesfromposquery.h:36
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
Instructs the query to retrieve all triangles at the same (X,Y) coordinates as the point provided...
Definition: multiplefloortrianglesfromposquery.h:34
Utilities for dealing with NavData coordinates, which are expressed in a world space based on integer...
Definition: worldintegerpos.h:21
Indicates the query was completed successfully, but not all the triangles found have been stored beca...
Definition: multiplefloortrianglesfromposquery.h:26
Indicates that the query has not yet been launched.
Definition: iquery.h:347
Indicates the query has not yet been initialized.
Definition: multiplefloortrianglesfromposquery.h:22
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
Instructs the query to retrieve all triangles that lie below the point provided.
Definition: multiplefloortrianglesfromposquery.h:35
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: multiplefloortrianglesfromposquery.h:25