9 #ifndef Navigation_PathBlob_H
10 #define Navigation_PathBlob_H
24 KY_ROOT_BLOB_CLASS(Runtime, PathBlob, 1)
27 PathBlob() : m_pathDist(
KyFloat32MAXVAL), m_pathCost(KyFloat32MAXVAL) {}
31 BlobArray<Vec3f> m_nodePositions;
32 BlobRef<ChannelArrayBlob> m_channelArrayBlob;
36 SwapEndianness(e,
self.m_visualDebugId);
37 SwapEndianness(e,
self.m_pathDist);
38 SwapEndianness(e,
self.m_pathCost);
39 SwapEndianness(e,
self.m_nodePositions);
40 SwapEndianness(e,
self.m_channelArrayBlob);
44 class PathBlobBuilder:
public BaseBlobBuilder<PathBlob>
49 PathBlobBuilder(const Path* path): m_path(path), m_visualDebugId(0) {}
53 virtual void DoBuild()
56 if (m_path != NULL && m_path->GetNodeCount() > 0)
61 Vec3f* nodePositions =
BLOB_ARRAY(
m_blob->m_nodePositions, m_path->GetNodeCount());
65 for (
KyUInt32 i = 0; i < m_path->GetNodeCount(); ++i)
66 nodePositions[i] = m_path->GetNodePosition(i);
#define BLOB_SET(blob, value)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:136
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
#define KY_NULL
Null value.
Definition: types.h:247
#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
PathBlob * m_blob
The blob maintained by this builder. Only modify using the macros listed under DoBuild().
Definition: baseblobbuilder.h:117
Definition: gamekitcrowddispersion.h:20
bool IsWriteMode()
Indicates whether the builder is operating in COUNT mode or in WRITE mode.
Definition: baseblobbuilder.h:47
#define BLOB_ARRAY(blobArray, count)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:147
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
#define BUILD_REFERENCED_BLOB(blobRef, builder)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:197