Luanti 5.18.0-dev
Loading...
Searching...
No Matches
node_visuals.h File Reference
#include <array>
#include <unordered_set>
#include "nodedef.h"
#include "tile.h"
Include dependency graph for node_visuals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NodeVisuals

Namespaces

namespace  scene

Functions

static MaterialType alpha_mode_to_material_type (AlphaMode mode)
 get fitting material type for an alpha mode

Variables

constexpr std::array< u8, NodeDrawType_ENDNDT_solidness
constexpr std::array< u8, NodeDrawType_ENDNDT_visual_solidness

Function Documentation

◆ alpha_mode_to_material_type()

MaterialType alpha_mode_to_material_type ( AlphaMode mode)
inlinestatic

get fitting material type for an alpha mode

References ALPHAMODE_BLEND, ALPHAMODE_CLIP, ALPHAMODE_OPAQUE, TILE_MATERIAL_ALPHA, TILE_MATERIAL_BASIC, and TILE_MATERIAL_OPAQUE.

Referenced by getAdHocNodeShader(), and NodeVisuals::updateTextures().

Here is the caller graph for this function:

Variable Documentation

◆ NDT_solidness

std::array<u8, NodeDrawType_END> NDT_solidness
constexpr
Initial value:
= [] {
std::array<u8, NodeDrawType_END> solidness{};
solidness[NDT_NORMAL] = 2;
solidness[NDT_LIQUID] = 1;
solidness[NDT_PLANTLIKE_ROOTED] = 2;
return solidness;
}()
@ NDT_NORMAL
Definition nodedef.h:184
@ NDT_PLANTLIKE_ROOTED
Definition nodedef.h:224
@ NDT_LIQUID
Definition nodedef.h:188

Referenced by MapblockMeshGenerator::drawLiquidSides(), MapblockMeshGenerator::drawSolidNode(), get_solid_sides(), getSmoothLightCombined(), MapblockMeshGenerator::prepareLiquidNodeDrawing(), ClientMap::renderPostFx(), and ClientMap::updateDrawList().

◆ NDT_visual_solidness

std::array<u8, NodeDrawType_END> NDT_visual_solidness
constexpr
Initial value:
= [] {
std::array<u8, NodeDrawType_END> visual_solidness{};
visual_solidness[NDT_GLASSLIKE] = 1;
visual_solidness[NDT_ALLFACES] = 1;
visual_solidness[NDT_ALLFACES_OPTIONAL] = 1;
visual_solidness[NDT_GLASSLIKE_FRAMED] = 1;
visual_solidness[NDT_GLASSLIKE_FRAMED_OPTIONAL] = 1;
return visual_solidness;
}()
@ NDT_ALLFACES
Definition nodedef.h:194
@ NDT_GLASSLIKE
Definition nodedef.h:192
@ NDT_GLASSLIKE_FRAMED_OPTIONAL
Definition nodedef.h:220
@ NDT_GLASSLIKE_FRAMED
Definition nodedef.h:216
@ NDT_ALLFACES_OPTIONAL
Definition nodedef.h:196

Referenced by MapblockMeshGenerator::drawSolidNode().