Minetest  5.4.0
ContentFeatures Struct Reference

#include <nodedef.h>

+ Collaboration diagram for ContentFeatures:

Public Member Functions

 ContentFeatures ()
 
 ~ContentFeatures ()
 
void reset ()
 
void serialize (std::ostream &os, u16 protocol_version) const
 
void deSerialize (std::istream &is)
 
void setDefaultAlphaMode ()
 
bool needsBackfaceCulling () const
 
bool isLiquid () const
 
bool sameLiquid (const ContentFeatures &f) const
 
int getGroup (const std::string &group) const
 
void updateTextures (ITextureSource *tsrc, IShaderSource *shdsrc, scene::IMeshManipulator *meshmanip, Client *client, const TextureSettings &tsettings)
 

Public Attributes

TileSpec tiles [6]
 
TileSpec special_tiles [CF_SPECIAL_COUNT]
 
u8 solidness
 
u8 visual_solidness
 
bool backface_culling
 
bool has_on_construct
 
bool has_on_destruct
 
bool has_after_destruct
 
std::string name
 
ItemGroupList groups
 
ContentParamType param_type
 
ContentParamType2 param_type_2
 
enum NodeDrawType drawtype
 
std::string mesh
 
scene::IMesh * mesh_ptr [24]
 
video::SColor minimap_color
 
float visual_scale
 
TileDef tiledef [6]
 
TileDef tiledef_overlay [6]
 
TileDef tiledef_special [CF_SPECIAL_COUNT]
 
AlphaMode alpha
 
video::SColor color
 
std::string palette_name
 
std::vector< video::SColor > * palette
 
u8 waving
 
u8 connect_sides
 
std::vector< std::string > connects_to
 
std::vector< content_tconnects_to_ids
 
video::SColor post_effect_color
 
u8 leveled
 
u8 leveled_max
 
bool light_propagates
 
bool sunlight_propagates
 
u8 light_source
 
bool is_ground_content
 
bool walkable
 
bool pointable
 
bool diggable
 
bool climbable
 
bool buildable_to
 
bool rightclickable
 
u32 damage_per_second
 
std::string node_dig_prediction
 
enum LiquidType liquid_type
 
std::string liquid_alternative_flowing
 
content_t liquid_alternative_flowing_id
 
std::string liquid_alternative_source
 
content_t liquid_alternative_source_id
 
u8 liquid_viscosity
 
bool liquid_renewable
 
u8 liquid_range
 
u8 drowning
 
bool floodable
 
NodeBox node_box
 
NodeBox selection_box
 
NodeBox collision_box
 
SimpleSoundSpec sound_footstep
 
SimpleSoundSpec sound_dig
 
SimpleSoundSpec sound_dug
 
bool legacy_facedir_simple
 
bool legacy_wallmounted
 

Private Member Functions

bool textureAlphaCheck (ITextureSource *tsrc, const TileDef *tiles, int length)
 
void setAlphaFromLegacy (u8 legacy_alpha)
 
u8 getAlphaForLegacy () const
 

Constructor & Destructor Documentation

◆ ContentFeatures()

ContentFeatures::ContentFeatures ( )

References reset().

+ Here is the call graph for this function:

◆ ~ContentFeatures()

ContentFeatures::~ContentFeatures ( )

Member Function Documentation

◆ deSerialize()

◆ getAlphaForLegacy()

u8 ContentFeatures::getAlphaForLegacy ( ) const
private

References alpha, and ALPHAMODE_OPAQUE.

Referenced by serialize().

+ Here is the caller graph for this function:

◆ getGroup()

int ContentFeatures::getGroup ( const std::string &  group) const
inline

References groups, and itemgroup_get().

Referenced by MapblockMeshGenerator::drawRaillikeNode(), and MapblockMeshGenerator::isSameRail().

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

◆ isLiquid()

bool ContentFeatures::isLiquid ( ) const
inline

References LIQUID_NONE, and liquid_type.

Referenced by Map::addNodeAndUpdate(), face_contents(), Mapgen::findLiquidSurface(), Mapgen::isLiquidHorizontallyFlowable(), isPointableNode(), LocalPlayer::move(), LocalPlayer::old_move(), VoxelManipulator::print(), push_content_features(), sameLiquid(), ReflowScan::scanColumn(), and Mapgen::updateLiquid().

+ Here is the caller graph for this function:

◆ needsBackfaceCulling()

bool ContentFeatures::needsBackfaceCulling ( ) const
inline

References drawtype, NDT_FIRELIKE, NDT_MESH, NDT_PLANTLIKE, NDT_PLANTLIKE_ROOTED, NDT_RAILLIKE, NDT_SIGNLIKE, and NDT_TORCHLIKE.

Referenced by getItemMesh(), and WieldMeshSceneNode::setItem().

+ Here is the caller graph for this function:

◆ reset()

◆ sameLiquid()

bool ContentFeatures::sameLiquid ( const ContentFeatures f) const
inline

References isLiquid(), and liquid_alternative_flowing_id.

Referenced by face_contents().

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

◆ serialize()

◆ setAlphaFromLegacy()

void ContentFeatures::setAlphaFromLegacy ( u8  legacy_alpha)
private

References alpha, ALPHAMODE_BLEND, ALPHAMODE_CLIP, ALPHAMODE_OPAQUE, drawtype, NDT_FLOWINGLIQUID, NDT_LIQUID, and NDT_NORMAL.

