gwnavgeneration/navraster/navrastercell.h Source File
Go to the documentation of this file.
9 #ifndef GwNavGen_NavRasterCell_H
10 #define GwNavGen_NavRasterCell_H
35 PixelColor m_floorColor;
51 NavRasterFloorIdx m_neighborFloorIdx[4];
57 SwapEndianness(e,
self.m_altitude);
58 SwapEndianness(e,
self.m_floorColor);
59 SwapEndianness(e,
self.m_connexIdx);
60 SwapEndianness(e,
self.m_navTagIdx);
61 SwapEndianness(e,
self.m_connectedComponentIdx);
62 SwapEndianness(e,
self.m_neighborFloorIdx[0]);
63 SwapEndianness(e,
self.m_neighborFloorIdx[1]);
64 SwapEndianness(e,
self.m_neighborFloorIdx[2]);
65 SwapEndianness(e,
self.m_neighborFloorIdx[3]);
66 SwapEndianness(e,
self.m_currentPropagationId);
75 BlobArray<NavRasterPixel> m_navRasterPoints;
79 SwapEndianness(e,
self.m_navRasterPoints);
85 KY_ROOT_BLOB_CLASS(Generator, NavRasterCell, 1)
88 PixelAndCellGrid m_pixelAndCellGrid;
90 BlobArray<NavRasterColumn> m_columns;
92 inline
void SwapEndianness(Endianness::Target e, NavRasterCell& self)
94 SwapEndianness(e,
self.m_rasterPrecision);
95 SwapEndianness(e,
self.m_pixelAndCellGrid);
96 SwapEndianness(e,
self.m_cellDesc);
97 SwapEndianness(e,
self.m_columns);
100 KY_INLINE NavRasterPixel::NavRasterPixel() :
102 m_floorColor(PixelColor_Unset),
106 m_featureBitField(0),
110 m_neighborFloorIdx[i] = NavRasterFloorIdx_Invalid;
113 KY_INLINE
KyUInt32 NavRasterPixel::GetNeighborFloorIndex(
CardinalDir dir)
const {
return m_neighborFloorIdx[dir]; }
124 return ((0xFF << bitshift) & m_featureBitField) >> bitshift;
129 return ((0xFF << bitshift) & m_featureBitField) >> bitshift;
134 return ((0xFF << bitshift) & m_featureBitField) >> bitshift;
139 return ((0xFF << bitshift) & m_featureBitField) >> bitshift;
KyUInt32 CardinalDir
Defines a type that refers to one of the cardinal points on the compass:
Definition: cardinaldir.h:23
#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
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43