gwnavruntime/pathfollower/pathfollowerblob.h Source File

pathfollowerblob.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 
8 #pragma once
9 
15 
16 
17 namespace Kaim
18 {
19 
20 class Bot;
21 
22 class PathFollowerBlob
23 {
24  KY_ROOT_BLOB_CLASS(Runtime, PathFollowerBlob, 1)
25 
26 public:
27  KyUInt32 m_visualDebugId;
28  PositionOnLivePathBlob m_progressOnPath;
29  KyUInt8 m_progressOnPathStatus;
30  KyUInt8 m_doValidateCheckPoint;
31  KyUInt8 m_doComputeTrajectory;
32  KyUInt8 m_avoidanceResult;
33  KyUInt8 m_pathValidityStatus;
34  KyUInt8 m_trajectoryFailedToFollow;
35 
36  Vec3f m_outputVelocity;
37  Vec2f m_outputFrontDirection;
38 };
39 
40 inline void SwapEndianness(Endianness::Target e, PathFollowerBlob& self)
41 {
42  SwapEndianness(e, self.m_visualDebugId);
43  SwapEndianness(e, self.m_progressOnPath);
44  SwapEndianness(e, self.m_progressOnPathStatus);
45  SwapEndianness(e, self.m_doValidateCheckPoint);
46  SwapEndianness(e, self.m_doComputeTrajectory);
47  SwapEndianness(e, self.m_avoidanceResult);
48  SwapEndianness(e, self.m_pathValidityStatus);
49  SwapEndianness(e, self.m_trajectoryFailedToFollow);
50  SwapEndianness(e, self.m_outputVelocity);
51  SwapEndianness(e, self.m_outputFrontDirection);
52 }
53 
54 class PathFollowerBlobBuilder: public BaseBlobBuilder<PathFollowerBlob>
55 {
56  KY_CLASS_WITHOUT_COPY(PathFollowerBlobBuilder)
57 
58 public:
59  PathFollowerBlobBuilder(const Bot* bot): m_bot(bot) {}
60  ~PathFollowerBlobBuilder() {}
61 
62 private:
63  virtual void DoBuild();
64 
65  const Bot* m_bot;
66 };
67 
68 } // namespace Kaim
69 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
std::uint8_t KyUInt8
uint8_t
Definition: types.h:27