![]() |
Botcraft 1.21.5
|
#include <Face.hpp>
Public Member Functions | |
Face () | |
Face (const FaceTransformation &transformations, const Orientation orientation) | |
bool | operator== (const Face &other) const |
void | SetTransparencyData (const Transparency transparency) |
Transparency | GetTransparencyData () const |
void | SetDisplayBackface (const bool display_backface) |
const std::array< float, 16 > & | GetMatrix () const |
std::array< float, 16 > & | GetMatrix () |
void | SetTextureMultipliers (const std::array< unsigned int, 2 > &mult) |
const std::array< float, 4 > & | GetTextureCoords (const bool overlay) const |
void | SetTextureCoords (const std::array< float, 4 > &coords, const bool overlay) |
void | UpdateMatrix (const FaceTransformation &transformations, const Orientation orientation) |
Static Public Attributes | |
static const std::vector< float > | base_face |
Private Attributes | |
std::array< float, 16 > | model_matrix |
std::array< float, 4 > | texture_coords |
std::array< float, 4 > | texture_coords_overlay |
unsigned int | texture_data |
std::array< unsigned int, 2 > | texture_multipliers |
Botcraft::Renderer::Face::Face | ( | const FaceTransformation & | transformations, |
const Orientation | orientation | ||
) |
Definition at line 36 of file Face.cpp.
References Botcraft::Bottom, Botcraft::East, Botcraft::Renderer::IMatrix::m, model_matrix, 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::Renderer::FaceTransformation::rotation, Botcraft::Renderer::FaceTransformation::rotations, Botcraft::Renderer::FaceTransformation::scales, Botcraft::South, texture_coords, texture_coords_overlay, texture_data, Botcraft::Top, Botcraft::Renderer::FaceTransformation::translations, and Botcraft::West.
std::array< float, 16 > & Botcraft::Renderer::Face::GetMatrix | ( | ) |
Definition at line 174 of file Face.cpp.
References model_matrix.
const std::array< float, 16 > & Botcraft::Renderer::Face::GetMatrix | ( | ) | const |
Definition at line 169 of file Face.cpp.
References model_matrix.
Referenced by Botcraft::Renderer::Chunk::AddFace(), Botcraft::Renderer::Distance(), and std::hash< Botcraft::Renderer::Face >::operator()().
const std::array< float, 4 > & Botcraft::Renderer::Face::GetTextureCoords | ( | const bool | overlay | ) | const |
Definition at line 184 of file Face.cpp.
References texture_coords, and texture_coords_overlay.
Transparency Botcraft::Renderer::Face::GetTransparencyData | ( | ) | const |
Definition at line 142 of file Face.cpp.
References Botcraft::Renderer::Opaque, Botcraft::Renderer::Partial, texture_data, and Botcraft::Renderer::Total.
Referenced by Botcraft::Renderer::WorldRenderer::AddFace().
|
inline |
Definition at line 23 of file Face.hpp.
References model_matrix.
void Botcraft::Renderer::Face::SetDisplayBackface | ( | const bool | display_backface | ) |
Definition at line 157 of file Face.cpp.
References texture_data.
void Botcraft::Renderer::Face::SetTextureCoords | ( | const std::array< float, 4 > & | coords, |
const bool | overlay | ||
) |
Definition at line 193 of file Face.cpp.
References texture_coords, texture_coords_overlay, and texture_data.
void Botcraft::Renderer::Face::SetTextureMultipliers | ( | const std::array< unsigned int, 2 > & | mult | ) |
Definition at line 179 of file Face.cpp.
References texture_multipliers.
Referenced by Botcraft::Renderer::Chunk::AddFace().
void Botcraft::Renderer::Face::SetTransparencyData | ( | const Transparency | transparency | ) |
Definition at line 122 of file Face.cpp.
References Botcraft::Renderer::Opaque, Botcraft::Renderer::Partial, texture_data, and Botcraft::Renderer::Total.
void Botcraft::Renderer::Face::UpdateMatrix | ( | const FaceTransformation & | transformations, |
const Orientation | orientation | ||
) |
Definition at line 207 of file Face.cpp.
References Botcraft::Bottom, Botcraft::East, Botcraft::Renderer::IMatrix::m, model_matrix, Botcraft::None, Botcraft::North, Botcraft::Renderer::FaceTransformation::rotations, Botcraft::Renderer::FaceTransformation::scales, Botcraft::South, Botcraft::Top, Botcraft::Renderer::FaceTransformation::translations, and Botcraft::West.
|
static |
Definition at line 48 of file Face.hpp.
Referenced by Botcraft::Renderer::BlockRenderable::GenerateOpenGLBuffer().
|
private |
Definition at line 52 of file Face.hpp.
Referenced by Face(), GetMatrix(), GetMatrix(), operator==(), and UpdateMatrix().
|
private |
Definition at line 56 of file Face.hpp.
Referenced by Face(), GetTextureCoords(), and SetTextureCoords().
|
private |
Definition at line 57 of file Face.hpp.
Referenced by Face(), GetTextureCoords(), and SetTextureCoords().
|
private |
Definition at line 61 of file Face.hpp.
Referenced by Face(), GetTransparencyData(), SetDisplayBackface(), SetTextureCoords(), and SetTransparencyData().
|
private |
Definition at line 64 of file Face.hpp.
Referenced by SetTextureMultipliers().