QtCraft API C++ classes QML types Handbook

QcMeshNeighbourhood Class

The blocks of the 3 x 3 chunks around a section as the chunk mesher reads them (QcMeshInput), by chunk-local coordinates. More...

Header: #include <clientcore/meshing/QcMeshNeighbourhood.h>

Public Functions

std::optional<QcBlockId> block(int x, int y, int z) const
bool isOpaque(int x, int y, int z) const

Detailed Description

Member Function Documentation

std::optional<QcBlockId> QcMeshNeighbourhood::block(int x, int y, int z) const

Returns the block at chunk-local (x, y, z); x and z may lie in [-16, 32). nullopt where the neighbour chunk is missing. Below and above the world is air, so the underside of the bottom layer is drawn for a view from the void (decision E-288).

bool QcMeshNeighbourhood::isOpaque(int x, int y, int z) const

Returns whether the block at chunk-local (x, y, z) is opaque; a missing neighbour chunk counts as opaque.