gwnavruntime/queries/pathfrompolylinequery.h Source File

pathfrompolylinequery.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_PathFromPolylineQuery_H
10 #define Navigation_PathFromPolylineQuery_H
11 
15 #include "gwnavruntime/path/path.h"
17 
18 
19 namespace Kaim
20 {
21 
22 template<class TraverseLogic>
23 class PathFromPolylineQuery : public BasePathFromPolylineQuery
24 {
25 public:
26 
27  // ---------------------------------- Public Member Functions ----------------------------------
28 
29  PathFromPolylineQuery();
30  virtual ~PathFromPolylineQuery();
31 
32  // ---------------------------------- Functions to set up the query ----------------------------------
33 
37  void BindToDatabase(Database* database);
38 
42  void Initialize(const Vec3f* vertexBuffer, KyUInt32 vertexCount);
43 
44  // ---------------------------------- write accessors for query parameters ----------------------------------
45 
48  void SetPositionSpatializationRange(const PositionSpatializationRange& positionSpatializationRange);
49 
50  // ---------------------------------- Query framework functions ----------------------------------
51 
54  virtual void Advance(WorkingMemory* workingMemory);
55 
56  virtual void ReleaseWorkingMemoryOnCancelDuringProcess(WorkingMemory* workingMemory = KY_NULL);
57 
58  // ---------------------------------- Accessors ----------------------------------
59  PathFromPolylineQueryResult GetResult() const;
60  Path* GetPath() const;
61  const Vec3f& GetStartPos() const;
62  const KyArrayPOD<Vec3f>& GetPolyline() const;
63 
64  const PositionSpatializationRange& GetPositionSpatializationRange() const;
65 
66 public: //Internal
67  bool HasNavDataChanged();
68  KyResult FirstStepOfClamperContextInit(WorkingMemory* workingMemory);
69  KyResult PathClamperContextInitStep(WorkingMemory* workingMemory);
70 protected:
71  void SetFinish(WorkingMemory* workingMemory);
72 
73  KyResult CheckNavDataChange(WorkingMemory* workingMemory);
74  bool HasExplorationReachedDestNode();
75 };
76 
77 }
78 
80 
81 #endif //Navigation_PathFromPolylineQuery_H
82 
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
PathFromPolylineQueryResult
Enumerates the possible results of an PathFromPolylineQuery.
Definition: basepathfrompolylinequery.h:25
#define KY_NULL
Null value.
Definition: types.h:247
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
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:404