mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
parent
7053348e31
commit
cf074dd271
6 changed files with 178 additions and 61 deletions
|
@ -170,13 +170,11 @@ private:
|
|||
/*
|
||||
Holds a mesh for a mapblock.
|
||||
|
||||
Besides the SMesh*, this contains information used for animating
|
||||
the vertex positions, colors and texture coordinates of the mesh.
|
||||
Besides the SMesh*, this contains information used fortransparency sorting
|
||||
and texture animation.
|
||||
For example:
|
||||
- cracks [implemented]
|
||||
- day/night transitions [implemented]
|
||||
- animated flowing liquids [not implemented]
|
||||
- animating vertex positions for e.g. axles [not implemented]
|
||||
- cracks
|
||||
- day/night transitions
|
||||
*/
|
||||
class MapBlockMesh
|
||||
{
|
||||
|
@ -193,13 +191,17 @@ public:
|
|||
// Returns true if anything has been changed.
|
||||
bool animate(bool faraway, float time, int crack, u32 daynight_ratio);
|
||||
|
||||
/// @warning ClientMap requires that the vertex and index data is not modified
|
||||
scene::IMesh *getMesh()
|
||||
{
|
||||
return m_mesh[0].get();
|
||||
}
|
||||
|
||||
/// @param layer layer index
|
||||
/// @warning ClientMap requires that the vertex and index data is not modified
|
||||
scene::IMesh *getMesh(u8 layer)
|
||||
{
|
||||
assert(layer < MAX_TILE_LAYERS);
|
||||
return m_mesh[layer].get();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue