gwnavruntime/pathfollower/splinetrajectoryblob.h Source File

splinetrajectoryblob.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 // primary contact: MAMU - secondary contact: NOBODY
9 
10 #ifndef Navigation_SplineTrajectory_Blob_H
11 #define Navigation_SplineTrajectory_Blob_H
12 
19 
20 namespace Kaim
21 {
22 
23 class SplineTrajectory;
24 class Bot;
25 
26 
27 class SplineTrajectoryBlob
28 {
29  KY_ROOT_BLOB_CLASS(Runtime, SplineTrajectoryBlob, 1)
30 
31 public:
32  SplineTrajectoryBlob() {}
33 
34 public:
35  KyUInt32 m_visualDebugId;
36  CircleArcSplineBlob m_spline;
37 
38  PositionOnCircleArcSplineBlob m_positionOnSpline;
39  PositionOnCircleArcSplineBlob m_targetOnSpline;
40 
41  PositionOnCircleArcSplineBlob m_splineCutPosition_ThisFrame;
42  PositionOnCircleArcSplineBlob m_splineCutPosition_WhenSplineRequested;
43 
44  KyUInt32 m_currentChannelIdx;
45  KyUInt32 m_currentSectionIdx;
46 
47  KyUInt8 m_currentBotPosInChannelIsValid; // true if has a current channelIndex (m_currentChannelIdx, m_currentSectionIdx are valid)
48  KyUInt8 m_computationMode; // cf enum SplineComputationMode
49 
50  BlobArray<char> m_currentSplineRadiusProfileName;
51 };
52 
53 inline void SwapEndianness(Endianness::Target e, SplineTrajectoryBlob& self)
54 {
55  SwapEndianness(e, self.m_visualDebugId);
56  SwapEndianness(e, self.m_spline);
57  SwapEndianness(e, self.m_positionOnSpline);
58  SwapEndianness(e, self.m_targetOnSpline);
59  SwapEndianness(e, self.m_splineCutPosition_ThisFrame);
60  SwapEndianness(e, self.m_splineCutPosition_WhenSplineRequested);
61  SwapEndianness(e, self.m_currentChannelIdx);
62  SwapEndianness(e, self.m_currentSectionIdx);
63  SwapEndianness(e, self.m_currentBotPosInChannelIsValid);
64  SwapEndianness(e, self.m_computationMode);
65  SwapEndianness(e, self.m_currentSplineRadiusProfileName);
66 }
67 
68 class SplineTrajectoryBlobBuilder : public BaseBlobBuilder<SplineTrajectoryBlob>
69 {
70  KY_CLASS_WITHOUT_COPY(SplineTrajectoryBlobBuilder)
71 
72 public:
73  SplineTrajectoryBlobBuilder(const SplineTrajectory* splineTrajectory)
74  : m_splineTrajectory(splineTrajectory)
75  {}
76 
77  virtual void DoBuild();
78 
79 private:
80  const SplineTrajectory* m_splineTrajectory;
81 };
82 
83 } // namespace Kaim
84 
85 #endif
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
unsigned char KyUInt8
Type used internally to represent an unsigned 8-bit integer.
Definition: types.h:41
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36