|
Botcraft 1.21.11
|
#include <Model.hpp>
Public Member Functions | |
| Model () | |
| Model & | operator+= (const Model &m) |
| bool | IsSame (const Model &other) const |
| Compare two models. | |
| const std::set< AABB > & | GetColliders () const |
| void | SetColliders (const std::set< AABB > &colliders_) |
| const std::vector< FaceDescriptor > & | GetFaces () const |
| std::vector< FaceDescriptor > & | GetFaces () |
Static Public Member Functions | |
| static const Model & | GetModel (const std::string &filepath, const bool custom) |
| static Model | GetModel (const double height, const std::string &texture) |
| static void | ClearCache () |
Private Member Functions | |
| Model (const std::string &filepath, const bool custom) | |
| Model (const double height, const std::string &texture) | |
Private Attributes | |
| bool | ambient_occlusion |
| std::map< std::string, std::string > | textures_variables |
| std::map< std::string, std::pair< int, int > > | textures_base_size |
| std::vector< FaceDescriptor > | faces |
| std::set< AABB > | colliders |
Static Private Attributes | |
| static std::unordered_map< std::string, Model > | cached_models |
Friends | |
| Model | operator+ (Model m1, const Model &m2) |
|
private |
Definition at line 39 of file Model.cpp.
References ambient_occlusion, Botcraft::Bottom, colliders, ProtocolCraft::Json::Value::contains(), Botcraft::FaceDescriptor::cullface_direction, Botcraft::East, Botcraft::FaceDescriptor::face, faces, ProtocolCraft::Json::Value::get(), ProtocolCraft::Json::Value::get_array(), ProtocolCraft::Json::Value::get_object(), ProtocolCraft::Json::Value::get_string(), GetModel(), LOG_ERROR, Botcraft::None, Botcraft::North, Botcraft::Renderer::FaceTransformation::offset_x1, Botcraft::Renderer::FaceTransformation::offset_x2, Botcraft::Renderer::FaceTransformation::offset_y1, Botcraft::Renderer::FaceTransformation::offset_y2, Botcraft::FaceDescriptor::orientation, Botcraft::Renderer::FaceTransformation::rotation, Botcraft::Renderer::FaceTransformation::rotations, Botcraft::Renderer::FaceTransformation::scales, Botcraft::South, Botcraft::Utilities::StartsWith(), Botcraft::FaceDescriptor::texture_names, textures_base_size, textures_variables, Botcraft::Top, Botcraft::FaceDescriptor::transformations, Botcraft::Renderer::FaceTransformation::translations, Botcraft::FaceDescriptor::use_tintindexes, and Botcraft::West.
|
private |
Definition at line 499 of file Model.cpp.
References ambient_occlusion, Botcraft::Bottom, colliders, Botcraft::East, faces, Botcraft::North, Botcraft::South, Botcraft::Top, and Botcraft::West.
| Botcraft::Model::Model | ( | ) |
Definition at line 16 of file Model.cpp.
References ambient_occlusion.
Referenced by GetModel(), and GetModel().
|
static |
Definition at line 595 of file Model.cpp.
References cached_models.
Referenced by Botcraft::AssetsManager::ClearCaches().
| const std::set< AABB > & Botcraft::Model::GetColliders | ( | ) | const |
Definition at line 585 of file Model.cpp.
References colliders.
Referenced by Botcraft::Blockstate::GetCollidersAtPos(), and Botcraft::ModelModificationFromJson().
| std::vector< FaceDescriptor > & Botcraft::Model::GetFaces | ( | ) |
| const std::vector< FaceDescriptor > & Botcraft::Model::GetFaces | ( | ) | const |
Definition at line 601 of file Model.cpp.
References faces.
Referenced by Botcraft::ModelModificationFromJson(), and Botcraft::Renderer::WorldRenderer::UpdateChunk().
|
static |
|
static |
Definition at line 23 of file Model.cpp.
References cached_models, and Model().
Referenced by Botcraft::Blockstate::Blockstate(), Botcraft::AssetsManager::LoadBlocksFile(), and Model().
| bool Botcraft::Model::IsSame | ( | const Model & | other | ) | const |
Compare two models.
Will never return true if compiled with GUI
| other | Model to compare to |
Definition at line 574 of file Model.cpp.
References colliders.
Referenced by Botcraft::Blockstate::GetUniqueModelIndex().
Definition at line 564 of file Model.cpp.
References ambient_occlusion, colliders, and faces.
| void Botcraft::Model::SetColliders | ( | const std::set< AABB > & | colliders_ | ) |
Definition at line 590 of file Model.cpp.
References colliders.
Referenced by Botcraft::ModelModificationFromJson().
|
private |
|
staticprivate |
Definition at line 74 of file Model.hpp.
Referenced by ClearCache(), and GetModel().
|
private |
Definition at line 84 of file Model.hpp.
Referenced by GetColliders(), IsSame(), Model(), Model(), operator+=(), and SetColliders().
|
private |
Definition at line 82 of file Model.hpp.
Referenced by GetFaces(), GetFaces(), Model(), Model(), and operator+=().
|
private |
|
private |