Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
NodeVisuals Struct Reference

#include <node_visuals.h>

+ Collaboration diagram for NodeVisuals:

Public Member Functions

 ~NodeVisuals ()
 
void getColor (u8 param2, video::SColor *color) const
 
 DISABLE_CLASS_COPY (NodeVisuals)
 

Static Public Member Functions

static void fillNodeVisuals (NodeDefManager *ndef, Client *client, void *progress_callback_args)
 

Public Attributes

TileSpec tiles [6]
 
TileSpec special_tiles [CF_SPECIAL_COUNT]
 
u8 solidness = 2
 
u8 visual_solidness = 0
 
bool backface_culling = true
 
scene::SMesh * mesh_ptr = nullptr
 
video::SColor minimap_color
 
std::vector< video::SColor > * palette = nullptr
 

Private Member Functions

 NodeVisuals (ContentFeatures *features)
 
void preUpdateTextures (ITextureSource *tsrc, std::unordered_set< std::string > &pool, const TextureSettings &tsettings)
 
void updateTextures (ITextureSource *tsrc, IShaderSource *shdsrc, Client *client, PreLoadedTextures *texture_pool, const TextureSettings &tsettings)
 
void updateMesh (Client *client, const TextureSettings &tsettings)
 
void collectMaterials (std::vector< u32 > &leaves_materials)
 

Private Attributes

ContentFeaturesf = nullptr
 

Friends

class DummyGameDef
 

Constructor & Destructor Documentation

◆ ~NodeVisuals()

NodeVisuals::~NodeVisuals ( )

◆ NodeVisuals()

NodeVisuals::NodeVisuals ( ContentFeatures * features)
inlineprivate

Referenced by fillNodeVisuals().

+ Here is the caller graph for this function:

Member Function Documentation

◆ collectMaterials()

void NodeVisuals::collectMaterials ( std::vector< u32 > & leaves_materials)
private

◆ DISABLE_CLASS_COPY()

NodeVisuals::DISABLE_CLASS_COPY ( NodeVisuals )

◆ fillNodeVisuals()

void NodeVisuals::fillNodeVisuals ( NodeDefManager * ndef,
Client * client,
void * progress_callback_args )
static

Creates NodeVisuals for every content feature in the passed NodeDefManager.

Parameters
ndefthe NodeDefManager.
clientthe Client.
progress_cbkcalled each time a node is loaded. Arguments: progress_cbk_args, number of loaded ContentFeatures, number of total ContentFeatures.
progress_cbk_argspassed to the callback function

References NodeVisuals(), PreLoadedTextures::add(), ITextureSource::addArrayTexture(), NodeDefManager::applyFunction(), f, getArrayTextureMax(), ITextureSource::getTextureDimensions(), idx, infostream, PreLoadedTextures::printStats(), TextureSettings::readSettings(), ITextureSource::setImageCaching(), NodeDefManager::size(), SORT_AND_UNIQUE, PreLoadedTexture::texture, PreLoadedTexture::texture_id, PreLoadedTexture::texture_layer_idx, and verbosestream.

Referenced by Client::afterContentReceived().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getColor()

void NodeVisuals::getColor ( u8 param2,
video::SColor * color ) const

References ContentFeatures::color, f, and palette.

◆ preUpdateTextures()

void NodeVisuals::preUpdateTextures ( ITextureSource * tsrc,
std::unordered_set< std::string > & pool,
const TextureSettings & tsettings )
private

◆ updateMesh()

void NodeVisuals::updateMesh ( Client * client,
const TextureSettings & tsettings )
private

References BS, checkMeshNormals(), cloneStaticMesh(), ContentFeatures::drawtype, f, infostream, ContentFeatures::mesh, mesh_ptr, NDT_MESH, recalculateBoundingBox(), scaleMesh(), and ContentFeatures::visual_scale.

+ Here is the call graph for this function:

◆ updateTextures()

void NodeVisuals::updateTextures ( ITextureSource * tsrc,
IShaderSource * shdsrc,
Client * client,
PreLoadedTextures * texture_pool,
const TextureSettings & tsettings )
private

References ContentFeatures::alpha, alpha_mode_to_material_type(), ALPHAMODE_CLIP, ALPHAMODE_OPAQUE, TileDef::backface_culling, CF_SPECIAL_COUNT, ContentFeatures::color, TextureSettings::connected_glass, CPT2_COLOR, CPT2_COLORED_4DIR, CPT2_COLORED_DEGROTATE, CPT2_COLORED_FACEDIR, CPT2_COLORED_WALLMOUNTED, ContentFeatures::drawtype, TileLayer::empty(), TextureSettings::enable_minimap, f, fillTileAttribs(), ITextureSource::getPalette(), IShaderSource::getShader(), ITextureSource::getTextureAverageColor(), isWorldAligned(), TileSpec::layers, LEAVES_FANCY, LEAVES_SIMPLE, TextureSettings::leaves_style, material_type_with_alpha(), minimap_color, TileDef::name, NDT_AIRLIKE, NDT_ALLFACES, NDT_ALLFACES_OPTIONAL, NDT_FENCELIKE, NDT_FIRELIKE, NDT_FLOWINGLIQUID, NDT_GLASSLIKE, NDT_GLASSLIKE_FRAMED, NDT_GLASSLIKE_FRAMED_OPTIONAL, NDT_LIQUID, NDT_MESH, NDT_NODEBOX, NDT_NORMAL, NDT_PLANTLIKE, NDT_PLANTLIKE_ROOTED, NDT_RAILLIKE, NDT_SIGNLIKE, NDT_TORCHLIKE, TileLayer::need_polygon_offset, palette, ContentFeatures::palette_name, ContentFeatures::param_type_2, solidness, special_tiles, TILE_MATERIAL_LIQUID_OPAQUE, TILE_MATERIAL_LIQUID_TRANSPARENT, TILE_MATERIAL_WAVING_LEAVES, TILE_MATERIAL_WAVING_LIQUID_BASIC, TILE_MATERIAL_WAVING_LIQUID_OPAQUE, TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT, TILE_MATERIAL_WAVING_PLANTS, ContentFeatures::tiledef, ContentFeatures::tiledef_overlay, ContentFeatures::tiledef_special, tiles, TextureSettings::translucent_liquids, visual_solidness, ContentFeatures::waving, TileSpec::world_aligned, and TextureSettings::world_aligned_mode.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ DummyGameDef

friend class DummyGameDef
friend

Member Data Documentation

◆ backface_culling

bool NodeVisuals::backface_culling = true

◆ f

◆ mesh_ptr

scene::SMesh* NodeVisuals::mesh_ptr = nullptr

Referenced by ~NodeVisuals(), and updateMesh().

◆ minimap_color

video::SColor NodeVisuals::minimap_color

Referenced by updateTextures().

◆ palette

std::vector<video::SColor>* NodeVisuals::palette = nullptr

Referenced by getColor(), and updateTextures().

◆ solidness

u8 NodeVisuals::solidness = 2

Referenced by updateTextures().

◆ special_tiles

◆ tiles

◆ visual_solidness

u8 NodeVisuals::visual_solidness = 0

Referenced by updateTextures().


The documentation for this struct was generated from the following files: