1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

before daynight mesh cache

This commit is contained in:
Perttu Ahola
2010-12-18 17:46:00 +02:00
parent 15a43c5ed0
commit 240499dc2c
13 changed files with 442 additions and 216 deletions

View File

@@ -108,6 +108,7 @@ public:
m_pos(pos),
changed(true),
is_underground(false),
m_mesh_expired(false),
m_objects(this)
//is_incomplete(false)
{
@@ -170,6 +171,16 @@ public:
changed = true;
}
void setMeshExpired(bool expired)
{
m_mesh_expired = expired;
}
bool getMeshExpired()
{
return m_mesh_expired;
}
v3s16 getPos()
{
return m_pos;
@@ -303,7 +314,7 @@ public:
static FastFace * makeFastFace(TileSpec tile, u8 light, v3f p,
v3s16 dir, v3f scale, v3f posRelative_f);
u8 getFaceLight(v3s16 p, v3s16 face_dir);
u8 getFaceLight(u32 daylight_factor, v3s16 p, v3s16 face_dir);
TileSpec getNodeTile(v3s16 p, v3s16 face_dir);
u8 getNodeContent(v3s16 p);
@@ -313,13 +324,15 @@ public:
translate_dir: unit vector with only one of x, y or z
face_dir: unit vector with only one of x, y or z
*/
void updateFastFaceRow(v3s16 startpos,
void updateFastFaceRow(
u32 daylight_factor,
v3s16 startpos,
u16 length,
v3s16 translate_dir,
v3s16 face_dir,
core::list<FastFace*> &dest);
void updateMesh();
void updateMesh(u32 daylight_factor);
bool propagateSunlight(core::map<v3s16, bool> & light_sources);
@@ -464,6 +477,8 @@ private:
At least /has been/ used. 8)
*/
bool is_underground;
bool m_mesh_expired;
MapBlockObjectList m_objects;