89 class PixelAndCellGrid
91 typedef GridUtils Utils;
98 m_nbPixelsOnCellSide = 0;
99 m_pixelEnlargement = 0;
100 m_coordEnlargement = 0;
109 m_nbPixelsOnCellSide = cellSizeInPixel;
111 m_pixelSize = IntCoordSystem::IntPixelSize();
112 m_cellSize = m_pixelSize * m_nbPixelsOnCellSide;
114 m_pixelEnlargement = pixelEnlargement;
115 m_coordEnlargement = m_pixelEnlargement * m_pixelSize;
121 PixelCoord LowPixelCoord (Coord coord)
const {
return Utils::LowSquare (m_pixelSize, coord); }
122 PixelCoord HighPixelCoord(Coord coord)
const {
return Utils::HighSquare(m_pixelSize, coord); }
125 Coord MinCoordOfPixel(PixelCoord pixelCoord)
const {
return Utils::MinCoord(m_pixelSize, pixelCoord); }
126 Coord MaxCoordOfPixel(PixelCoord pixelCoord)
const {
return Utils::MaxCoord(m_pixelSize, pixelCoord); }
129 void LowPixelPos (
const CoordPos& coordPos, PixelPos& pixelPos)
const {
return Utils::LowSquare (m_pixelSize, coordPos, pixelPos); }
130 void HighPixelPos(
const CoordPos& coordPos, PixelPos& pixelPos)
const {
return Utils::HighSquare(m_pixelSize, coordPos, pixelPos); }
133 void MinCoordPosOfPixel(
const PixelPos& pixelPos,
CoordPos& coordPos)
const { Utils::MinCoordPos(m_pixelSize, pixelPos, coordPos); }
134 void MaxCoordPosOfPixel(
const PixelPos& pixelPos,
CoordPos& coordPos)
const { Utils::MaxCoordPos(m_pixelSize, pixelPos, coordPos); }
139 void PixelPos_To_CellPos(
const PixelPos& pixelPos,
CellPos& cellPos)
const { Utils::BigSquarePos(m_nbPixelsOnCellSide, pixelPos, cellPos); }
143 void CoordBox_To_PixelBox(
const CoordBox& coordBox, PixelBox& pixelBox)
const { Utils::SquareBox(m_pixelSize, coordBox, pixelBox); }
144 void PixelBox_To_CoordBox(
const PixelBox& pixelBox,
CoordBox& coordBox)
const { Utils::GetCoordBox(m_pixelSize, pixelBox, coordBox); }
147 void CoordBox_To_CellBox(
const CoordBox& coordBox,
CellBox& cellBox)
const { Utils::SquareBox(m_cellSize, coordBox, cellBox); }
148 void CellBox_To_CoordBox(
const CellBox& cellBox,
CoordBox& coordBox)
const { Utils::GetCoordBox(m_cellSize, cellBox, coordBox); }
152 void PixelBox_To_CellBox(
const PixelBox& pixelBox,
CellBox& cellBox)
const { Utils::BigSquareBox(m_nbPixelsOnCellSide, pixelBox, cellBox); }
153 void CellBox_To_PixelBox(
const CellBox& cellBox, PixelBox& pixelBox)
const { Utils::SmallSquareBox(m_nbPixelsOnCellSide, cellBox, pixelBox); }
158 PixelCoord m_nbPixelsOnCellSide;
160 Coord m_coordEnlargement;
161 PixelCoord m_pixelEnlargement;
166 SwapEndianness(e,
self.m_pixelSize);
167 SwapEndianness(e,
self.m_cellSize);
168 SwapEndianness(e,
self.m_nbPixelsOnCellSide);
169 SwapEndianness(e,
self.m_coordEnlargement);
170 SwapEndianness(e,
self.m_pixelEnlargement);
Box2i CellBox
A type that represents a bounding box around cells in a 2D grid.
Definition: navmeshtypes.h:31
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:30
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Box2i CoordBox
A type that represents a bounding box in the integer 2D grid.
Definition: navmeshtypes.h:21
Vec2i CoordPos
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:20
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17