You can add getTerrainSize() to the terrain scene nodes with the following additions:
In CTerrainSceneNode.h:
Code: Select all
//! Returns the number of points in the heightmap (in the X/width and Z/depth directions).
virtual s32 getTerrainSize( ) const;
Code: Select all
s32 CTerrainSceneNode::getTerrainSize( ) const
{
return TerrainData.Size;
}
Code: Select all
//! Returns the number of points in the heightmap (in the X/width and Z/depth directions).
/** PATCH - NOT PART OF IRRLICHT 1.4 RELEASE.
Returns the length of one side of the square terrain.
*/
virtual s32 getTerrainSize( ) const = 0;