22 #ifndef INCLUDED_TERRAIN 23 #define INCLUDED_TERRAIN 181 #endif // INCLUDED_TERRAIN void ReleaseData()
Definition: Terrain.cpp:53
A simple fixed-point number class.
Definition: Fixed.h:119
float GetFilteredGroundLevel(float x, float z, float radius) const
Definition: Terrain.cpp:378
void MakeDirty(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1, int dirtyFlags)
Definition: Terrain.cpp:757
CTerrain()
Definition: Terrain.cpp:37
const ssize_t TERRAIN_TILE_SIZE
metres [world space units] per tile in x and z
Definition: Terrain.h:40
SColor4ub m_BaseColor
Definition: Terrain.h:176
uint16_t u16
Definition: types.h:38
void ResizeAndOffset(ssize_t size, ssize_t horizontalOffset=0, ssize_t verticalOffset=0)
Definition: Terrain.cpp:482
CBoundingBoxAligned GetVertexesBound(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1)
Returns a 3D bounding box encompassing the given vertex range (inclusive)
Definition: Terrain.cpp:804
void CalcPositionFixed(ssize_t i, ssize_t j, CFixedVector3D &pos) const
Definition: Terrain.cpp:114
void SetHeightMap(u16 *heightmap)
Definition: Terrain.cpp:734
float GetMaxZ() const
Definition: Terrain.h:74
void CalcPosition(ssize_t i, ssize_t j, CVector3D &pos) const
Definition: Terrain.cpp:102
Definition: Vector3D.h:30
void CalcNormal(ssize_t i, ssize_t j, CVector3D &normal) const
Definition: Terrain.cpp:128
CPatch * m_Patches
Definition: Terrain.h:172
float GetExactGroundLevel(float x, float z) const
Definition: Terrain.cpp:389
float GetMinZ() const
Definition: Terrain.h:72
CMiniPatch * GetTile(ssize_t i, ssize_t j) const
Definition: Terrain.cpp:282
u16 * GetHeightMap() const
Definition: Terrain.h:106
SColor4ub GetBaseColor() const
Definition: Terrain.h:155
void SetBaseColor(SColor4ub color)
Definition: Terrain.h:157
Definition: HeightMipmap.h:41
float GetMaxX() const
Definition: Terrain.h:73
ssize_t GetVerticesPerSide() const
Definition: Terrain.h:65
float GetMinX() const
Definition: Terrain.h:71
float X
Definition: Vector3D.h:33
const float HEIGHT_SCALE
metres per u16 height unit
Definition: Terrain.h:46
static void CalcFromPosition(float x, float z, ssize_t &i, ssize_t &j)
Definition: Terrain.h:125
CVector3D CalcExactNormal(float x, float z) const
Definition: Terrain.cpp:219
CHeightMipmap m_HeightMipmap
Definition: Terrain.h:178
Definition: FixedVector3D.h:24
void InitialisePatches()
Definition: Terrain.cpp:719
CPatch * GetPatch(ssize_t i, ssize_t j) const
Definition: Terrain.cpp:267
void CalcNormalFixed(ssize_t i, ssize_t j, CFixedVector3D &normal) const
Definition: Terrain.cpp:175
bool Initialize(ssize_t patchesPerSide, const u16 *ptr)
Definition: Terrain.cpp:65
fixed GetVertexGroundLevelFixed(ssize_t i, ssize_t j) const
Definition: Terrain.cpp:299
intptr_t ssize_t
Definition: wposix_types.h:82
Definition: MiniPatch.h:28
Definition: BoundingBoxAligned.h:33
u16 * m_Heightmap
Definition: Terrain.h:174
fixed GetExactGroundLevelFixed(fixed x, fixed z) const
Definition: Terrain.cpp:434
fixed GetSlopeFixed(ssize_t i, ssize_t j) const
Definition: Terrain.cpp:307
bool IsOnMap(float x, float z) const
Definition: Terrain.h:76
float Z
Definition: Vector3D.h:33
ssize_t GetPatchesPerSide() const
Definition: Terrain.h:69
const CHeightMipmap & GetHeightMipmap() const
Definition: Terrain.h:159
float GetVertexGroundLevel(ssize_t i, ssize_t j) const
Definition: Terrain.cpp:292
static void CalcFromPosition(const CVector3D &pos, ssize_t &i, ssize_t &j)
Definition: Terrain.h:119
~CTerrain()
Definition: Terrain.cpp:45
ssize_t m_MapSizePatches
Definition: Terrain.h:170
bool GetTriangulationDir(ssize_t i, ssize_t j) const
Definition: Terrain.cpp:463
ssize_t GetTilesPerSide() const
Definition: Terrain.h:67
const ssize_t HEIGHT_UNITS_PER_METRE
number of u16 height units per metre
Definition: Terrain.h:43
ssize_t m_MapSize
Definition: Terrain.h:168
fixed GetExactSlopeFixed(fixed x, fixed z) const
Definition: Terrain.cpp:326