QcBlockRenderTable::Entry Struct
struct QcBlockRenderTable::EntryWhat the mesher needs of one block state. More...
Public Functions
| bool | lightDiffers(const QcBlockRenderTable::Entry &other) const |
| bool | operator==(const QcBlockRenderTable::Entry &) const |
Public Variables
| std::array<QList<QcBlockRenderTable::SideRect>, 6> | cover |
| QList<QcBlockRenderTable::Cross> | crosses |
| std::array<QRectF, 6> | faceUv |
| std::array<quint8, 6> | faceUvTurns |
| bool | fullCube |
| QcRenderLayer | layer |
| quint8 | lightBlockedFaces |
| int | lightLevel |
| int | lightOpacity |
| bool | liquid |
| float | liquidHeight |
| bool | liquidMayEnter |
| QcSurfaceMaterial | material |
| bool | opaque |
| QList<QcBlockRenderTable::Quad> | quads |
| quint32 | type |
Detailed Description
Member Function Documentation
bool Entry::lightDiffers(const QcBlockRenderTable::Entry &other) const
Returns whether light passes differently after a change from other to this entry.
[noexcept default] bool Entry::operator==(const QcBlockRenderTable::Entry &) const
Returns whether the entries are equal. Equal entries draw and pass light alike: the mesher reads nothing else of a state, so a change between two such states (a target's power, a note block's note) changes no mesh.
Member Variable Documentation
std::array<QList<QcBlockRenderTable::SideRect>, 6> Entry::cover
Rectangles of the cell sides covered by box faces, per QcBlockFace; they hide the matching faces of neighbours.
QList<QcBlockRenderTable::Cross> Entry::crosses
Crossed planes of the state.
std::array<QRectF, 6> Entry::faceUv
Atlas rectangles of the full cube's faces, per QcBlockFace.
std::array<quint8, 6> Entry::faceUvTurns
Quarter turns of the full cube's face textures (QcBlockState::faceUvTurns); the quads of a shape carry theirs in their texture coordinates.
bool Entry::fullCube
The state is the full cube: drawn from faceUv; otherwise from quads and crosses.
QcRenderLayer Entry::layer
Render layer the state is drawn in (Invisible: not drawn).
quint8 Entry::lightBlockedFaces
Faces light cannot cross (QcLightPassage bits; covered faces of partial shapes).
bool Entry::liquid
The state is a liquid.
float Entry::liquidHeight
Height of a liquid's surface in its cell when no liquid lies on top (falls with the flow level; sources and falling liquid are nearly full).
bool Entry::liquidMayEnter
A liquid beside it slopes down into its cell (QcLiquidSurface::open, decision E-885): air and blocks without collision (torches, plants, rails, signs) or lower than half a block (thin snow layers, carpets). Solid blocks (also invisible ones), liquids and unknown ids are walls.
QcSurfaceMaterial Entry::material
Surface class of the faces and quads in the vertices (crosses are QcSurfaceMaterial::Plant unless the block is liquid, translucent or emissive).
bool Entry::opaque
The state is an opaque full cube that hides its neighbours' faces.
QList<QcBlockRenderTable::Quad> Entry::quads
Faces of the state's shape boxes when it is not the full cube.
quint32 Entry::type
Index of the block definition, to tell states of the same block.