QcMeshOutput Struct
Vertex and index lists of one render layer of a chunk mesh, which the chunk mesher appends its quads to. More...
| Header: | #include <clientcore/meshing/QcMeshOutput.h> |
Public Types
| enum class | Run { Water, OtherTranslucent } |
Public Functions
| void | appendCross(const QcBlockRenderTable::Cross &cross, QcBlockPos local, QcQuadLight light, QcSurfaceMaterial material) const |
| void | appendQuad(const std::array<QcBlockVertex, 4> &corners, bool flipDiagonal, QcQuadSurface surface) const |
Public Variables
Detailed Description
Water and the other translucent faces also note the order in which they alternate (QcChunkMesh::translucentRuns).
Member Type Documentation
enum class QcMeshOutput::Run
The runs a layer's faces belong to; the value is the parity of their runs in QcChunkMesh::translucentRuns (water first).
| Constant | Value | Description |
|---|---|---|
QcMeshOutput::Run::Water | 0 | Faces of translucent water. |
QcMeshOutput::Run::OtherTranslucent | 1 | Every other translucent face. |
Member Function Documentation
void QcMeshOutput::appendCross(const QcBlockRenderTable::Cross &cross, QcBlockPos local, QcQuadLight light, QcSurfaceMaterial material) const
Appends two quads along the diagonals of cross in the cell whose corner lies at local in the section, each with a front and a back side so back-face culling keeps both visible, lit by light. Without a normal; plants unless material says more (light sources).
void QcMeshOutput::appendQuad(const std::array<QcBlockVertex, 4> &corners, bool flipDiagonal, QcQuadSurface surface) const
Appends the quad corners with surface written into each vertex. Its two triangles meet along the diagonal from corner 0 to 2, or from 1 to 3 when flipDiagonal is set.
Member Variable Documentation
QList<quint32> &QcMeshOutput::indices
The triangle indices of the layer.
QcMeshOutput::Run QcMeshOutput::run
The kind of run the quads belong to (with runs only).
QList<quint32> *QcMeshOutput::runs
The translucent runs to note the quads in, or null for a layer without them.
QList<QcBlockVertex> &QcMeshOutput::vertices
The vertices of the layer.