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, int layer) const |
| Set some material parameters accordingly. | |
| bool | empty () 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 |
| u16 | texture_layer_idx = 0 |
| Layer index to use, if the texture is an array texture. | |
| MaterialType | material_type = TILE_MATERIAL_BASIC |
| u8 | material_flags |
| u8 | scale = 1 |
| Texture scale in both directions (used for world-align) | |
| bool | need_polygon_offset = false |
| does this tile need to have a positive polygon offset set? | |
| std::vector< FrameSpec > * | frames = nullptr |
| video::SColor | color |
| bool | has_color = false |
| If true, the tile has its own color. | |
Defines a layer of a tile.
|
default |
| void TileLayer::applyMaterialOptions | ( | video::SMaterial & | material, |
| int | layer ) const |
Set some material parameters accordingly.
MaterialType! | material | material to mody |
| layer | index of this layer in the TileSpec |
References MATERIAL_FLAG_BACKFACE_CULLING, MATERIAL_FLAG_TILEABLE_HORIZONTAL, MATERIAL_FLAG_TILEABLE_VERTICAL, material_flags, need_polygon_offset, and texture.
|
inline |
References shader_id, and texture_id.
Referenced by MeshCollector::append(), extractTexture(), extractTexture(), MapblockMeshGenerator::getSpecialTile(), and NodeVisuals::updateTextures().
Here is the caller graph for this function:
|
inline |
References material_type, TILE_MATERIAL_ALPHA, TILE_MATERIAL_LIQUID_TRANSPARENT, TILE_MATERIAL_PLAIN_ALPHA, and TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT.
|
inline |
Two layers are not equal if they must have different vertices.
|
inline |
Two layers are equal if they can be merged (same material).
References color, has_color, material_flags, need_polygon_offset, shader_id, and texture_id.
| u16 TileLayer::animation_frame_count = 1 |
Referenced by fillTileAttribs(), and GenericCAO::updateTextureAnim().
| u16 TileLayer::animation_frame_length_ms = 0 |
Referenced by fillTileAttribs(), and GenericCAO::updateTextureAnim().
| video::SColor TileLayer::color |
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 PreMeshBuffer::applyTileColor(), fillTileAttribs(), ParticleManager::getNodeParticleParams(), MapblockMeshGenerator::getSpecialTile(), and operator==().
| std::vector<FrameSpec>* TileLayer::frames = nullptr |
Referenced by NodeVisuals::~NodeVisuals(), extractTexture(), extractTexture(), fillTileAttribs(), and GenericCAO::updateTextureAnim().
| bool TileLayer::has_color = false |
If true, the tile has its own color.
Referenced by fillTileAttribs(), ParticleManager::getNodeParticleParams(), MapblockMeshGenerator::getSpecialTile(), and operator==().
| u8 TileLayer::material_flags |
Referenced by applyMaterialOptions(), extractTexture(), extractTexture(), fillTileAttribs(), MapblockMeshGenerator::getSpecialTile(), and operator==().
| MaterialType TileLayer::material_type = TILE_MATERIAL_BASIC |
Referenced by fillTileAttribs(), and isTransparent().
| bool TileLayer::need_polygon_offset = false |
does this tile need to have a positive polygon offset set?
Referenced by applyMaterialOptions(), operator==(), and NodeVisuals::updateTextures().
| u8 TileLayer::scale = 1 |
Texture scale in both directions (used for world-align)
Referenced by fillTileAttribs(), ParticleManager::getNodeParticleParams(), and setupCuboidVertices().
| u32 TileLayer::shader_id = 0 |
Referenced by empty(), fillTileAttribs(), and operator==().
| video::ITexture* TileLayer::texture = nullptr |
Referenced by applyMaterialOptions(), and fillTileAttribs().
| u32 TileLayer::texture_id = 0 |
Referenced by empty(), fillTileAttribs(), and operator==().
| u16 TileLayer::texture_layer_idx = 0 |
Layer index to use, if the texture is an array texture.
Referenced by MeshCollector::append(), fillTileAttribs(), and getArrayTextureMax().