gwnavruntime/channel/raycastinchannel.h Source File

raycastinchannel.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 #ifndef Navigation_RayCastInChannel_H
8 #define Navigation_RayCastInChannel_H
9 
11 
12 namespace Kaim
13 {
14 
15 
17 {
18  RayCastInChannel_NotInitialised,
19  RayCastInChannel_NotProcessed,
20 
22 
27 
31 };
32 
33 class RayCastInChannel
34 {
35 public:
36  RayCastInChannel();
37 
38  void Initialize(const Vec2f& startPos2f, const Channel* channel, KyUInt32 startSectionIdx, const Vec2f& maxMove2D);
39 
40  void Perform();
41 
42 private:
43  void PerformThroughNext();
44  void PerformThroughPrevious();
45  void PerformAgainstSectionBorders();
46 
47  void UpdateArrivalPos(const Vec2f& collisionPos);
48 
49  bool IsProperlyInitialized();
50 
51 
52 public:
53  const Channel* m_channel;
54 
55  Vec2f m_startPos2f;
56  KyUInt32 m_startSectionIdx;
57 
59  Vec2f m_maxMove2D;
60 
61  Vec2f m_arrivalPos2f;
62  KyUInt32 m_arrivalSectionIdx;
63 
64  RayCastInChannelResult m_result;
65 };
66 
67 
68 } // namespace Kaim
69 
70 #endif
The start position is outside the start section.
Definition: raycastinchannel.h:28
A collision is detected with Channel borders.
Definition: raycastinchannel.h:26
The Channel is not valid (it has less than 2 Gates and thus no section).
Definition: raycastinchannel.h:30
RayCastInChannelResult
Definition: raycastinchannel.h:16
Definition: gamekitcrowddispersion.h:20
The start position is inside the Channel and all Gates up to the Channel end one are correctly crosse...
Definition: raycastinchannel.h:24
The start and end positions are both inside the Channel and all Gates in-between are correctly crosse...
Definition: raycastinchannel.h:21
The start position is inside the Channel and all Gates up to the Channel start one are correctly cros...
Definition: raycastinchannel.h:23
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
The start section index is not valid (it is greater than channel section count).
Definition: raycastinchannel.h:29
A collision is detected with Channel borders.
Definition: raycastinchannel.h:25