Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
content_mapblock.cpp File Reference
#include <cmath>
#include "content_mapblock.h"
#include "util/numeric.h"
#include "util/directiontables.h"
#include "mapblock_mesh.h"
#include "settings.h"
#include "nodedef.h"
#include "client/tile.h"
#include "mesh.h"
#include <IMeshManipulator.h>
#include "client/meshgen/collector.h"
#include "client/renderingengine.h"
#include "client.h"
#include "noise.h"
+ Include dependency graph for content_mapblock.cpp:

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, TileSpec *tiles, int tilecount)
 
static int lightDiff (LightPair a, LightPair b)
 

Variables

static const v3s16 light_dirs [8]
 
static const 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
 

Macro Definition Documentation

◆ FRAMED_EDGE_COUNT

#define FRAMED_EDGE_COUNT   12

◆ FRAMED_NEIGHBOR_COUNT

#define FRAMED_NEIGHBOR_COUNT   18

◆ SMOOTH_LIGHTING_OVERSIZE

#define SMOOTH_LIGHTING_OVERSIZE   1.0

Enumeration Type Documentation

◆ QuadDiagonal

enum class QuadDiagonal
strong
Enumerator
Diag02 
Diag13 

Function Documentation

◆ lightDiff()

static int lightDiff ( LightPair  a,
LightPair  b 
)
inlinestatic

References LightPair::lightDay, and LightPair::lightNight.

Referenced by MapblockMeshGenerator::drawAutoLightedCuboid(), and MapblockMeshGenerator::drawSolidNode().

+ Here is the caller graph for this function:

◆ setupCuboidVertices()

static std::array< video::S3DVertex, 24 > setupCuboidVertices ( const aabb3f box,
const f32 *  txc,
TileSpec tiles,
int  tilecount 
)
static

References MYMIN, None, R180, R270, R90, and TileSpec::rotation.

Referenced by MapblockMeshGenerator::drawCuboid().

+ Here is the caller graph for this function:

Variable Documentation

◆ light_dirs

const v3s16 light_dirs[8]
static
Initial value:
= {
v3s16(-1, -1, -1),
v3s16(-1, -1, 1),
v3s16(-1, 1, -1),
v3s16(-1, 1, 1),
v3s16( 1, -1, -1),
v3s16( 1, -1, 1),
v3s16( 1, 1, -1),
v3s16( 1, 1, 1),
}
core::vector3d< s16 > v3s16
Definition: irr_v3d.h:28

Referenced by MapblockMeshGenerator::drawSolidNode(), and MapblockMeshGenerator::getSmoothLightFrame().

◆ light_indices

const u8 light_indices[6][4]
static
Initial value:
= {
{3, 7, 6, 2},
{0, 4, 5, 1},
{6, 7, 5, 4},
{3, 2, 0, 1},
{7, 3, 1, 5},
{2, 6, 4, 0},
}

Referenced by MapblockMeshGenerator::drawAutoLightedCuboid(), and MapblockMeshGenerator::drawSolidNode().

◆ quad_indices

◆ quad_indices_02

constexpr u16 quad_indices_02[] = {0, 1, 2, 2, 3, 0}
staticconstexpr

◆ quad_indices_13

constexpr u16 quad_indices_13[] = {0, 1, 3, 3, 1, 2}
staticconstexpr