64 int xStart, xEnd, zStart,
zEnd;
91 int xStart, zStart, xEnd,
zEnd;
Represents an axis-aligned bounding box (AABB) collision volume.
Definition CollisionVolumeAABB.h:23
Represents a 3D terrain generated from a heightmap.
Definition Terrain.h:18
Iterator for traversing terrain cells in a rectangular area.
Definition TerrainRectangleArea.h:22
CollisionVolumeAABB GetCellAABB() const
Gets the AABB of the current cell.
Definition TerrainRectangleArea.cpp:51
int zEnd
Start and end indices.
Definition TerrainRectangleArea.h:64
const Terrain * pTerrain
Pointer to the terrain.
Definition TerrainRectangleArea.h:62
std::pair< int, int > GetCellIndices() const
Gets the indices of the current cell.
Definition TerrainRectangleArea.cpp:57
Iterator & operator++()
Advances the iterator to the next cell.
Definition TerrainRectangleArea.cpp:33
int currZ
Current cell indices.
Definition TerrainRectangleArea.h:63
bool operator!=(const Iterator &other) const
Checks if two iterators are not equal.
Definition TerrainRectangleArea.cpp:45
Iterator(const Terrain *terrain, int xStart, int xEnd, int zStart, int zEnd, int x, int z)
Constructs an iterator.
Definition TerrainRectangleArea.cpp:27
Iterator begin() const
Returns an iterator to the beginning of the area.
Definition TerrainRectangleArea.cpp:11
int zEnd
Start and end indices.
Definition TerrainRectangleArea.h:91
TerrainRectangleArea(const Terrain *terrain, int xStart, int zStart, int xEnd, int zEnd)
Constructs a rectangular area for iteration.
Definition TerrainRectangleArea.cpp:7
const Terrain * pTerrain
Pointer to the terrain.
Definition TerrainRectangleArea.h:90
Iterator end() const
Returns an iterator to the end of the area.
Definition TerrainRectangleArea.cpp:17