gwnavruntime/channel/raycastinchannel.h Source File

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