8 #ifndef Navigation_BaseNavigationProfile_H
9 #define Navigation_BaseNavigationProfile_H
31 class BaseNavigationProfile :
public RefCountBase<BaseNavigationProfile, MemStat_Bot>
36 void SetProfileId(
KyUInt32 profileId) { m_profileId = profileId; }
37 KyUInt32 GetProfileId()
const {
return m_profileId; }
40 virtual Ptr<BaseAStarQuery> CreateAStarQuery() = 0;
68 virtual Ptr<BaseRayCanGoQuery> CreateRayCanGoQuery() = 0;
71 virtual Vec3f ComputeMoveOnNavMesh(Bot* bot,
const Vec3f& velocity,
KyFloat32 simulationTimeInSeconds) = 0;
74 virtual bool HasTraverseLogicNoObsoleteFunctions()
const = 0;
82 class BotNavigation :
public RefCountBase<BotNavigation, MemStat_Bot>
87 void Init(BaseNavigationProfile* navigationProfile);
89 KyUInt32 GetProfileId() {
return m_navigationProfile->GetProfileId(); }
90 BaseNavigationProfile* GetProfile() {
return m_navigationProfile; }
92 Ptr<BaseAStarQuery> GetOrCreateAStarQuery();
93 Ptr<BasePathProgressComputer> GetOrCreatePathProgessComputer();
94 Ptr<Trajectory> GetOrCreateTrajectory(Bot* bot);
96 Vec3f ComputeMoveOnNavMesh(Bot* bot,
const Vec3f& velocity,
KyFloat32 simulationTimeInSeconds);
100 BaseNavigationProfile* m_navigationProfile;
102 Ptr<BaseAStarQuery> m_aStarQuery;
103 Ptr<BasePathProgressComputer> m_pathProgressComputer;
104 Ptr<Trajectory> m_trajectory;
108 class BotNavigationCollection
113 BotNavigationCollection() : m_navigationProfiles(
KY_NULL) {}
116 void Init(
KyArray<Ptr<BaseNavigationProfile> >* navigationProfiles) { m_navigationProfiles = navigationProfiles; }
118 Ptr<BaseAStarQuery> GetOrCreateAStarQuery(
KyUInt32 navigationProfileId);
119 Ptr<BasePathProgressComputer> GetOrCreatePathProgessComputer(
KyUInt32 navigationProfileId);
120 Ptr<Trajectory> GetOrCreateTrajectory(
KyUInt32 navigationProfileId, Bot* bot);
122 Vec3f ComputeMoveOnNavMesh(
KyUInt32 navigationProfileId, Bot* bot,
const Vec3f& velocity,
KyFloat32 simulationTimeInSeconds);
125 bool CanUseNavigationProfileId(
KyUInt32 navigationProfileId)
127 return m_navigationProfiles !=
KY_NULL && navigationProfileId < m_navigationProfiles->GetCount();
130 Ptr<BotNavigation> GetOrCreateBotNavigation(
KyUInt32 navigationProfileId);
133 KyArray<Ptr<BaseNavigationProfile> >* m_navigationProfiles;
134 KyArray<Ptr<BotNavigation> > m_botNavigations;
BaseNavigationProfile and its derivation NavigationProfile is a class that simplifies ...
Definition: basenavigationprofile.h:34
virtual Ptr< IPathEventListObserver > GetSharedPathEventListObserver()=0
IPathEventListObserver is called in BasePathProgressComputer::Update()
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:118
#define KY_NULL
Null value.
Definition: types.h:247
virtual Ptr< IAvoidanceSolver > GetSharedAvoidanceSolver()=0
AvoidanceSolver::Solve() is called in the AvoidanceComputer.
virtual Ptr< IAvoidanceFilter > GetSharedAvoidanceFilter()=0
IAvoidanceFilter::Filter() is called in the AvoidanceComputer.
virtual Ptr< Trajectory > CreateTrajectory(Bot *bot)=0
Trajectory::Compute() is called in Bot::UpdatePathFollowing() after BasePathProgressComputer::Update(...
virtual Ptr< BasePathProgressComputer > GetSharedPathProgressComputer()=0
BasePathProgressComputer::Update() is called in Bot::UpdatePathFollowing()
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
virtual Ptr< IAvoidanceComputer > GetSharedAvoidanceComputer()=0
AvoidanceComputer::Compute() is called in Trajectory::Compute()
virtual Ptr< IPositionOnPathValidator > GetSharedPositionOnPathValidator()=0
IPositionOnPathValidator is called in BasePathProgressComputer::Update()
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43