+struct MeshCollector
+{
+ std::vector<PreMeshBuffer> prebuffers;
+
+ void append(const TileSpec &material,
+ const video::S3DVertex *vertices, u32 numVertices,
+ const u16 *indices, u32 numIndices);
+};
+
+// This encodes
+// alpha in the A channel of the returned SColor
+// day light (0-255) in the R channel of the returned SColor
+// night light (0-255) in the G channel of the returned SColor
+// light source (0-255) in the B channel of the returned SColor
+inline video::SColor MapBlock_LightColor(u8 alpha, u16 light, u8 light_source=0)
+{
+ return video::SColor(alpha, (light & 0xff), (light >> 8), light_source);
+}
+
+// Compute light at node
+u16 getInteriorLight(MapNode n, s32 increment, INodeDefManager *ndef);
+u16 getFaceLight(MapNode n, MapNode n2, v3s16 face_dir, INodeDefManager *ndef);
+u16 getSmoothLight(v3s16 p, v3s16 corner, MeshMakeData *data);
+
+// Retrieves the TileSpec of a face of a node
+// Adds MATERIAL_FLAG_CRACK if the node is cracked
+TileSpec getNodeTileN(MapNode mn, v3s16 p, u8 tileindex, MeshMakeData *data);
+TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data);