#include <cmath>#include "content_mapblock.h"#include "util/basic_macros.h"#include "util/numeric.h"#include "util/directiontables.h"#include "util/tracy_wrapper.h"#include "mapblock_mesh.h"#include "node_visuals.h"#include "nodedef.h"#include "client/tile.h"#include "mesh.h"#include "client/meshgen/collector.h"#include "client/renderingengine.h"#include "client.h"#include "noise.h"#include <SMesh.h>#include <IMeshBuffer.h>Macros | |
| #define | SMOOTH_LIGHTING_OVERSIZE 1.0 |
| #define | FRAMED_EDGE_COUNT 12 |
| #define | FRAMED_NEIGHBOR_COUNT 18 |
Enumerations | |
| enum class | QuadDiagonal { Diag02 , Diag13 } |
Functions | |
| static std::array< video::S3DVertex, 24 > | setupCuboidVertices (const aabb3f &box, const f32 *txc, const TileSpec *tiles, int tilecount, v3s16 alignment) |
| static u8 | getFaceLight (enum LightBank bank, MapNode n, MapNode n2, const NodeDefManager *ndef) |
| static LightPair | getFaceLight (MapNode n, MapNode n2, const NodeDefManager *ndef) |
| static LightPair | getSmoothLightCorner (const v3s16 &p, const v3s16 &corner, MeshMakeData *data) |
| static QuadDiagonal | getSmoothLightingQuadDiagonal (const LightPair(&lights)[4]) |
Variables | |
| static constexpr v3s16 | light_dirs [8] |
| static constexpr v3s16 | tile_dirs [6] |
| static constexpr v3s16 | nodebox_connection_dirs [6] |
| static constexpr u8 | light_indices [6][4] |
| static constexpr u16 | quad_indices_02 [] = {0, 1, 2, 2, 3, 0} |
| static constexpr u16 | quad_indices_13 [] = {0, 1, 3, 3, 1, 2} |
| static const auto & | quad_indices = quad_indices_02 |
| #define FRAMED_EDGE_COUNT 12 |
Referenced by MapblockMeshGenerator::drawGlasslikeFramedNode().
| #define FRAMED_NEIGHBOR_COUNT 18 |
Referenced by MapblockMeshGenerator::drawGlasslikeFramedNode().
| #define SMOOTH_LIGHTING_OVERSIZE 1.0 |
Referenced by MapblockMeshGenerator::blendLight().
|
strong |
|
static |
References MapNode::getLight(), NodeDefManager::getLightingFlags(), and ContentLightingFlags::light_source.
Referenced by MapblockMeshGenerator::drawSolidNode(), and getFaceLight().
|
static |
References getFaceLight(), LIGHTBANK_DAY, and LIGHTBANK_NIGHT.
|
static |
References CONTENT_IGNORE, CPT_LIGHT, ContentFeatures::drawtype, g_settings, NodeDefManager::get(), MapNode::getContent(), MapNode::getLight(), ContentFeatures::getLightingFlags(), VoxelManipulator::getNodeNoExNoEmerge(), ContentFeatures::light_propagates, ContentFeatures::light_source, LIGHT_SUN, LIGHTBANK_DAY, LIGHTBANK_NIGHT, MeshMakeData::m_nodedef, MeshMakeData::m_vmanip, NDT_solidness, p(), ContentFeatures::param_type, and rangelim().
Referenced by MapblockMeshGenerator::drawSolidNode(), and MapblockMeshGenerator::getSmoothLightFrame().
|
inlinestatic |
References Diag02, Diag13, LightPair::lightDay, and LightPair::lightNight.
Referenced by MapblockMeshGenerator::drawAutoLightedCuboid(), and MapblockMeshGenerator::drawSolidNode().
|
static |
References TileSpec::layers, MYMIN, None, R180, R270, R90, TileSpec::rotation, TileLayer::scale, TileSpec::world_aligned, x, and y.
Referenced by MapblockMeshGenerator::drawCuboid().
|
staticconstexpr |
Referenced by MapblockMeshGenerator::drawSolidNode(), and MapblockMeshGenerator::getSmoothLightFrame().
|
staticconstexpr |
Referenced by MapblockMeshGenerator::drawAutoLightedCuboid(), and MapblockMeshGenerator::drawSolidNode().
|
staticconstexpr |
|
static |
|
staticconstexpr |
Referenced by MapblockMeshGenerator::drawCuboid().
|
staticconstexpr |
Referenced by MapblockMeshGenerator::drawCuboid().
|
staticconstexpr |
Referenced by MapblockMeshGenerator::drawAllfacesNode(), MapblockMeshGenerator::drawNodeboxNode(), and MapblockMeshGenerator::drawSolidNode().