Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/Terrain.h
Show All 26 Lines | |||||
#include "maths/Fixed.h" | #include "maths/Fixed.h" | ||||
#include "maths/Vector3D.h" | #include "maths/Vector3D.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
class CPatch; | class CPatch; | ||||
class CMiniPatch; | class CMiniPatch; | ||||
class CFixedVector3D; | class CFixedVector3D; | ||||
class CBoundingBoxAligned; | class CBoundingBoxAligned; | ||||
class CWater; | |||||
/////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||
// Terrain Constants: | // Terrain Constants: | ||||
/// metres [world space units] per tile in x and z | /// metres [world space units] per tile in x and z | ||||
const ssize_t TERRAIN_TILE_SIZE = 4; | const ssize_t TERRAIN_TILE_SIZE = 4; | ||||
/// number of u16 height units per metre | /// number of u16 height units per metre | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | public: | ||||
// since their texture blends depend on that tile. | // since their texture blends depend on that tile. | ||||
void MakeDirty(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1, int dirtyFlags); | void MakeDirty(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1, int dirtyFlags); | ||||
// mark the entire map as dirty | // mark the entire map as dirty | ||||
void MakeDirty(int dirtyFlags); | void MakeDirty(int dirtyFlags); | ||||
/** | /** | ||||
* Returns a 3D bounding box encompassing the given vertex range (inclusive) | * Returns a 3D bounding box encompassing the given vertex range (inclusive) | ||||
*/ | */ | ||||
CBoundingBoxAligned GetVertexesBound(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1); | CBoundingBoxAligned GetVertexesBound(CWater* water, ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1); | ||||
// get the base color for the terrain (typically pure white - other colors | // get the base color for the terrain (typically pure white - other colors | ||||
// will interact badly with LOS - but used by the Actor Viewer tool) | // will interact badly with LOS - but used by the Actor Viewer tool) | ||||
SColor4ub GetBaseColor() const { return m_BaseColor; } | SColor4ub GetBaseColor() const { return m_BaseColor; } | ||||
// set the base color for the terrain | // set the base color for the terrain | ||||
void SetBaseColor(SColor4ub color) { m_BaseColor = color; } | void SetBaseColor(SColor4ub color) { m_BaseColor = color; } | ||||
const CHeightMipmap& GetHeightMipmap() const { return m_HeightMipmap; } | const CHeightMipmap& GetHeightMipmap() const { return m_HeightMipmap; } | ||||
Show All 22 Lines |
Wildfire Games · Phabricator