gwnavgamekit/gamekittraverselogic.h Source File

gamekittraverselogic.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 
9 // primary contact: BRGR - secondary contact:
10 #ifndef Navigation_GameKitTraverseLogic_H
11 #define Navigation_GameKitTraverseLogic_H
12 
15 
16 namespace Kaim
17 {
18 
19 class GameKitNavTag;
20 class GameKitWorld;
21 class GameKitNavTagLayerCostTable;
22 class GameKitSmartObjectCostTable;
23 class GameKitCrowdDispersionTraverseLogicData;
24 
25 
26 
27 class GameKitTraverseLogicData : public RefCountBase<GameKitTraverseLogicData, MemStat_GameKit>
28 {
29 
30 public:
32  GameKitTraverseLogicData();
33  ~GameKitTraverseLogicData();
34 
35  void SetLayerCostTable(Ptr<GameKitNavTagLayerCostTable> layerCostTable);
36  Ptr<GameKitNavTagLayerCostTable> GetLayerCostTable();
37 
38  void SetSmartObjectCostTable(Ptr<GameKitSmartObjectCostTable> smartObjectCostTable);
39  Ptr<GameKitSmartObjectCostTable> GetSmartObjectCostTable();
40 
41  // ------------ CrowdDispersion -------------
42 
46  void EnableCrowdDispersion(Ptr<GameKitCrowdDispersionNavTagHashMap> crowdDispersionNavTagHashMap,
47  KyFloat32 checkForAlternativePathDistance = 20.f, KyFloat32 stickToChoiceDistance = 1.f);
48 
49  GameKitCrowdDispersionTraverseLogicData* GetCrowdDispersionData() const { return m_crowdDispersionData; }
50 
51 public: //internal
52  // ------------ Used by GameKitTraverseLogic -------------
53 
54  bool CanTraverseLayer(KyUInt32 layerID, KyFloat32* costMultiplier) const;
55  bool CanTraverseSmartObject(KyUInt32 smartObjectID, KyFloat32* costMultiplier) const;
56 
57 
58 private:
59  // SmartObjects traversability
60  Ptr<GameKitSmartObjectCostTable> m_smartObjectCostTable;
61 
62  // NavTag Layers traversability
63  Ptr<GameKitNavTagLayerCostTable> m_layerCostTable;
64 
65  // CrowdDispersion
66  Ptr<GameKitCrowdDispersionTraverseLogicData> m_crowdDispersionData;
67 };
68 
70 class GameKitTraverseLogic : public TraverseLogicWithCostMultiplerPerNavTag<LogicDoNotUseCanEnterNavTag>
71 {
72 public:
73  static KyFloat32 GetHeuristicFromDistanceToDest(void* traverseLogicUserData, KyFloat32 distance3DToDestination);
74  static bool CanTraverseNavTag(void* traverseLogicUserData, const NavTag& navTag, KyFloat32* costMultiplier);
75 };
76 
77 
78 }
79 
80 #endif
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43