Referenced by deSerialize().

+ Here is the caller graph for this function:

◆ setDefaultAlphaMode()

void ContentFeatures::setDefaultAlphaMode ( )
inline

References alpha, ALPHAMODE_CLIP, ALPHAMODE_LEGACY_COMPAT, ALPHAMODE_OPAQUE, drawtype, NDT_FLOWINGLIQUID, NDT_LIQUID, NDT_MESH, NDT_NODEBOX, and NDT_NORMAL.

Referenced by read_content_features().

+ Here is the caller graph for this function:

◆ textureAlphaCheck()

bool ContentFeatures::textureAlphaCheck ( ITextureSource tsrc,
const TileDef tiles,
int  length 
)
private

References RenderingEngine::get_video_driver(), ITextureSource::getTexture(), name, tiles, and warningstream.

Referenced by updateTextures().

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

◆ updateTextures()

void ContentFeatures::updateTextures ( ITextureSource tsrc,
IShaderSource shdsrc,
scene::IMeshManipulator *  meshmanip,
Client client,
const TextureSettings tsettings 
)

References alpha, ALPHAMODE_CLIP, ALPHAMODE_LEGACY_COMPAT, ALPHAMODE_OPAQUE, backface_culling, BS, CF_SPECIAL_COUNT, cloneMesh(), color, TextureSettings::connected_glass, CPT2_COLOR, CPT2_COLORED_FACEDIR, CPT2_COLORED_WALLMOUNTED, CPT2_FACEDIR, CPT2_WALLMOUNTED, drawtype, TextureSettings::enable_mesh_cache, TextureSettings::enable_minimap, fillTileAttribs(), ITextureSource::getPalette(), IShaderSource::getShader(), ITextureSource::getTextureAverageColor(), isWorldAligned(), LEAVES_FANCY, LEAVES_SIMPLE, TextureSettings::leaves_style, mesh, mesh_ptr, minimap_color, TileDef::name, 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, TextureSettings::opaque_water, palette, palette_name, param_type_2, recalculateBoundingBox(), rotateMeshBy6dFacedir(), scaleMesh(), solidness, special_tiles, textureAlphaCheck(), TILE_MATERIAL_ALPHA, TILE_MATERIAL_BASIC, TILE_MATERIAL_LIQUID_OPAQUE, TILE_MATERIAL_LIQUID_TRANSPARENT, TILE_MATERIAL_OPAQUE, TILE_MATERIAL_WAVING_LEAVES, TILE_MATERIAL_WAVING_LIQUID_BASIC, TILE_MATERIAL_WAVING_LIQUID_OPAQUE, TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT, TILE_MATERIAL_WAVING_PLANTS, tiledef, tiledef_overlay, tiledef_special, tiles, visual_scale, visual_solidness, waving, TileSpec::world_aligned, and TextureSettings::world_aligned_mode.

Referenced by NodeDefManager::updateTextures().

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

Member Data Documentation

◆ alpha

◆ backface_culling

bool ContentFeatures::backface_culling

Referenced by reset(), and updateTextures().

◆ buildable_to

◆ climbable

◆ collision_box

◆ color

◆ connect_sides

◆ connects_to

std::vector<std::string> ContentFeatures::connects_to

◆ connects_to_ids

std::vector<content_t> ContentFeatures::connects_to_ids

◆ damage_per_second

u32 ContentFeatures::damage_per_second

◆ diggable

◆ drawtype

◆ drowning

◆ floodable

◆ groups

◆ has_after_destruct

◆ has_on_construct

bool ContentFeatures::has_on_construct

◆ has_on_destruct

◆ is_ground_content

◆ legacy_facedir_simple

bool ContentFeatures::legacy_facedir_simple

◆ legacy_wallmounted

bool ContentFeatures::legacy_wallmounted

◆ leveled

◆ leveled_max

◆ light_propagates

◆ light_source

◆ liquid_alternative_flowing

std::string ContentFeatures::liquid_alternative_flowing

◆ liquid_alternative_flowing_id

◆ liquid_alternative_source

std::string ContentFeatures::liquid_alternative_source

◆ liquid_alternative_source_id

content_t ContentFeatures::liquid_alternative_source_id

◆ liquid_range

◆ liquid_renewable

bool ContentFeatures::liquid_renewable

◆ liquid_type

◆ liquid_viscosity

◆ mesh

std::string ContentFeatures::mesh

◆ mesh_ptr

scene::IMesh* ContentFeatures::mesh_ptr[24]

◆ minimap_color

video::SColor ContentFeatures::minimap_color

◆ name

◆ node_box

◆ node_dig_prediction

std::string ContentFeatures::node_dig_prediction

◆ palette

std::vector<video::SColor>* ContentFeatures::palette

◆ palette_name

std::string ContentFeatures::palette_name

◆ param_type

◆ param_type_2

◆ pointable

◆ post_effect_color

video::SColor ContentFeatures::post_effect_color

◆ rightclickable

bool ContentFeatures::rightclickable

◆ selection_box

◆ solidness

◆ sound_dig

◆ sound_dug

◆ sound_footstep

◆ special_tiles

◆ sunlight_propagates

◆ tiledef

◆ tiledef_overlay

TileDef ContentFeatures::tiledef_overlay[6]

◆ tiledef_special

◆ tiles

◆ visual_scale

◆ visual_solidness

u8 ContentFeatures::visual_solidness

◆ walkable

◆ waving


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