|
Botcraft 1.21.10
|
#include <Atlas.hpp>
Public Member Functions | |
| Atlas () | |
| ~Atlas () | |
| void | Reset (const int height_, const int width_) |
| void | LoadData (const std::vector< std::pair< std::string, std::string > > &textures_path) |
| int | GetWidth () const |
| int | GetHeight () const |
| const TextureData & | GetData (const std::string &name) const |
| const unsigned char * | Get (const int row=0, const int col=0, const int depth=0) const |
Private Member Functions | |
| unsigned char * | Get (const int row=0, const int col=0, const int depth=0) |
Private Attributes | |
| std::vector< unsigned char > | data |
| std::unordered_map< std::string, TextureData > | textures_map |
| int | height |
| int | width |
| Botcraft::Renderer::Atlas::Atlas | ( | ) |
|
private |
| const unsigned char * Botcraft::Renderer::Atlas::Get | ( | const int | row = 0, |
| const int | col = 0, |
||
| const int | depth = 0 |
||
| ) | const |
Definition at line 248 of file Atlas.cpp.
Referenced by Botcraft::Renderer::WorldRenderer::InitGL(), LoadData(), and Reset().
| const TextureData & Botcraft::Renderer::Atlas::GetData | ( | const std::string & | name | ) | const |
Definition at line 237 of file Atlas.cpp.
References textures_map.
Referenced by Botcraft::Entity::InitializeFaces(), and Botcraft::Blockstate::UpdateModelsWithAtlasData().
| int Botcraft::Renderer::Atlas::GetHeight | ( | ) | const |
Definition at line 232 of file Atlas.cpp.
References height.
Referenced by Botcraft::Renderer::WorldRenderer::InitGL(), Botcraft::Entity::InitializeFaces(), and Botcraft::Blockstate::UpdateModelsWithAtlasData().
| int Botcraft::Renderer::Atlas::GetWidth | ( | ) | const |
Definition at line 227 of file Atlas.cpp.
References width.
Referenced by Botcraft::Renderer::WorldRenderer::InitGL(), Botcraft::Entity::InitializeFaces(), and Botcraft::Blockstate::UpdateModelsWithAtlasData().
| void Botcraft::Renderer::Atlas::LoadData | ( | const std::vector< std::pair< std::string, std::string > > & | textures_path | ) |
Definition at line 71 of file Atlas.cpp.
References Botcraft::Renderer::Animated, Botcraft::Renderer::Texture::animated, data, Botcraft::Renderer::Texture::data, Botcraft::Renderer::Texture::depth, Get(), height, Botcraft::Renderer::Texture::height, Botcraft::Renderer::Texture::identifier, LOG_ERROR, LOG_INFO, LOG_WARNING, Botcraft::Renderer::Opaque, Botcraft::Renderer::Partial, Reset(), Botcraft::Renderer::Static, textures_map, Botcraft::Renderer::Total, Botcraft::Renderer::TextureData::transparency, width, and Botcraft::Renderer::Texture::width.
| void Botcraft::Renderer::Atlas::Reset | ( | const int | height_, |
| const int | width_ | ||
| ) |
Definition at line 47 of file Atlas.cpp.
References data, Get(), height, textures_map, and width.
Referenced by LoadData().
|
private |
|
private |
Definition at line 47 of file Atlas.hpp.
Referenced by Atlas(), GetHeight(), LoadData(), and Reset().
|
private |
Definition at line 45 of file Atlas.hpp.
Referenced by GetData(), LoadData(), and Reset().
|
private |
Definition at line 48 of file Atlas.hpp.
Referenced by Atlas(), Get(), Get(), GetWidth(), LoadData(), and Reset().