gwnavruntime/queries/diskexpansionquery.h Source File

diskexpansionquery.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 // Primary contact: JUBA - secondary contact: NOBODY
8 #ifndef Navigation_DiskExpansionQuery_H
9 #define Navigation_DiskExpansionQuery_H
10 
15 
16 namespace Kaim
17 {
18 
24 template<class TraverseLogic>
26 {
27 public:
28  // ---------------------------------- Public Member Functions ----------------------------------
29 
31  ~DiskExpansionQuery() {}
32 
33  // ---------------------------------- Functions to set up the query ----------------------------------
34 
38  void BindToDatabase(Database* database);
39 
45  void Initialize(const Vec3f& center, KyFloat32 radiusMax);
46 
47  // ---------------------------------- write accessors for query inputs ----------------------------------
48 
52  void SetCenterTrianglePtr(const NavTrianglePtr& centerTrianglePtr);
53 
56  void SetQueryDynamicOutput(QueryDynamicOutput* queryDynamicOutput);
57 
58  // ---------------------------------- write accessors for query parameters ----------------------------------
59 
62  void SetPositionSpatializationRange(const PositionSpatializationRange& positionSpatializationRange);
63 
66  void SetSafetyDist(KyFloat32 safetyDist);
67 
70  void SetDynamicOutputMode(DynamicOutputMode savingMode);
71 
72  // ---------------------------------- Query framework functions ----------------------------------
73 
74  virtual void Advance(WorkingMemory* workingMemory);
75 
79  void PerformQuery(WorkingMemory* workingMemory = KY_NULL);
80 
81  // ---------------------------------- Accessors ----------------------------------
82 
83  DiskExpansionQueryResult GetResult() const;
84  const Vec3f& GetCenterPos() const;
85  const NavTrianglePtr& GetCenterTrianglePtr() const;
86  KyFloat32 GetRadiusMax() const;
87  KyFloat32 GetResultRadius() const;
88  const Vec3f& GetCollisionPos() const;
89  const NavHalfEdgePtr& GetCollisionNavHalfEdgePtr() const;
90  KyFloat32 GetSafetyDist() const;
91  DynamicOutputMode GetDynamicOutputMode() const;
92  QueryDynamicOutput* GetQueryDynamicOutput() const;
93 
94  const PositionSpatializationRange& GetPositionSpatializationRange() const;
95 
96 public : // internal
97  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
98  void SetCenterIntegerPos(const WorldIntegerPos& centerIntegerPos);
99  const WorldIntegerPos& GetCenterIntegerPos() const;
100 };
101 
102 }
103 
105 
106 
107 
108 #endif //Navigation_DiskCollisionQuery_H
109 
void SetQueryDynamicOutput(QueryDynamicOutput *queryDynamicOutput)
Write accessor for m_queryDynamicOutput.
Definition: diskexpansionquery.inl:38
void SetCenterTrianglePtr(const NavTrianglePtr &centerTrianglePtr)
The NavMesh triangle that corresponds to m_centerPos3f.
Definition: diskexpansionquery.inl:30
void PerformQuery(WorkingMemory *workingMemory=0)
Performs the query.
Definition: diskexpansionquery.inl:80
The DiskExpansionQuery class attempts to place the center of a disk at a specified position (m_center...
Definition: diskexpansionquery.h:25
This class gather the data encountered along some query process.
Definition: querydynamicoutput.h:61
void SetSafetyDist(KyFloat32 safetyDist)
Write accessor for m_safetyDist.
Definition: diskexpansionquery.inl:34
#define KY_NULL
Null value.
Definition: types.h:247
DiskExpansionQueryResult
Enumerates the possible results of a DiskExpansionQuery.
Definition: basediskexpansionquery.h:22
DynamicOutputMode
Enumerates possible ways of storing crossed data from a query in a QueryDynamicOutput object...
Definition: querydynamicoutput.h:26
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
Base class for DiskExpansionQuery.
Definition: basediskexpansionquery.h:38
Definition: gamekitcrowddispersion.h:20
void BindToDatabase(Database *database)
Binds the query with the specified Database, clears all the inputs and outputs and sets all other par...
Definition: diskexpansionquery.inl:18
Utilities for dealing with NavData coordinates, which are expressed in a world space based on integer...
Definition: worldintegerpos.h:21
void SetPositionSpatializationRange(const PositionSpatializationRange &positionSpatializationRange)
Write accessor for m_positionSpatializationRange.
Definition: diskexpansionquery.inl:41
Each instance of this class uniquely identifies a single NavHalfEdge in a NavFloor.
Definition: navhalfedgeptr.h:19
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.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
void SetDynamicOutputMode(DynamicOutputMode savingMode)
Write accessor for m_dynamicOutputMode.
Definition: diskexpansionquery.inl:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: diskexpansionquery.inl:72