Defines a layer of a tile. More...
#include <tile.h>
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 |
Defines a layer of a tile.
|
default |
void TileLayer::applyMaterialOptions | ( | video::SMaterial & | material | ) | const |
References MATERIAL_FLAG_BACKFACE_CULLING, MATERIAL_FLAG_TILEABLE_HORIZONTAL, MATERIAL_FLAG_TILEABLE_VERTICAL, material_flags, material_type, 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, and TILE_MATERIAL_WAVING_PLANTS.
Referenced by postProcessNodeMesh().
void TileLayer::applyMaterialOptionsWithShaders | ( | video::SMaterial & | material | ) | const |
|
inline |
References material_type, TILE_MATERIAL_ALPHA, TILE_MATERIAL_LIQUID_TRANSPARENT, and TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT.
Referenced by MapblockMeshGenerator::drawNodeboxNode().
|
inline |
Two tiles are not equal if they must have different vertices.
|
inline |
Two layers are equal if they can be merged.
References color, has_color, material_flags, material_type, scale, and texture_id.
u16 TileLayer::animation_frame_count = 1 |
Referenced by MapBlockMesh::animate(), and postProcessNodeMesh().
u16 TileLayer::animation_frame_length_ms = 0 |
Referenced by MapBlockMesh::animate().
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().
std::vector<FrameSpec>* TileLayer::frames = nullptr |
Referenced by MapBlockMesh::animate(), ParticleManager::getNodeParticleParams(), and postProcessNodeMesh().
bool TileLayer::has_color = false |
If true, the tile has its own color.
Referenced by getItemMesh(), ParticleManager::getNodeParticleParams(), MapblockMeshGenerator::getSpecialTile(), operator==(), postProcessNodeMesh(), and WieldMeshSceneNode::setItem().
u8 TileLayer::material_flags |
Referenced by applyMaterialOptions(), applyMaterialOptionsWithShaders(), ParticleManager::getNodeParticleParams(), MapblockMeshGenerator::getSpecialTile(), and operator==().
u8 TileLayer::material_type = TILE_MATERIAL_BASIC |
Referenced by applyMaterialOptions(), isTransparent(), and operator==().
u8 TileLayer::scale = 1 |
u32 TileLayer::shader_id = 0 |
video::ITexture* TileLayer::texture = nullptr |
Referenced by MapBlockMesh::animate(), ParticleManager::getNodeParticleParams(), and postProcessNodeMesh().
u32 TileLayer::texture_id = 0 |