gwnavruntime/pathfollower/shortcuttrajectory.h Source File

shortcuttrajectory.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: LAPA - secondary contact: NOBODY
8 #ifndef Navigation_ShortcutTrajectory_H
9 #define Navigation_ShortcutTrajectory_H
10 
14 #include "gwnavruntime/world/bot.h"
19 
20 
21 namespace Kaim
22 {
23 
24 class Bot;
25 
26 
32 template<class TraverseLogic>
33 class ShortcutTrajectory : public BaseShortcutTrajectory
34 {
35  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_PathFollowing)
36 public:
37  // ---------------------------------- Public Member Functions ----------------------------------
39  : BaseShortcutTrajectory(trajectory) {}
40 
41 public: // internal
42  virtual KyResult ComputeTargetOnPath(KyFloat32 simulationTimeInSeconds);
43 
44  // Specific optimization for shortcut cf. World::SetNumberOfFramesForShortcutTrajectoryPeriodicUpdate for more details
45  virtual bool IsShortcutTrajectoryAllowingToSkipPathFollowingThisFrame(KyFloat32& simulationTimeInSeconds);
46 
47  // Used in Trajectory::CanResetTrajectory to instantiate a TargetOnPathComputer and compute a TargetOnPath calling ComputeTargetOnPathOnNavMeshOnly
48  // which disregards backward edge type, it only check forward edge type that must be on NavMesh and bot must have a valid triangle
49  virtual KyResult ComputeTargetOnPathOnNavMeshOnly(TargetOnPath& targetOnPath, KyFloat32 simulationTimeInSeconds, ComputeTargetOnPathSearchControl forwardSearchControl) const;
50 };
51 
52 
53 } // namespace Kaim
54 
56 
57 #endif // Navigation_Trajectory_H
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
This class computes minimal trajectory made of just one velocity.
Definition: baseshortcuttrajectory.h:37
Definition: gamekitcrowddispersion.h:20
This class computes minimal trajectory made of just one velocity.
Definition: shortcuttrajectory.h:34
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
This class computes the trajectory either with ShortcutTrajectory or with SplineTrajectory.
Definition: trajectory.h:30
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43