Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
TileLayer Struct Reference

Defines a layer of a tile. More...

#include <tile.h>

+ Collaboration diagram for TileLayer:

Public Member Functions

 TileLayer ()=default
 
bool operator== (const TileLayer &other) const
 
bool operator!= (const TileLayer &other) const
 
void applyMaterialOptions (video::SMaterial &material) const
 
void applyMaterialOptionsWithShaders (video::SMaterial &material) const
 
bool isTransparent () const
 

Public Attributes

video::ITexture * texture = nullptr
 
u32 shader_id = 0
 
u32 texture_id = 0
 
u16 animation_frame_length_ms = 0
 
u16 animation_frame_count = 1
 
u8 material_type = TILE_MATERIAL_BASIC
 
u8 material_flags
 
bool has_color = false
 If true, the tile has its own color.
 
std::vector< FrameSpec > * frames = nullptr
 
video::SColor color = video::SColor(0, 0, 0, 0)
 
u8 scale = 1
 

Detailed Description

Defines a layer of a tile.

Constructor & Destructor Documentation

◆ TileLayer()

TileLayer::TileLayer ( )
default

Member Function Documentation

◆ applyMaterialOptions()

◆ applyMaterialOptionsWithShaders()

void TileLayer::applyMaterialOptionsWithShaders ( video::SMaterial & material) const

◆ isTransparent()

bool TileLayer::isTransparent ( ) const
inline

References material_type, TILE_MATERIAL_ALPHA, TILE_MATERIAL_LIQUID_TRANSPARENT, and TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT.

Referenced by MapblockMeshGenerator::drawNodeboxNode().

+ Here is the caller graph for this function:

◆ operator!=()

bool TileLayer::operator!= ( const TileLayer & other) const
inline

Two tiles are not equal if they must have different vertices.

◆ operator==()

bool TileLayer::operator== ( const TileLayer & other) const
inline

Two layers are equal if they can be merged.

References color, has_color, material_flags, material_type, scale, and texture_id.

Member Data Documentation

◆ animation_frame_count

u16 TileLayer::animation_frame_count = 1

◆ animation_frame_length_ms

u16 TileLayer::animation_frame_length_ms = 0

Referenced by MapBlockMesh::animate().

◆ color

video::SColor TileLayer::color = video::SColor(0, 0, 0, 0)

The color of the tile, or if the tile does not own a color then the color of the node owning this tile.

Referenced by applyTileColor(), getItemMesh(), ParticleManager::getNodeParticleParams(), MapblockMeshGenerator::getSpecialTile(), operator==(), postProcessNodeMesh(), and WieldMeshSceneNode::setItem().

◆ frames

std::vector<FrameSpec>* TileLayer::frames = nullptr

◆ has_color

◆ material_flags

u8 TileLayer::material_flags
Initial value:
=
#define MATERIAL_FLAG_BACKFACE_CULLING
Definition tile.h:29
#define MATERIAL_FLAG_TILEABLE_VERTICAL
Definition tile.h:38
#define MATERIAL_FLAG_TILEABLE_HORIZONTAL
Definition tile.h:37

Referenced by applyMaterialOptions(), applyMaterialOptionsWithShaders(), ParticleManager::getNodeParticleParams(), MapblockMeshGenerator::getSpecialTile(), and operator==().

◆ material_type

u8 TileLayer::material_type = TILE_MATERIAL_BASIC

◆ scale

◆ shader_id

u32 TileLayer::shader_id = 0

◆ texture

video::ITexture* TileLayer::texture = nullptr

◆ texture_id


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