Luanti 5.16.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

References f.

Referenced by DISABLE_CLASS_COPY(), and 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 )

References NodeVisuals().

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ getColor()

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

References f, and palette.

◆ preUpdateTextures()

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

References TileDef::animation, CF_SPECIAL_COUNT, f, ITextureSource::FILTER_FOR_MESH, LEAVES_OPAQUE, LEAVES_SIMPLE, TextureSettings::leaves_style, TileDef::name, NDT_ALLFACES_OPTIONAL, ITextureSource::needFilterForMesh(), TAT_NONE, and TileAnimationParams::type.

Here is the call graph for this function:

◆ updateMesh()

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

References BS, checkMeshNormals(), cloneStaticMesh(), f, infostream, mesh_ptr, NDT_MESH, recalculateBoundingBox(), and scaleMesh().

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

◆ DummyGameDef

friend class DummyGameDef
friend

References DummyGameDef.

Referenced by DummyGameDef.

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: