gwnavruntime/pathfollower/navtagmovepositiononpathpredicate.h Source File

navtagmovepositiononpathpredicate.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 
10 
11 namespace Kaim
12 {
13 
14 class NavTag;
15 class DynamicNavTag;
16 
19 {
20 public:
21  // ------------------------------ Functions -----------------------------
22 
23  NavTagMovePositionOnPathPredicate(const NavTag* navTag) : m_navTag(navTag) {}
24 
27  virtual bool CanMoveForward(PositionOnLivePath& positionOnLivePath);
28  virtual bool CanMoveBackward(PositionOnLivePath& positionOnLivePath);
29 
30 
31  // ---------------------------------- Public Data Members ----------------------------------
32 
34  const NavTag* m_navTag;
35 };
36 
37 
41 template<class TNavTag>
43 {
44 public:
45  // ------------------------------ Functions -----------------------------
46 
47  MoveToNavTagEntryPositionOnPathPredicate(const TNavTag* navTag) : m_navTag(navTag) {}
48 
49  virtual bool CanMoveForward(PositionOnLivePath& positionOnLivePath);
50 
51  virtual bool CanMoveBackward(PositionOnLivePath& positionOnLivePath);
52 
53  bool IsAtNavTagEntry(PositionOnLivePath& positionOnLivePath);
54 
55  // ---------------------------------- Public Data Members ----------------------------------
56 
58  const TNavTag* m_navTag;
59 };
60 
64 template<class TNavTag>
66 {
67 public:
68  // ------------------------------ Functions -----------------------------
69 
70  MoveToNavTagExitPositionOnPathPredicate(const TNavTag* navTag) : m_navTag(navTag) {}
71 
72  virtual bool CanMoveForward(PositionOnLivePath& positionOnLivePath);
73  virtual bool CanMoveBackward(PositionOnLivePath& positionOnLivePath);
74 
75  bool IsAtNavTagExit(PositionOnLivePath& positionOnLivePath);
76 
77  // ---------------------------------- Public Data Members ----------------------------------
78 
80  const TNavTag* m_navTag;
81 };
82 
83 } // namespace Kaim
84 
const TNavTag * m_navTag
The NavTag the PositionOnPath is allowed to move on.
Definition: navtagmovepositiononpathpredicate.h:80
const TNavTag * m_navTag
The NavTag the PositionOnPath is allowed to move on.
Definition: navtagmovepositiononpathpredicate.h:58
Interface used to verify a PositionOnPath can be moved forward along the Path.
Definition: imovepositiononpathpredicate.h:17
This predicates allows Move forward to next entry or backward to previous entry of the given NavTag...
Definition: navtagmovepositiononpathpredicate.h:65
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
const NavTag * m_navTag
The NavTag the PositionOnPath is allowed to move on.
Definition: navtagmovepositiononpathpredicate.h:34
This predicates allows Move forward to next entry or backward to previous entry of the given NavTag...
Definition: navtagmovepositiononpathpredicate.h:42
This class aggregates all necessary information to describe a position on a LivePath, namely:
Definition: positiononlivepath.h:43
Default implementation of IMovePositionOnPathPredicate interface based on NavTag. ...
Definition: navtagmovepositiononpathpredicate.h:18
virtual bool CanMoveForward(PositionOnLivePath &positionOnLivePath)
Definition: navtagmovepositiononpathpredicate.cpp:15