21    Terrain(
const Terrain&) = 
delete;
 
   22    Terrain& operator=(
const Terrain&) = 
delete;
 
   35    Terrain(
const char* heightmapFile, 
float sideLength, 
float maxHeight, 
float worldZeroAltitude, std::string texture, 
float uRep, 
float vRep);
 
  107    friend class TerrainAttorney;
 
  138    float GetCellX(
int j) 
const;
 
  139    float GetCellZ(
int i) 
const;
 
  140    float GetCellLength() 
const;
 
 
Base class for objects that can participate in collision detection.
Definition Collidable.h:26
Represents an axis-aligned bounding box (AABB) collision volume.
Definition CollisionVolumeAABB.h:23
Base class for collision volumes.
Definition CollisionVolume.h:19
void Draw()
Renders the terrain.
Definition Terrain.cpp:307
int GetImgSize() const
Gets the size of the heightmap image (number of pixels per side).
Definition Terrain.cpp:292
void EnableMinMax(bool enable)
Enables or disables MinMax visualization for terrain cells.
Definition Terrain.cpp:302
const CollisionVolumeAABB & GetCellAABB(int x, int z) const
Gets the AABB for a specific terrain cell.
Definition Terrain.cpp:233
int GetMaxCellIndex() const
Gets the maximum valid cell index (for both X and Z).
Definition Terrain.cpp:281
Vect GetHeightAndNormal(const Vect &pos, Vect &outNormal)
Gets the height and normal at a given world position.
Definition Terrain.cpp:199
bool wireframeEnabled
Flag to enable/disable wireframe rendering.
Definition Terrain.h:158
int TriIndex(int i, int j)
Computes the triangle index for grid coordinates.
Definition Terrain.cpp:356
int PixelIndex(int i, int j)
Computes the pixel index for grid coordinates.
Definition Terrain.cpp:351
TriangleIndex * tlist
Triangle list for terrain.
Definition Terrain.h:147
int imgSize
Size of the heightmap image (number of pixels per side).
Definition Terrain.h:148
GraphicsObject_TextureFlat * pGOTerrain
Graphics object for terrain texture.
Definition Terrain.h:143
int VertexIndex(int i, int j)
Computes the vertex index for grid coordinates.
Definition Terrain.cpp:346
VertexStride_VUN * pVerts
Vertex data for terrain.
Definition Terrain.h:146
GraphicsObject_WireframeAutoColor * pWireframe
Wireframe object for terrain visualization.
Definition Terrain.h:142
void EnableWireframe(bool enable)
Enables or disables wireframe rendering for the terrain.
Definition Terrain.cpp:297
float GetSideLen() const
Gets the side length of the terrain.
Definition Terrain.cpp:287
void ShowCellBelow(const Vect &pos) const
Visualizes the cell below a given world position.
Definition Terrain.cpp:151
void GetCoveredCells(const CollisionVolume &vol, int &xMin, int &zMin, int &xMax, int &zMax) const
Computes the range of cells covered by a collision volume.
Definition Terrain.cpp:243
CellMinMax * cellBounds
Array of min/max Y values for terrain cells.
Definition Terrain.h:156
Vect GetHeight(const Vect &pos)
Gets the height at a given world position.
Definition Terrain.cpp:166
bool minmaxEnabled
Flag to enable/disable MinMax visualization.
Definition Terrain.h:159
float sideLen
Length of one side of the terrain (world units).
Definition Terrain.h:149
Model * pModelTerrain
Model object for terrain geometry.
Definition Terrain.h:144
CollisionVolumeAABB * cellAABBs
Array of AABBs for terrain cells.
Definition Terrain.h:157
< Structure to hold min and max Y values for terrain cells.
Definition Terrain.h:152